diff options
author | Josh Blum <josh@joshknows.com> | 2010-02-22 00:37:53 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-02-22 00:37:53 -0800 |
commit | 9c9c96896cb38054e84213aa222883d34c7dd07b (patch) | |
tree | be17e53e49e279f7d0b0befb1e3eb3fe0dc83d5f /host/include | |
parent | 3e5898fa11d9e77421cf0d3853acc49fbf4801ca (diff) | |
download | uhd-9c9c96896cb38054e84213aa222883d34c7dd07b.tar.gz uhd-9c9c96896cb38054e84213aa222883d34c7dd07b.tar.bz2 uhd-9c9c96896cb38054e84213aa222883d34c7dd07b.zip |
Made implementation class for the dboard manager.
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/usrp/dboard_manager.hpp | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/host/include/uhd/usrp/dboard_manager.hpp b/host/include/uhd/usrp/dboard_manager.hpp index d927f6231..042947ac4 100644 --- a/host/include/uhd/usrp/dboard_manager.hpp +++ b/host/include/uhd/usrp/dboard_manager.hpp @@ -18,13 +18,11 @@ #ifndef INCLUDED_UHD_USRP_DBOARD_MANAGER_HPP #define INCLUDED_UHD_USRP_DBOARD_MANAGER_HPP -#include <uhd/dict.hpp> -#include <uhd/wax.hpp> #include <uhd/props.hpp> -#include <boost/utility.hpp> -#include <boost/shared_ptr.hpp> #include <uhd/usrp/dboard_base.hpp> #include <uhd/usrp/dboard_id.hpp> +#include <boost/utility.hpp> +#include <boost/shared_ptr.hpp> namespace uhd{ namespace usrp{ @@ -36,6 +34,7 @@ namespace uhd{ namespace usrp{ class dboard_manager : boost::noncopyable{ public: + typedef boost::shared_ptr<dboard_manager> sptr; //dboard constructor (each dboard should have a ::make with this signature) typedef dboard_base::sptr(*dboard_ctor_t)(dboard_base::ctor_args_t const&); @@ -53,28 +52,24 @@ public: const prop_names_t &subdev_names ); -public: - typedef boost::shared_ptr<dboard_manager> sptr; - //structors - dboard_manager( + /*! + * Make a new dboard manager. + * \param rx_dboard_id the id of the rx dboard + * \param tx_dboard_id the id of the tx dboard + * \param interface the custom dboard interface + * \return an sptr to the new dboard manager + */ + static sptr make( dboard_id_t rx_dboard_id, dboard_id_t tx_dboard_id, dboard_interface::sptr interface ); - ~dboard_manager(void); //dboard_interface - prop_names_t get_rx_subdev_names(void); - prop_names_t get_tx_subdev_names(void); - wax::obj get_rx_subdev(const std::string &subdev_name); - wax::obj get_tx_subdev(const std::string &subdev_name); - -private: - //list of rx and tx dboards in this dboard_manager - //each dboard here is actually a subdevice proxy - //the subdevice proxy is internal to the cpp file - uhd::dict<std::string, wax::obj> _rx_dboards; - uhd::dict<std::string, wax::obj> _tx_dboards; + virtual prop_names_t get_rx_subdev_names(void) = 0; + virtual prop_names_t get_tx_subdev_names(void) = 0; + virtual wax::obj get_rx_subdev(const std::string &subdev_name) = 0; + virtual wax::obj get_tx_subdev(const std::string &subdev_name) = 0; }; }} //namespace |