summaryrefslogtreecommitdiffstats
path: root/host/lib/transport
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-10-11 10:29:33 -0700
committerJosh Blum <josh@joshknows.com>2011-11-03 20:37:12 -0700
commitfce49fd66f577b92482af6ad516944befa31b861 (patch)
tree2c58e9f23facd1b43945981f759ed1b15a5e084d /host/lib/transport
parent0946176f513dd58407869e3b019207ff3eef24f5 (diff)
downloaduhd-fce49fd66f577b92482af6ad516944befa31b861.tar.gz
uhd-fce49fd66f577b92482af6ad516944befa31b861.tar.bz2
uhd-fce49fd66f577b92482af6ad516944befa31b861.zip
uhd: added one packet mode to rx streamer
Diffstat (limited to 'host/lib/transport')
-rw-r--r--host/lib/transport/super_recv_packet_handler.hpp14
-rw-r--r--host/lib/transport/super_send_packet_handler.hpp6
2 files changed, 10 insertions, 10 deletions
diff --git a/host/lib/transport/super_recv_packet_handler.hpp b/host/lib/transport/super_recv_packet_handler.hpp
index 83c8988e8..6762a8a00 100644
--- a/host/lib/transport/super_recv_packet_handler.hpp
+++ b/host/lib/transport/super_recv_packet_handler.hpp
@@ -148,7 +148,8 @@ public:
const uhd::rx_streamer::buffs_type &buffs,
const size_t nsamps_per_buff,
uhd::rx_metadata_t &metadata,
- double timeout
+ const double timeout,
+ const bool one_packet
){
//handle metadata queued from a previous receive
if (_queue_error_for_next_call){
@@ -163,9 +164,7 @@ public:
buffs, nsamps_per_buff, metadata, timeout
);
- #ifdef SRPH_TEST_MODE_ONE_PACKET
- return accum_num_samps;
- #endif
+ if (one_packet) return accum_num_samps;
//first recv had an error code set, return immediately
if (metadata.error_code != rx_metadata_t::ERROR_CODE_NONE) return accum_num_samps;
@@ -493,7 +492,7 @@ private:
const uhd::rx_streamer::buffs_type &buffs,
const size_t nsamps_per_buff,
uhd::rx_metadata_t &metadata,
- double timeout,
+ const double timeout,
const size_t buffer_offset_bytes = 0
){
//get the next buffer if the current one has expired
@@ -571,9 +570,10 @@ public:
const rx_streamer::buffs_type &buffs,
const size_t nsamps_per_buff,
uhd::rx_metadata_t &metadata,
- double timeout
+ const double timeout,
+ const bool one_packet
){
- return recv_packet_handler::recv(buffs, nsamps_per_buff, metadata, timeout);
+ return recv_packet_handler::recv(buffs, nsamps_per_buff, metadata, timeout, one_packet);
}
private:
diff --git a/host/lib/transport/super_send_packet_handler.hpp b/host/lib/transport/super_send_packet_handler.hpp
index 1ac178ad2..5b5ee2981 100644
--- a/host/lib/transport/super_send_packet_handler.hpp
+++ b/host/lib/transport/super_send_packet_handler.hpp
@@ -128,7 +128,7 @@ public:
const uhd::tx_streamer::buffs_type &buffs,
const size_t nsamps_per_buff,
const uhd::tx_metadata_t &metadata,
- double timeout
+ const double timeout
){
//translate the metadata to vrt if packet info
vrt::if_packet_info_t if_packet_info;
@@ -215,7 +215,7 @@ private:
const uhd::tx_streamer::buffs_type &buffs,
const size_t nsamps_per_buff,
vrt::if_packet_info_t &if_packet_info,
- double timeout,
+ const double timeout,
const size_t buffer_offset_bytes = 0
){
//load the rest of the if_packet_info in here
@@ -269,7 +269,7 @@ public:
const tx_streamer::buffs_type &buffs,
const size_t nsamps_per_buff,
const uhd::tx_metadata_t &metadata,
- double timeout
+ const double timeout
){
return send_packet_handler::send(buffs, nsamps_per_buff, metadata, timeout);
}