aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/multi_usrp.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-10-19 15:42:21 -0700
committerJosh Blum <josh@joshknows.com>2010-10-19 15:42:21 -0700
commit799d5059bae77a24267cfc33b33c4af1c0de8c5b (patch)
tree24fc0807ee85f0bca7660558b6f08ff878125c13 /host/lib/usrp/multi_usrp.cpp
parent1137ab33e51ad809ab7b21dea7e375e8c88b0cb8 (diff)
downloaduhd-799d5059bae77a24267cfc33b33c4af1c0de8c5b.tar.gz
uhd-799d5059bae77a24267cfc33b33c4af1c0de8c5b.tar.bz2
uhd-799d5059bae77a24267cfc33b33c4af1c0de8c5b.zip
usrp: change the bandwidth param to a double (its a frequency), add set and gets for BW in the wrappers
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r--host/lib/usrp/multi_usrp.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 6df3afbf8..027530f31 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -256,6 +256,14 @@ public:
return _rx_subdev(chan)[SUBDEV_PROP_LO_LOCKED].as<bool>();
}
+ void set_rx_bandwidth(double bandwidth, size_t chan){
+ _rx_subdev(chan)[SUBDEV_PROP_BANDWIDTH] = bandwidth;
+ }
+
+ double get_rx_bandwidth(size_t chan){
+ return _rx_subdev(chan)[SUBDEV_PROP_BANDWIDTH].as<double>();
+ }
+
float read_rssi(size_t chan){
return _rx_subdev(chan)[SUBDEV_PROP_RSSI].as<float>();
}
@@ -263,10 +271,6 @@ public:
dboard_iface::sptr get_rx_dboard_iface(size_t chan){
return _rx_dboard(chan)[DBOARD_PROP_DBOARD_IFACE].as<dboard_iface::sptr>();
}
-
- void set_rx_bandwidth(float bandwidth, size_t chan) {
- _rx_subdev(chan)[SUBDEV_PROP_BANDWIDTH] = bandwidth;
- }
/*******************************************************************
* TX methods
@@ -352,6 +356,14 @@ public:
return _tx_subdev(chan)[SUBDEV_PROP_LO_LOCKED].as<bool>();
}
+ void set_tx_bandwidth(double bandwidth, size_t chan){
+ _tx_subdev(chan)[SUBDEV_PROP_BANDWIDTH] = bandwidth;
+ }
+
+ double get_tx_bandwidth(size_t chan){
+ return _tx_subdev(chan)[SUBDEV_PROP_BANDWIDTH].as<double>();
+ }
+
dboard_iface::sptr get_tx_dboard_iface(size_t chan){
return _tx_dboard(chan)[DBOARD_PROP_DBOARD_IFACE].as<dboard_iface::sptr>();
}