From a98e387578a3aceb15e2bcce4a9cc54d78c30dda Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 26 Jan 2010 11:29:14 -0800 Subject: Switched from indexed properties to named properties. Added some new properties for getting a list of antenna names, pps sources, ref sources... --- include/usrp_uhd/usrp/dboard/manager.hpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'include/usrp_uhd/usrp/dboard/manager.hpp') diff --git a/include/usrp_uhd/usrp/dboard/manager.hpp b/include/usrp_uhd/usrp/dboard/manager.hpp index d977fa527..4eaa9f889 100644 --- a/include/usrp_uhd/usrp/dboard/manager.hpp +++ b/include/usrp_uhd/usrp/dboard/manager.hpp @@ -5,8 +5,9 @@ #ifndef INCLUDED_USRP_UHD_USRP_DBOARD_MANAGER_HPP #define INCLUDED_USRP_UHD_USRP_DBOARD_MANAGER_HPP -#include +#include #include +#include #include #include #include @@ -32,12 +33,12 @@ public: * * \param dboard_id the dboard id (rx or tx) * \param dboard_ctor the dboard constructor function pointer - * \param num_subdevs the number of subdevs in this dboard + * \param subdev_names the names of the subdevs on this dboard */ static void register_subdevs( dboard_id_t dboard_id, dboard_ctor_t dboard_ctor, - size_t num_subdevs + const prop_names_t &subdev_names ); public: @@ -51,16 +52,16 @@ public: ~manager(void); //interface - size_t get_num_rx_subdevs(void); - size_t get_num_tx_subdevs(void); - wax::obj::sptr get_rx_subdev(size_t subdev_index); - wax::obj::sptr get_tx_subdev(size_t subdev_index); + prop_names_t get_rx_subdev_names(void); + prop_names_t get_tx_subdev_names(void); + wax::obj::sptr get_rx_subdev(const std::string &subdev_name); + wax::obj::sptr get_tx_subdev(const std::string &subdev_name); private: //list of rx and tx dboards in this manager //each dboard here is actually a subdevice - std::vector _rx_dboards; - std::vector _tx_dboards; + std::map _rx_dboards; + std::map _tx_dboards; }; }}} //namespace -- cgit v1.2.3