diff options
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/usrp/dboard/base.hpp | 6 | ||||
-rw-r--r-- | host/include/uhd/usrp/dboard/id.hpp | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/host/include/uhd/usrp/dboard/base.hpp b/host/include/uhd/usrp/dboard/base.hpp index 845e2f669..111820a8b 100644 --- a/host/include/uhd/usrp/dboard/base.hpp +++ b/host/include/uhd/usrp/dboard/base.hpp @@ -22,6 +22,7 @@ #include <boost/utility.hpp> #include <boost/shared_ptr.hpp> #include <boost/tuple/tuple.hpp> +#include <uhd/usrp/dboard/id.hpp> #include <uhd/usrp/dboard/interface.hpp> namespace uhd{ namespace usrp{ namespace dboard{ @@ -36,7 +37,7 @@ public: //the constructor args consist of a subdev name and an interface //derived classes should pass the args into the base class ctor //but should not have to deal with the internals of the args - typedef boost::tuple<std::string, interface::sptr> ctor_args_t; + typedef boost::tuple<std::string, interface::sptr, dboard_id_t, dboard_id_t> ctor_args_t; //structors base(ctor_args_t const&); @@ -51,10 +52,13 @@ public: protected: std::string get_subdev_name(void); interface::sptr get_interface(void); + dboard_id_t get_rx_id(void); + dboard_id_t get_tx_id(void); private: std::string _subdev_name; interface::sptr _dboard_interface; + dboard_id_t _rx_id, _tx_id; }; /*! diff --git a/host/include/uhd/usrp/dboard/id.hpp b/host/include/uhd/usrp/dboard/id.hpp index 98c0acc3a..a890ee096 100644 --- a/host/include/uhd/usrp/dboard/id.hpp +++ b/host/include/uhd/usrp/dboard/id.hpp @@ -15,7 +15,7 @@ // along with this program. If not, see <http://www.gnu.org/licenses/>. // -#include <iostream> +#include <string> #ifndef INCLUDED_UHD_USRP_DBOARD_ID_HPP #define INCLUDED_UHD_USRP_DBOARD_ID_HPP @@ -28,8 +28,10 @@ enum dboard_id_t{ ID_BASIC_RX = 0x0001 }; -}}} //namespace +struct id{ + static std::string to_string(const dboard_id_t &id); +}; -std::ostream& operator<<(std::ostream &, const uhd::usrp::dboard::dboard_id_t &); +}}} //namespace #endif /* INCLUDED_UHD_USRP_DBOARD_ID_HPP */ |