aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/multi_usrp.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-02-11 18:07:24 -0800
committerJosh Blum <josh@joshknows.com>2011-02-11 18:07:24 -0800
commite4b45cca1b99d92baab061d36b6c0ceaebdfe5b7 (patch)
treeb0b4c351bfd82f32b4212e99e11183fd781f1f16 /host/lib/usrp/multi_usrp.cpp
parentad31ba63c1005221550fce77488b6080ba166cfe (diff)
downloaduhd-e4b45cca1b99d92baab061d36b6c0ceaebdfe5b7.tar.gz
uhd-e4b45cca1b99d92baab061d36b6c0ceaebdfe5b7.tar.bz2
uhd-e4b45cca1b99d92baab061d36b6c0ceaebdfe5b7.zip
usrp: added get sensors api to multi usrp for rx/tx subdevs and mboard
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r--host/lib/usrp/multi_usrp.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 4bdb2bf2e..e4e70b594 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
******************************************************************/
@@ -312,6 +320,14 @@ public:
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
******************************************************************/
@@ -406,6 +422,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;