aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/usrp2_impl.hpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-02-21 22:15:30 -0800
committerJosh Blum <josh@joshknows.com>2010-02-21 22:15:30 -0800
commit3e5898fa11d9e77421cf0d3853acc49fbf4801ca (patch)
tree8f04464a8246bcfdb858a27c313adc614427c469 /host/lib/usrp/usrp2/usrp2_impl.hpp
parentadd5d32f9b0cb3cda15624fb7aef3998096ff3f6 (diff)
downloaduhd-3e5898fa11d9e77421cf0d3853acc49fbf4801ca.tar.gz
uhd-3e5898fa11d9e77421cf0d3853acc49fbf4801ca.tar.bz2
uhd-3e5898fa11d9e77421cf0d3853acc49fbf4801ca.zip
Made the usrp2 impl into a device.
Removed the usrp device wrapper and usrp2 cpp file outside of the usrp2 lib dir. Also removed the mboard base files since we wont be needing them.
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_impl.hpp')
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.hpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp
index be457a91c..2545efd58 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.hpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.hpp
@@ -15,6 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
+#include <uhd/usrp/usrp2.hpp>
#include <uhd/dict.hpp>
#include <uhd/props.hpp>
#include <uhd/time_spec.hpp>
@@ -70,7 +71,7 @@ private:
* The implementation details are encapsulated here.
* Handles properties on the mboard, dboard, dsps...
*/
-class usrp2_impl : boost::noncopyable, public wax::obj{
+class usrp2_impl : public uhd::device{
public:
typedef boost::shared_ptr<usrp2_impl> sptr;
@@ -96,6 +97,10 @@ public:
//misc access methods
double get_master_clock_freq(void);
+ //the io interface
+ void send_raw(const std::vector<boost::asio::const_buffer> &);
+ uhd::shared_iovec recv_raw(void);
+
private:
//udp transports for control and data
uhd::transport::udp::sptr _ctrl_transport;
@@ -119,6 +124,12 @@ private:
uhd::usrp::dboard_manager::sptr _dboard_manager;
void dboard_init(void);
+ //properties for the mboard
+ void mboard_init(void);
+ void mboard_get(const wax::obj &, wax::obj &);
+ void mboard_set(const wax::obj &, const wax::obj &);
+ uhd::dict<std::string, wax_obj_proxy> _mboards;
+
//properties interface for rx dboard
void rx_dboard_get(const wax::obj &, wax::obj &);
void rx_dboard_set(const wax::obj &, const wax::obj &);