diff options
Diffstat (limited to 'gr-uhd')
-rw-r--r-- | gr-uhd/include/gr_uhd_usrp_source.h | 4 | ||||
-rw-r--r-- | gr-uhd/lib/gr_uhd_usrp_source.cc | 22 |
2 files changed, 5 insertions, 21 deletions
diff --git a/gr-uhd/include/gr_uhd_usrp_source.h b/gr-uhd/include/gr_uhd_usrp_source.h index ea45ef101..6e51a1423 100644 --- a/gr-uhd/include/gr_uhd_usrp_source.h +++ b/gr-uhd/include/gr_uhd_usrp_source.h @@ -24,7 +24,6 @@ #include <gr_uhd_api.h> #include <gr_sync_block.h> -#include <gr_msg_queue.h> #include <uhd/usrp/multi_usrp.hpp> class uhd_usrp_source; @@ -32,8 +31,7 @@ class uhd_usrp_source; GR_UHD_API boost::shared_ptr<uhd_usrp_source> uhd_make_usrp_source( const uhd::device_addr_t &device_addr, const uhd::io_type_t &io_type, - size_t num_channels, - gr_msg_queue_sptr async_queue = gr_msg_queue_sptr() + size_t num_channels ); class GR_UHD_API uhd_usrp_source : virtual public gr_sync_block{ diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc index 2987d528c..669f890ea 100644 --- a/gr-uhd/lib/gr_uhd_usrp_source.cc +++ b/gr-uhd/lib/gr_uhd_usrp_source.cc @@ -33,8 +33,7 @@ public: uhd_usrp_source_impl( const uhd::device_addr_t &device_addr, const uhd::io_type_t &io_type, - size_t num_channels, - gr_msg_queue_sptr async_queue + size_t num_channels ): gr_sync_block( "gr uhd usrp source", @@ -44,8 +43,7 @@ public: _type(io_type), _nchan(num_channels), _stream_now(_nchan == 1), - _tmp_buffs(_nchan), - _async_queue(async_queue) + _tmp_buffs(_nchan) { _dev = uhd::usrp::multi_usrp::make(device_addr); } @@ -224,15 +222,6 @@ public: return num_samps; } - // Scan queue and post async events - while (_dev->get_device()->recv_async_msg(_asyncdata, 0.0)) { - if (_async_queue) { - gr_message_sptr m = gr_make_message(0, 0.0, 0.0, sizeof(_asyncdata)); - memcpy(m->msg(), &_asyncdata, sizeof(_asyncdata)); - _async_queue->insert_tail(m); - } - } - return num_samps; } @@ -258,8 +247,6 @@ private: bool _stream_now; gr_vector_void_star _tmp_buffs; uhd::rx_metadata_t _metadata; - uhd::async_metadata_t _asyncdata; - gr_msg_queue_sptr _async_queue; }; @@ -269,10 +256,9 @@ private: boost::shared_ptr<uhd_usrp_source> uhd_make_usrp_source( const uhd::device_addr_t &device_addr, const uhd::io_type_t &io_type, - size_t num_channels, - gr_msg_queue_sptr async_queue + size_t num_channels ){ return boost::shared_ptr<uhd_usrp_source>( - new uhd_usrp_source_impl(device_addr, io_type, num_channels, async_queue) + new uhd_usrp_source_impl(device_addr, io_type, num_channels) ); } |