diff options
author | Josh Blum <josh@joshknows.com> | 2010-07-09 17:56:19 +0000 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-07-09 17:56:19 +0000 |
commit | 8dd01e451e9102db06daed171c18d9fbb848df97 (patch) | |
tree | 2965e6ca706cd140b637d7a44617f55c0e3b5649 /host/lib/usrp/usrp2/usrp2_iface.cpp | |
parent | ad511bd81d726918a11ab1218a4bc48f8eaf6efe (diff) | |
parent | ecd7308793ad639880faf2a44f3b8b603d87c7fd (diff) | |
download | uhd-8dd01e451e9102db06daed171c18d9fbb848df97.tar.gz uhd-8dd01e451e9102db06daed171c18d9fbb848df97.tar.bz2 uhd-8dd01e451e9102db06daed171c18d9fbb848df97.zip |
Merge branch 'error_handling' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_iface.cpp')
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_iface.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp index 8552edd1f..eaaa722ac 100644 --- a/host/lib/usrp/usrp2/usrp2_iface.cpp +++ b/host/lib/usrp/usrp2/usrp2_iface.cpp @@ -26,13 +26,14 @@ #include <algorithm> using namespace uhd; +using namespace uhd::transport; class usrp2_iface_impl : public usrp2_iface{ public: /*********************************************************************** * Structors **********************************************************************/ - usrp2_iface_impl(transport::udp_simple::sptr ctrl_transport){ + usrp2_iface_impl(udp_simple::sptr ctrl_transport){ _ctrl_transport = ctrl_transport; } @@ -160,7 +161,7 @@ public: _ctrl_transport->send(boost::asio::buffer(&out_copy, sizeof(usrp2_ctrl_data_t))); //loop until we get the packet or timeout - boost::uint8_t usrp2_ctrl_data_in_mem[USRP2_UDP_BYTES]; //allocate max bytes for recv + boost::uint8_t usrp2_ctrl_data_in_mem[udp_simple::mtu]; //allocate max bytes for recv const usrp2_ctrl_data_t *ctrl_data_in = reinterpret_cast<const usrp2_ctrl_data_t *>(usrp2_ctrl_data_in_mem); while(true){ size_t len = _ctrl_transport->recv(boost::asio::buffer(usrp2_ctrl_data_in_mem)); @@ -182,7 +183,7 @@ public: private: //this lovely lady makes it all possible - transport::udp_simple::sptr _ctrl_transport; + udp_simple::sptr _ctrl_transport; //used in send/recv boost::mutex _ctrl_mutex; @@ -222,6 +223,6 @@ private: /*********************************************************************** * Public make function for usrp2 interface **********************************************************************/ -usrp2_iface::sptr usrp2_iface::make(transport::udp_simple::sptr ctrl_transport){ +usrp2_iface::sptr usrp2_iface::make(udp_simple::sptr ctrl_transport){ return usrp2_iface::sptr(new usrp2_iface_impl(ctrl_transport)); } |