diff options
author | Josh Blum <josh@joshknows.com> | 2011-02-17 18:55:13 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-02-17 18:55:13 -0800 |
commit | dd75aa585afb9e59fcbb61507ad1a44fa4a00d38 (patch) | |
tree | be25749e4aac04e7832375254440e70f41ff7511 /host/lib/usrp/multi_usrp.cpp | |
parent | 1628434a32321f8af6355f5eb828e8b06da52b90 (diff) | |
parent | 4613f454c781d258d6d9b210ff1b9043a2125981 (diff) | |
download | uhd-dd75aa585afb9e59fcbb61507ad1a44fa4a00d38.tar.gz uhd-dd75aa585afb9e59fcbb61507ad1a44fa4a00d38.tar.bz2 uhd-dd75aa585afb9e59fcbb61507ad1a44fa4a00d38.zip |
Merge branch 'sensors' into usrp2_dual_dsp
Conflicts:
host/include/uhd/usrp/dsp_props.hpp
host/include/uhd/usrp/mboard_props.hpp
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 9f001595d..5130d3ae8 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -212,6 +212,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 ******************************************************************/ @@ -294,10 +302,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; } @@ -306,14 +310,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 ******************************************************************/ @@ -396,10 +404,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; } @@ -412,6 +416,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; |