From 25b1550dba377b6dc86bee3e6f269a721efee655 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Fri, 12 Aug 2011 12:33:22 -0700 Subject: gr-uhd: post received async messages to user supplied msg queue --- gr-uhd/lib/gr_uhd_usrp_source.cc | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'gr-uhd/lib') diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc index 669f890ea..2987d528c 100644 --- a/gr-uhd/lib/gr_uhd_usrp_source.cc +++ b/gr-uhd/lib/gr_uhd_usrp_source.cc @@ -33,7 +33,8 @@ public: uhd_usrp_source_impl( const uhd::device_addr_t &device_addr, const uhd::io_type_t &io_type, - size_t num_channels + size_t num_channels, + gr_msg_queue_sptr async_queue ): gr_sync_block( "gr uhd usrp source", @@ -43,7 +44,8 @@ public: _type(io_type), _nchan(num_channels), _stream_now(_nchan == 1), - _tmp_buffs(_nchan) + _tmp_buffs(_nchan), + _async_queue(async_queue) { _dev = uhd::usrp::multi_usrp::make(device_addr); } @@ -222,6 +224,15 @@ 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; } @@ -247,6 +258,8 @@ 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; }; @@ -256,9 +269,10 @@ private: boost::shared_ptr uhd_make_usrp_source( const uhd::device_addr_t &device_addr, const uhd::io_type_t &io_type, - size_t num_channels + size_t num_channels, + gr_msg_queue_sptr async_queue ){ return boost::shared_ptr( - new uhd_usrp_source_impl(device_addr, io_type, num_channels) + new uhd_usrp_source_impl(device_addr, io_type, num_channels, async_queue) ); } -- cgit From 893f946b7a652497994309092fe84fb33504852c Mon Sep 17 00:00:00 2001 From: Thomas Tsou Date: Fri, 19 Aug 2011 14:50:55 -0700 Subject: gr-uhd: add async metadata source block Add asynchronous message "block" that is independent of normal gnuradio scheduler. The block instantiates a thread to wait for asynchronous messages from UHD and encapsulates them in a gr_message posted into a message queue. The interface is empty because the block is internally driven and accessed through the the constructor specified message queue. --- gr-uhd/lib/Makefile.am | 3 +- gr-uhd/lib/gr_uhd_amsg_source.cc | 88 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 gr-uhd/lib/gr_uhd_amsg_source.cc (limited to 'gr-uhd/lib') diff --git a/gr-uhd/lib/Makefile.am b/gr-uhd/lib/Makefile.am index c27682f7f..c322c6124 100644 --- a/gr-uhd/lib/Makefile.am +++ b/gr-uhd/lib/Makefile.am @@ -31,7 +31,8 @@ lib_LTLIBRARIES = libgnuradio-uhd.la libgnuradio_uhd_la_SOURCES = \ gr_uhd_usrp_source.cc \ - gr_uhd_usrp_sink.cc + gr_uhd_usrp_sink.cc \ + gr_uhd_amsg_source.cc libgnuradio_uhd_la_LIBADD = \ $(GNURADIO_CORE_LA) \ diff --git a/gr-uhd/lib/gr_uhd_amsg_source.cc b/gr-uhd/lib/gr_uhd_amsg_source.cc new file mode 100644 index 000000000..f2958f115 --- /dev/null +++ b/gr-uhd/lib/gr_uhd_amsg_source.cc @@ -0,0 +1,88 @@ +/* + * Copyright 2011 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#include +#include +#include + +/*********************************************************************** + * UHD Asynchronous Message Source Impl + **********************************************************************/ +class uhd_amsg_source_impl : public uhd_amsg_source{ +public: + uhd_amsg_source_impl( + const uhd::device_addr_t &device_addr, + gr_msg_queue_sptr msgq + ): + _msgq(msgq), _running(true) + { + _dev = uhd::usrp::multi_usrp::make(device_addr); + _amsg_thread = + gruel::thread(boost::bind(&uhd_amsg_source_impl::recv_loop, this)); + } + + ~uhd_amsg_source_impl() + { + _running = false; + _amsg_thread.join(); + } + + void recv_loop() + { + gr_message_sptr msg; + uhd::async_metadata_t *md; + + while (_running) { + msg = gr_make_message(0, 0.0, 0.0, sizeof(uhd::async_metadata_t)); + md = (uhd::async_metadata_t *) msg->msg(); + + while (!_dev->get_device()->recv_async_msg(*md, 0.1)) { + if (!_running) + return; + } + + post(msg); + } + } + + void post(gr_message_sptr msg) + { + _msgq->insert_tail(msg); + } + +protected: + uhd::usrp::multi_usrp::sptr _dev; + gruel::thread _amsg_thread; + gr_msg_queue_sptr _msgq; + bool _running; +}; + +/*********************************************************************** + * Make UHD Asynchronous Message Source + **********************************************************************/ +boost::shared_ptr uhd_make_amsg_source( + const uhd::device_addr_t &device_addr, + gr_msg_queue_sptr msgq +){ + return boost::shared_ptr( + new uhd_amsg_source_impl(device_addr, msgq) + ); +} -- cgit From 0d2205758561682fed5490fb783b3eea380a387a Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Fri, 19 Aug 2011 19:05:05 -0700 Subject: Revert "gr-uhd: post received async messages to user supplied msg queue" This reverts commit 25b1550dba377b6dc86bee3e6f269a721efee655. --- gr-uhd/lib/gr_uhd_usrp_source.cc | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'gr-uhd/lib') 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_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( - new uhd_usrp_source_impl(device_addr, io_type, num_channels, async_queue) + new uhd_usrp_source_impl(device_addr, io_type, num_channels) ); } -- cgit From 0ea25051b5126d9761e49ceeb0e5d76aaecd2ca3 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 20 Aug 2011 18:43:56 -0700 Subject: uhd: changes to support amsg block w/ cmake --- gr-uhd/lib/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'gr-uhd/lib') diff --git a/gr-uhd/lib/CMakeLists.txt b/gr-uhd/lib/CMakeLists.txt index 086126eb5..8afb48942 100644 --- a/gr-uhd/lib/CMakeLists.txt +++ b/gr-uhd/lib/CMakeLists.txt @@ -37,6 +37,7 @@ LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) LIST(APPEND gr_uhd_sources gr_uhd_usrp_source.cc gr_uhd_usrp_sink.cc + gr_uhd_amsg_source.cc ) LIST(APPEND uhd_libs -- cgit From be67ead62f6c5d9abcb319cf2e6f1727fe4618d8 Mon Sep 17 00:00:00 2001 From: Thomas Tsou Date: Mon, 22 Aug 2011 12:40:31 -0700 Subject: gr-uhd: remove unused _tmp_buffs variable The code section that used this variable was removed in Commit 081497e7 "uhd: work on gr_uhd_source work() function to reduce latency" --- gr-uhd/lib/gr_uhd_usrp_source.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'gr-uhd/lib') diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc index 669f890ea..979d4858b 100644 --- a/gr-uhd/lib/gr_uhd_usrp_source.cc +++ b/gr-uhd/lib/gr_uhd_usrp_source.cc @@ -43,7 +43,6 @@ public: _type(io_type), _nchan(num_channels), _stream_now(_nchan == 1), - _tmp_buffs(_nchan) { _dev = uhd::usrp::multi_usrp::make(device_addr); } @@ -245,7 +244,6 @@ private: const uhd::io_type_t _type; size_t _nchan; bool _stream_now; - gr_vector_void_star _tmp_buffs; uhd::rx_metadata_t _metadata; }; -- cgit From 91ace5a39a171ec7367c4030a1739d2f709eaed6 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 22 Sep 2011 20:03:47 -0700 Subject: uhd: added documentation and tag implementations --- gr-uhd/lib/gr_uhd_usrp_sink.cc | 85 +++++++++++++++++++++++++++++++++++----- gr-uhd/lib/gr_uhd_usrp_source.cc | 24 +++++++++++- 2 files changed, 98 insertions(+), 11 deletions(-) (limited to 'gr-uhd/lib') diff --git a/gr-uhd/lib/gr_uhd_usrp_sink.cc b/gr-uhd/lib/gr_uhd_usrp_sink.cc index ce9d89d8d..56b2800c1 100644 --- a/gr-uhd/lib/gr_uhd_usrp_sink.cc +++ b/gr-uhd/lib/gr_uhd_usrp_sink.cc @@ -21,8 +21,13 @@ #include #include +#include #include +static const pmt::pmt_t SOB_KEY = pmt::pmt_string_to_symbol("tx_sob"); +static const pmt::pmt_t EOB_KEY = pmt::pmt_string_to_symbol("tx_eob"); +static const pmt::pmt_t TIME_KEY = pmt::pmt_string_to_symbol("tx_time"); + /*********************************************************************** * UHD Multi USRP Sink Impl **********************************************************************/ @@ -39,8 +44,7 @@ public: gr_make_io_signature(0, 0, 0) ), _type(io_type), - _nchan(num_channels), - _has_time_spec(_nchan > 1) + _nchan(num_channels) { _dev = uhd::usrp::multi_usrp::make(device_addr); } @@ -176,17 +180,22 @@ public: * Work **********************************************************************/ int work( - int noutput_items, + int ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items ){ //send a mid-burst packet with time spec _metadata.start_of_burst = false; _metadata.end_of_burst = false; - _metadata.has_time_spec = _has_time_spec; - size_t num_sent = _dev->get_device()->send( - input_items, noutput_items, _metadata, + //collect tags in this work() + const uint64_t samp0_count = nitems_read(0); + get_tags_in_range(_tags, 0, samp0_count, samp0_count + ninput_items); + if (not _tags.empty()) tag_work(ninput_items); + + //send all ninput_items with metadata + const size_t num_sent = _dev->get_device()->send( + input_items, ninput_items, _metadata, _type, uhd::device::SEND_MODE_FULL_BUFF, 1.0 ); @@ -195,12 +204,68 @@ public: return num_sent; } +/*********************************************************************** + * Tag Work + **********************************************************************/ + inline void tag_work(int &ninput_items){ + //the for loop below assumes tags sorted by count low -> high + std::sort(_tags.begin(), _tags.end(), gr_tags::nitems_compare); + + //extract absolute sample counts + const pmt::pmt_t &tag0 = _tags.front(); + const uint64_t tag0_count = gr_tags::get_nitems(tag0); + const uint64_t samp0_count = nitems_read(0); + + //only transmit nsamples from 0 to the first tag + //this ensures that the next work starts on a tag + if (samp0_count != tag0_count){ + ninput_items = tag0_count - samp0_count; + return; + } + + //time will not be set unless a time tag is found + _metadata.has_time_spec = false; + + //process all of the tags found with the same count as tag0 + BOOST_FOREACH(const pmt::pmt_t &my_tag, _tags){ + const uint64_t my_tag_count = gr_tags::get_nitems(my_tag); + + //determine how many samples to send... + //from zero until the next tag or end of work + if (my_tag_count != tag0_count){ + ninput_items = my_tag_count - samp0_count; + break; + } + + //handle end of burst with a mini end of burst packet + else if (pmt::pmt_equal(gr_tags::get_key(my_tag), EOB_KEY)){ + _metadata.end_of_burst = pmt::pmt_to_bool(my_tag); + ninput_items = 1; + return; + } + + //set the start of burst flag in the metadata + else if (pmt::pmt_equal(gr_tags::get_key(my_tag), SOB_KEY)){ + _metadata.start_of_burst = pmt::pmt_to_bool(my_tag); + } + + //set the time specification in the metadata + else if (pmt::pmt_equal(gr_tags::get_key(my_tag), TIME_KEY)){ + _metadata.has_time_spec = true; + _metadata.time_spec = uhd::time_spec_t( + pmt::pmt_to_uint64(pmt_tuple_ref(my_tag, 0)), + pmt::pmt_to_double(pmt_tuple_ref(my_tag, 1)) + ); + } + } + } + //Send an empty start-of-burst packet to begin streaming. //Set at a time in the near future to avoid late packets. bool start(void){ _metadata.start_of_burst = true; _metadata.end_of_burst = false; - _metadata.has_time_spec = _has_time_spec; + _metadata.has_time_spec = _nchan > 1; _metadata.time_spec = get_time_now() + uhd::time_spec_t(0.01); _dev->get_device()->send( @@ -224,13 +289,15 @@ public: return true; } -protected: +private: uhd::usrp::multi_usrp::sptr _dev; const uhd::io_type_t _type; size_t _nchan; - bool _has_time_spec; uhd::tx_metadata_t _metadata; double _sample_rate; + + //stream tags related stuff + std::vector _tags; }; /*********************************************************************** diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc index 979d4858b..4c13db14e 100644 --- a/gr-uhd/lib/gr_uhd_usrp_source.cc +++ b/gr-uhd/lib/gr_uhd_usrp_source.cc @@ -25,6 +25,8 @@ #include #include +static const pmt::pmt_t TIME_KEY = pmt::pmt_string_to_symbol("rx_time"); + /*********************************************************************** * UHD Multi USRP Source Impl **********************************************************************/ @@ -43,7 +45,11 @@ public: _type(io_type), _nchan(num_channels), _stream_now(_nchan == 1), + _tag_now(false) { + std::stringstream str; + str << name() << unique_id(); + _id = pmt::pmt_string_to_symbol(str.str()); _dev = uhd::usrp::multi_usrp::make(device_addr); } @@ -201,7 +207,18 @@ public: //handle possible errors conditions switch(_metadata.error_code){ case uhd::rx_metadata_t::ERROR_CODE_NONE: - //TODO insert tag for time stamp + if (_tag_now){ + _tag_now = false; + //create a timestamp pmt for the first sample + const pmt::pmt_t val = pmt::pmt_make_tuple( + pmt::pmt_from_uint64(_metadata.time_spec.get_full_secs()), + pmt::pmt_from_double(_metadata.time_spec.get_frac_secs()) + ); + //create a timestamp tag for each channel + for (size_t i = 0; i < _nchan; i++){ + this->add_item_tag(i, nitems_written(0), TIME_KEY, val, _id); + } + } break; case uhd::rx_metadata_t::ERROR_CODE_TIMEOUT: @@ -210,6 +227,7 @@ public: return WORK_DONE; case uhd::rx_metadata_t::ERROR_CODE_OVERFLOW: + _tag_now = true; //ignore overflows and try work again //TODO insert tag for overflow return work(noutput_items, input_items, output_items); @@ -231,6 +249,7 @@ public: stream_cmd.stream_now = _stream_now; stream_cmd.time_spec = get_time_now() + uhd::time_spec_t(reasonable_delay); _dev->issue_stream_cmd(stream_cmd); + _tag_now = true; return true; } @@ -243,8 +262,9 @@ private: uhd::usrp::multi_usrp::sptr _dev; const uhd::io_type_t _type; size_t _nchan; - bool _stream_now; + bool _stream_now, _tag_now; uhd::rx_metadata_t _metadata; + pmt::pmt_t _id; }; -- cgit From 7da9d688406db097f518b3eed2047fde60e1aa0e Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 23 Sep 2011 13:51:31 -0700 Subject: uhd: tweaks + tested working tags implementation --- gr-uhd/lib/gr_uhd_usrp_sink.cc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'gr-uhd/lib') diff --git a/gr-uhd/lib/gr_uhd_usrp_sink.cc b/gr-uhd/lib/gr_uhd_usrp_sink.cc index 56b2800c1..852a730db 100644 --- a/gr-uhd/lib/gr_uhd_usrp_sink.cc +++ b/gr-uhd/lib/gr_uhd_usrp_sink.cc @@ -191,7 +191,7 @@ public: //collect tags in this work() const uint64_t samp0_count = nitems_read(0); get_tags_in_range(_tags, 0, samp0_count, samp0_count + ninput_items); - if (not _tags.empty()) tag_work(ninput_items); + if (not _tags.empty()) this->tag_work(ninput_items); //send all ninput_items with metadata const size_t num_sent = _dev->get_device()->send( @@ -214,7 +214,7 @@ public: //extract absolute sample counts const pmt::pmt_t &tag0 = _tags.front(); const uint64_t tag0_count = gr_tags::get_nitems(tag0); - const uint64_t samp0_count = nitems_read(0); + const uint64_t samp0_count = this->nitems_read(0); //only transmit nsamples from 0 to the first tag //this ensures that the next work starts on a tag @@ -229,6 +229,8 @@ public: //process all of the tags found with the same count as tag0 BOOST_FOREACH(const pmt::pmt_t &my_tag, _tags){ const uint64_t my_tag_count = gr_tags::get_nitems(my_tag); + const pmt::pmt_t &key = gr_tags::get_key(my_tag); + const pmt::pmt_t &value = gr_tags::get_value(my_tag); //determine how many samples to send... //from zero until the next tag or end of work @@ -238,23 +240,23 @@ public: } //handle end of burst with a mini end of burst packet - else if (pmt::pmt_equal(gr_tags::get_key(my_tag), EOB_KEY)){ - _metadata.end_of_burst = pmt::pmt_to_bool(my_tag); + else if (pmt::pmt_equal(key, EOB_KEY)){ + _metadata.end_of_burst = pmt::pmt_to_bool(value); ninput_items = 1; return; } //set the start of burst flag in the metadata - else if (pmt::pmt_equal(gr_tags::get_key(my_tag), SOB_KEY)){ - _metadata.start_of_burst = pmt::pmt_to_bool(my_tag); + else if (pmt::pmt_equal(key, SOB_KEY)){ + _metadata.start_of_burst = pmt::pmt_to_bool(value); } //set the time specification in the metadata - else if (pmt::pmt_equal(gr_tags::get_key(my_tag), TIME_KEY)){ + else if (pmt::pmt_equal(key, TIME_KEY)){ _metadata.has_time_spec = true; _metadata.time_spec = uhd::time_spec_t( - pmt::pmt_to_uint64(pmt_tuple_ref(my_tag, 0)), - pmt::pmt_to_double(pmt_tuple_ref(my_tag, 1)) + pmt::pmt_to_uint64(pmt_tuple_ref(value, 0)), + pmt::pmt_to_double(pmt_tuple_ref(value, 1)) ); } } -- cgit From ab2d7789629cdbfc7091100bfbe8ef02a05aec7e Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 26 Sep 2011 08:30:08 -0700 Subject: uhd: tweaks for some minor details --- gr-uhd/lib/gr_uhd_usrp_sink.cc | 4 +++- gr-uhd/lib/gr_uhd_usrp_source.cc | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'gr-uhd/lib') diff --git a/gr-uhd/lib/gr_uhd_usrp_sink.cc b/gr-uhd/lib/gr_uhd_usrp_sink.cc index 852a730db..e22b5840e 100644 --- a/gr-uhd/lib/gr_uhd_usrp_sink.cc +++ b/gr-uhd/lib/gr_uhd_usrp_sink.cc @@ -180,10 +180,12 @@ public: * Work **********************************************************************/ int work( - int ninput_items, + int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items ){ + const int ninput_items = noutput_items; //cuz its a sync block + //send a mid-burst packet with time spec _metadata.start_of_burst = false; _metadata.end_of_burst = false; diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc index 4c13db14e..62da83d96 100644 --- a/gr-uhd/lib/gr_uhd_usrp_source.cc +++ b/gr-uhd/lib/gr_uhd_usrp_source.cc @@ -229,7 +229,6 @@ public: case uhd::rx_metadata_t::ERROR_CODE_OVERFLOW: _tag_now = true; //ignore overflows and try work again - //TODO insert tag for overflow return work(noutput_items, input_items, output_items); default: -- cgit From dd63208289584f764ad69f36fbd552def3c761e5 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Mon, 26 Sep 2011 13:17:39 -0400 Subject: uhd: can't be const to go into tag_work, which might change it. --- gr-uhd/lib/gr_uhd_usrp_sink.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gr-uhd/lib') diff --git a/gr-uhd/lib/gr_uhd_usrp_sink.cc b/gr-uhd/lib/gr_uhd_usrp_sink.cc index e22b5840e..a780f0551 100644 --- a/gr-uhd/lib/gr_uhd_usrp_sink.cc +++ b/gr-uhd/lib/gr_uhd_usrp_sink.cc @@ -184,8 +184,8 @@ public: gr_vector_const_void_star &input_items, gr_vector_void_star &output_items ){ - const int ninput_items = noutput_items; //cuz its a sync block - + int ninput_items = noutput_items; //cuz its a sync block + //send a mid-burst packet with time spec _metadata.start_of_burst = false; _metadata.end_of_burst = false; -- cgit