From e4b45cca1b99d92baab061d36b6c0ceaebdfe5b7 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 11 Feb 2011 18:07:24 -0800 Subject: usrp: added get sensors api to multi usrp for rx/tx subdevs and mboard --- host/include/uhd/usrp/multi_usrp.hpp | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'host/include') diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp index 60b757f50..28c1860d6 100644 --- a/host/include/uhd/usrp/multi_usrp.hpp +++ b/host/include/uhd/usrp/multi_usrp.hpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -231,6 +232,21 @@ public: */ virtual size_t get_num_mboards(void) = 0; + /*! + * Get a motherboard sensor value. + * \param name the name of the sensor + * \param mboard the motherboard index 0 to M-1 + * \return a sensor value object + */ + virtual sensor_value_t get_mboard_sensor(const std::string &name, size_t mboard = 0) = 0; + + /*! + * Get a list of possible motherboard sensor names. + * \param mboard the motherboard index 0 to M-1 + * \return a vector of sensor names + */ + virtual std::vector get_mboard_sensor_names(size_t mboard = 0) = 0; + /******************************************************************* * RX methods ******************************************************************/ @@ -410,6 +426,21 @@ public: */ virtual dboard_iface::sptr get_rx_dboard_iface(size_t chan = 0) = 0; + /*! + * Get an RX subdevice sensor value. + * \param name the name of the sensor + * \param chan the channel index 0 to N-1 + * \return a sensor value object + */ + virtual sensor_value_t get_rx_sensor(const std::string &name, size_t chan = 0) = 0; + + /*! + * Get a list of possible RX subdevice sensor names. + * \param chan the channel index 0 to N-1 + * \return a vector of sensor names + */ + virtual std::vector get_rx_sensor_names(size_t chan = 0) = 0; + /******************************************************************* * TX methods ******************************************************************/ @@ -580,6 +611,21 @@ public: * \return the dboard interface sptr */ virtual dboard_iface::sptr get_tx_dboard_iface(size_t chan = 0) = 0; + + /*! + * Get an TX subdevice sensor value. + * \param name the name of the sensor + * \param chan the channel index 0 to N-1 + * \return a sensor value object + */ + virtual sensor_value_t get_tx_sensor(const std::string &name, size_t chan = 0) = 0; + + /*! + * Get a list of possible TX subdevice sensor names. + * \param chan the channel index 0 to N-1 + * \return a vector of sensor names + */ + virtual std::vector get_tx_sensor_names(size_t chan = 0) = 0; }; }} -- cgit v1.2.3