diff options
author | Josh Blum <josh@joshknows.com> | 2010-05-18 12:34:04 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-05-18 12:34:04 -0700 |
commit | eaa1508dcf6ff32496838f593ba4eb9eb1aee2ff (patch) | |
tree | c11fff7251f7cabb1f67fc78b64325d336bb0c34 /host/lib/usrp | |
parent | 527630cc9d51b17c7cf5ab6ca257a78a28284f6d (diff) | |
download | uhd-eaa1508dcf6ff32496838f593ba4eb9eb1aee2ff.tar.gz uhd-eaa1508dcf6ff32496838f593ba4eb9eb1aee2ff.tar.bz2 uhd-eaa1508dcf6ff32496838f593ba4eb9eb1aee2ff.zip |
Added send and recv modes to the device class and packet handler implementation.
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/usrp2/io_impl.cpp | 10 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_impl.hpp | 14 |
2 files changed, 18 insertions, 6 deletions
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index b26dbb8bd..485cc2bd9 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -68,11 +68,12 @@ void usrp2_impl::io_init(void){ size_t usrp2_impl::send( const asio::const_buffer &buff, const tx_metadata_t &metadata, - const io_type_t &io_type + const io_type_t &io_type, + send_mode_t send_mode ){ return vrt_packet_handler::send( _packet_handler_send_state, //last state of the send handler - buff, metadata, //buffer to empty and samples metadata + buff, metadata, send_mode, //buffer to empty and samples metadata io_type, _tx_otw_type, //input and output types to convert get_master_clock_freq(), //master clock tick rate _data_transport, //zero copy interface @@ -86,11 +87,12 @@ size_t usrp2_impl::send( size_t usrp2_impl::recv( const asio::mutable_buffer &buff, rx_metadata_t &metadata, - const io_type_t &io_type + const io_type_t &io_type, + recv_mode_t recv_mode ){ return vrt_packet_handler::recv( _packet_handler_recv_state, //last state of the recv handler - buff, metadata, //buffer to fill and samples metadata + buff, metadata, recv_mode, //buffer to fill and samples metadata io_type, _rx_otw_type, //input and output types to convert get_master_clock_freq(), //master clock tick rate _data_transport //zero copy interface diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp index f98aa1938..ad674f594 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.hpp +++ b/host/lib/usrp/usrp2/usrp2_impl.hpp @@ -104,8 +104,18 @@ public: ~usrp2_impl(void); //the io interface - size_t send(const boost::asio::const_buffer &, const uhd::tx_metadata_t &, const uhd::io_type_t &); - size_t recv(const boost::asio::mutable_buffer &, uhd::rx_metadata_t &, const uhd::io_type_t &); + size_t send( + const boost::asio::const_buffer &, + const uhd::tx_metadata_t &, + const uhd::io_type_t &, + uhd::device::send_mode_t + ); + size_t recv( + const boost::asio::mutable_buffer &, + uhd::rx_metadata_t &, + const uhd::io_type_t &, + uhd::device::recv_mode_t + ); private: double get_master_clock_freq(void){ |