summaryrefslogtreecommitdiff
path: root/gr-uhd/lib
diff options
context:
space:
mode:
Diffstat (limited to 'gr-uhd/lib')
-rw-r--r--gr-uhd/lib/gr_uhd_usrp_source.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc
index ad4cb4d81..3813673b4 100644
--- a/gr-uhd/lib/gr_uhd_usrp_source.cc
+++ b/gr-uhd/lib/gr_uhd_usrp_source.cc
@@ -338,8 +338,8 @@ public:
//If receive resulted in a timeout condition:
//We now receive a single packet with a large timeout.
- while (_metadata.error_code == uhd::rx_metadata_t::ERROR_CODE_TIMEOUT){
- if (boost::this_thread::interruption_requested()) return WORK_DONE;
+ if (_metadata.error_code == uhd::rx_metadata_t::ERROR_CODE_TIMEOUT)
+ {
num_samps = _rx_stream->recv(
output_items, noutput_items, _metadata, 0.1, true/*one pkt*/
);
@@ -377,9 +377,8 @@ public:
break;
case uhd::rx_metadata_t::ERROR_CODE_TIMEOUT:
- //Assume that the user called stop() on the flow graph.
- //However, a timeout can occur under error conditions.
- return WORK_DONE;
+ //its ok to timeout, perhaps the user is doing finite streaming
+ return 0;
case uhd::rx_metadata_t::ERROR_CODE_OVERFLOW:
_tag_now = true;
@@ -402,6 +401,11 @@ public:
_stream_now = false;
}
+ void issue_stream_cmd(const uhd::stream_cmd_t &cmd)
+ {
+ _dev->issue_stream_cmd(cmd);
+ }
+
bool start(void){
#ifdef GR_UHD_USE_STREAM_API
_rx_stream = _dev->get_rx_stream(_stream_args);