aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/multi_usrp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r--host/lib/usrp/multi_usrp.cpp36
1 files changed, 24 insertions, 12 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 4bdb2bf2e..73bac029d 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -214,6 +214,14 @@ public:
return (*_dev)[DEVICE_PROP_MBOARD_NAMES].as<prop_names_t>().size();
}
+ sensor_value_t get_mboard_sensor(const std::string &name, size_t mboard){
+ return _mboard(mboard)[named_prop_t(MBOARD_PROP_SENSOR, name)].as<sensor_value_t>();
+ }
+
+ std::vector<std::string> get_mboard_sensor_names(size_t mboard){
+ return _mboard(mboard)[MBOARD_PROP_SENSOR_NAMES].as<prop_names_t>();
+ }
+
/*******************************************************************
* RX methods
******************************************************************/
@@ -292,10 +300,6 @@ public:
return _rx_subdev(chan)[SUBDEV_PROP_ANTENNA_NAMES].as<prop_names_t>();
}
- bool get_rx_lo_locked(size_t chan){
- 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;
}
@@ -304,14 +308,18 @@ public:
return _rx_subdev(chan)[SUBDEV_PROP_BANDWIDTH].as<double>();
}
- double read_rssi(size_t chan){
- return _rx_subdev(chan)[SUBDEV_PROP_RSSI].as<double>();
- }
-
dboard_iface::sptr get_rx_dboard_iface(size_t chan){
return _rx_dboard(chan)[DBOARD_PROP_DBOARD_IFACE].as<dboard_iface::sptr>();
}
+ sensor_value_t get_rx_sensor(const std::string &name, size_t chan){
+ return _rx_subdev(chan)[named_prop_t(SUBDEV_PROP_SENSOR, name)].as<sensor_value_t>();
+ }
+
+ std::vector<std::string> get_rx_sensor_names(size_t chan){
+ return _rx_subdev(chan)[SUBDEV_PROP_SENSOR_NAMES].as<prop_names_t>();
+ }
+
/*******************************************************************
* TX methods
******************************************************************/
@@ -390,10 +398,6 @@ public:
return _tx_subdev(chan)[SUBDEV_PROP_ANTENNA_NAMES].as<prop_names_t>();
}
- bool get_tx_lo_locked(size_t chan){
- 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;
}
@@ -406,6 +410,14 @@ public:
return _tx_dboard(chan)[DBOARD_PROP_DBOARD_IFACE].as<dboard_iface::sptr>();
}
+ sensor_value_t get_tx_sensor(const std::string &name, size_t chan){
+ return _tx_subdev(chan)[named_prop_t(SUBDEV_PROP_SENSOR, name)].as<sensor_value_t>();
+ }
+
+ std::vector<std::string> get_tx_sensor_names(size_t chan){
+ return _tx_subdev(chan)[SUBDEV_PROP_SENSOR_NAMES].as<prop_names_t>();
+ }
+
private:
device::sptr _dev;