summaryrefslogtreecommitdiff
path: root/gr-uhd/lib/usrp_source_impl.cc
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2017-10-05 15:04:28 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2017-10-05 15:04:28 -0700
commit5a99d225cb5422b165c1af7cea484a3ad43a82a4 (patch)
tree70bf3248dcbb93f7d0e47d15348156eaad2f36d4 /gr-uhd/lib/usrp_source_impl.cc
parent2fec31c0919d001b7b53a994fae5cf2220251545 (diff)
parent6b720a9ea43be61e210f645615392a388a0dfdd0 (diff)
Merge remote-tracking branch 'github/pr/1437'
Diffstat (limited to 'gr-uhd/lib/usrp_source_impl.cc')
-rw-r--r--gr-uhd/lib/usrp_source_impl.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/gr-uhd/lib/usrp_source_impl.cc b/gr-uhd/lib/usrp_source_impl.cc
index 034e8207ba..894a6d849b 100644
--- a/gr-uhd/lib/usrp_source_impl.cc
+++ b/gr-uhd/lib/usrp_source_impl.cc
@@ -71,6 +71,7 @@ namespace gr {
args_to_io_sig(stream_args)),
usrp_block_impl(device_addr, stream_args, ""),
_recv_timeout(0.1), // seconds
+ _recv_one_packet(true),
_tag_now(false),
_issue_stream_cmd_on_start(issue_stream_cmd_on_start)
{
@@ -499,6 +500,15 @@ namespace gr {
_tag_now = true;
}
+ void
+ usrp_source_impl::set_recv_timeout(
+ const double timeout,
+ const bool one_packet
+ ) {
+ _recv_timeout = timeout;
+ _recv_one_packet = one_packet;
+ }
+
bool
usrp_source_impl::start(void)
{
@@ -635,7 +645,7 @@ namespace gr {
noutput_items,
_metadata,
_recv_timeout,
- true /* one packet -> minimize latency */
+ _recv_one_packet
);
#else
size_t num_samps = _dev->get_device()->recv