summaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-02-11 18:43:20 -0800
committerJosh Blum <josh@joshknows.com>2011-02-11 18:43:20 -0800
commit9de6f36bc5d9f5d9d602547166c92b53b278b428 (patch)
tree6ad2101b5c5e1051188067318dcd045fbd37834a /host/include
parente4b45cca1b99d92baab061d36b6c0ceaebdfe5b7 (diff)
downloaduhd-9de6f36bc5d9f5d9d602547166c92b53b278b428.tar.gz
uhd-9de6f36bc5d9f5d9d602547166c92b53b278b428.tar.bz2
uhd-9de6f36bc5d9f5d9d602547166c92b53b278b428.zip
usrp: implement sensors in all the dboards, deprecated read rssi and get lo locked
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/usrp/multi_usrp.hpp13
-rw-r--r--host/include/uhd/usrp/subdev_props.hpp2
2 files changed, 10 insertions, 5 deletions
diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp
index 28c1860d6..da52e6dce 100644
--- a/host/include/uhd/usrp/multi_usrp.hpp
+++ b/host/include/uhd/usrp/multi_usrp.hpp
@@ -28,6 +28,7 @@
#include <uhd/types/sensors.hpp>
#include <uhd/usrp/subdev_spec.hpp>
#include <uhd/usrp/dboard_iface.hpp>
+#include <boost/lexical_cast.hpp> //needed until deprecated routines removed
#include <boost/shared_ptr.hpp>
#include <boost/utility.hpp>
#include <vector>
@@ -393,7 +394,9 @@ public:
* \param chan the channel index 0 to N-1
* \return true for locked
*/
- virtual bool get_rx_lo_locked(size_t chan = 0) = 0;
+ UHD_DEPRECATED bool get_rx_lo_locked(size_t chan = 0){
+ return this->get_rx_sensor("lo_locked", chan).value == "true";
+ }
/*!
* Set the RX bandwidth on the subdevice.
@@ -415,7 +418,9 @@ public:
* \return the rssi in dB
* \throw exception if RSSI readback not supported
*/
- virtual double read_rssi(size_t chan = 0) = 0;
+ UHD_DEPRECATED double read_rssi(size_t chan = 0){
+ return boost::lexical_cast<double>(this->get_rx_sensor("rssi", chan).value);
+ }
/*!
* Get the dboard interface object for the RX subdevice.
@@ -587,7 +592,9 @@ public:
* \param chan the channel index 0 to N-1
* \return true for locked
*/
- virtual bool get_tx_lo_locked(size_t chan = 0) = 0;
+ UHD_DEPRECATED bool get_tx_lo_locked(size_t chan = 0){
+ return this->get_tx_sensor("lo_locked", chan).value == "true";
+ }
/*!
* Set the TX bandwidth on the subdevice.
diff --git a/host/include/uhd/usrp/subdev_props.hpp b/host/include/uhd/usrp/subdev_props.hpp
index 87628fadc..40b339703 100644
--- a/host/include/uhd/usrp/subdev_props.hpp
+++ b/host/include/uhd/usrp/subdev_props.hpp
@@ -53,11 +53,9 @@ namespace uhd{ namespace usrp{
SUBDEV_PROP_FREQ_RANGE, //ro, freq_range_t
SUBDEV_PROP_ANTENNA, //rw, std::string
SUBDEV_PROP_ANTENNA_NAMES, //ro, prop_names_t
- SUBDEV_PROP_LO_LOCKED, //ro, bool //TODO deprecate for sensors
SUBDEV_PROP_CONNECTION, //ro, subdev_conn_t
SUBDEV_PROP_ENABLED, //rw, bool
SUBDEV_PROP_USE_LO_OFFSET, //ro, bool
- SUBDEV_PROP_RSSI, //ro, double //TODO deprecate for sensors
SUBDEV_PROP_BANDWIDTH //rw, double
};