From 261ae74f8ecbd255417b8fcd9f2caddff7ae5977 Mon Sep 17 00:00:00 2001 From: Ashish Chaudhari Date: Fri, 26 Feb 2016 14:36:26 -0800 Subject: dboards: Added APIs to get RX and TX frontend names --- host/lib/usrp/dboard_manager.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'host/lib') diff --git a/host/lib/usrp/dboard_manager.cpp b/host/lib/usrp/dboard_manager.cpp index 544d6d70d..6099adcbb 100644 --- a/host/lib/usrp/dboard_manager.cpp +++ b/host/lib/usrp/dboard_manager.cpp @@ -184,7 +184,15 @@ public: dboard_iface::sptr iface, property_tree::sptr subtree ); - ~dboard_manager_impl(void); + virtual ~dboard_manager_impl(void); + + inline const std::vector& get_rx_frontends() const { + return _rx_frontends; + } + + inline const std::vector& get_tx_frontends() const { + return _tx_frontends; + } private: void init(dboard_id_t, dboard_id_t, property_tree::sptr); @@ -193,6 +201,8 @@ private: //the subdevice proxy is internal to the cpp file uhd::dict _rx_dboards; uhd::dict _tx_dboards; + std::vector _rx_frontends; + std::vector _tx_frontends; dboard_iface::sptr _iface; void set_nice_dboard_if(void); }; @@ -319,6 +329,11 @@ void dboard_manager_impl::init( if (container_ctor) { db_ctor_args.rx_container->initialize(); } + + //Populate frontend names in-order. + //We cannot use _xx_dboards.keys() here because of the ordering requirement + _rx_frontends = subdevs; + _tx_frontends = subdevs; } //make tx and rx subdevs (separate subdevs for rx and tx dboards) @@ -393,6 +408,11 @@ void dboard_manager_impl::init( if (tx_cont_ctor) { db_ctor_args.tx_container->initialize(); } + + //Populate frontend names in-order. + //We cannot use _xx_dboards.keys() here because of the ordering requirement + _rx_frontends = rx_subdevs; + _tx_frontends = tx_subdevs; } } -- cgit v1.2.3