diff options
author | Josh Blum <josh@joshknows.com> | 2010-02-16 14:21:34 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-02-16 14:21:34 -0800 |
commit | d454ab4c73f15a3fdc8f52cef9c27eae6d3dbc93 (patch) | |
tree | 9570d2bc2321751de87b10355b395b8e5f66a7f4 /lib/usrp/mboard/usrp2_impl.hpp | |
parent | 429342fbab61b49c6622f994c5522ee3eee7e39a (diff) | |
download | uhd-d454ab4c73f15a3fdc8f52cef9c27eae6d3dbc93.tar.gz uhd-d454ab4c73f15a3fdc8f52cef9c27eae6d3dbc93.tar.bz2 uhd-d454ab4c73f15a3fdc8f52cef9c27eae6d3dbc93.zip |
Created dboard wrapper in the usrp2 impl
Diffstat (limited to 'lib/usrp/mboard/usrp2_impl.hpp')
-rw-r--r-- | lib/usrp/mboard/usrp2_impl.hpp | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/lib/usrp/mboard/usrp2_impl.hpp b/lib/usrp/mboard/usrp2_impl.hpp index 0c2c2292e..23f81d711 100644 --- a/lib/usrp/mboard/usrp2_impl.hpp +++ b/lib/usrp/mboard/usrp2_impl.hpp @@ -17,13 +17,38 @@ #include <uhd/usrp/dboard/manager.hpp> #include <boost/utility.hpp> +#include <boost/thread.hpp> #include <boost/shared_ptr.hpp> #include <uhd/transport/udp.hpp> +#include <uhd/dict.hpp> #include "usrp2_fw_common.h" #ifndef INCLUDED_USRP2_IMPL_HPP #define INCLUDED_USRP2_IMPL_HPP +/*********************************************************************** + * USRP2 DBoard Wrapper + **********************************************************************/ +class usrp2_dboard : boost::noncopyable, public wax::obj{ +public: + typedef boost::shared_ptr<usrp2_dboard> sptr; + enum type_t {TYPE_RX, TYPE_TX}; + + usrp2_dboard(uhd::usrp::dboard::manager::sptr manager, type_t type); + + ~usrp2_dboard(void); + + void get(const wax::obj &, wax::obj &); + void set(const wax::obj &, const wax::obj &); + +private: + uhd::usrp::dboard::manager::sptr _mgr; + type_t _type; +}; + +/*********************************************************************** + * USRP2 Implementation + **********************************************************************/ class usrp2_impl : boost::noncopyable{ public: typedef boost::shared_ptr<usrp2_impl> sptr; @@ -37,14 +62,18 @@ public: usrp2_ctrl_data_t ctrl_send_and_recv(const usrp2_ctrl_data_t &); + void get(const wax::obj &, wax::obj &); + void set(const wax::obj &, const wax::obj &); + private: uhd::transport::udp::sptr _ctrl_transport; uhd::transport::udp::sptr _data_transport; uint32_t _ctrl_seq_num; + boost::mutex _ctrl_mutex; - uhd::usrp::dboard::manager::sptr _dboard_manager; - uhd::usrp::dboard::interface::sptr _dboard_interface; + uhd::dict<std::string, usrp2_dboard::sptr> _rx_dboards; + uhd::dict<std::string, usrp2_dboard::sptr> _tx_dboards; }; #endif /* INCLUDED_USRP2_IMPL_HPP */ |