aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
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/include
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/include')
-rw-r--r--host/include/uhd/stream.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/host/include/uhd/stream.hpp b/host/include/uhd/stream.hpp
index 7a3151276..c86463184 100644
--- a/host/include/uhd/stream.hpp
+++ b/host/include/uhd/stream.hpp
@@ -123,17 +123,23 @@ public:
* Under a timeout condition, the number of samples returned
* may be less than the number of samples specified.
*
+ * The one_packet option allows the user to guarantee that
+ * the call will return after a single packet has been processed.
+ * This may be useful to maintain packet boundaries in some cases.
+ *
* \param buffs a vector of writable memory to fill with samples
* \param nsamps_per_buff the size of each buffer in number of samples
* \param metadata data to fill describing the buffer
* \param timeout the timeout in seconds to wait for a packet
+ * \param one_packet return after the first packet is received
* \return the number of samples received or 0 on error
*/
virtual size_t recv(
const buffs_type &buffs,
const size_t nsamps_per_buff,
rx_metadata_t &metadata,
- double timeout = 0.1
+ const double timeout = 0.1,
+ const bool one_packet = false
) = 0;
};
@@ -180,7 +186,7 @@ public:
const buffs_type &buffs,
const size_t nsamps_per_buff,
const tx_metadata_t &metadata,
- double timeout = 0.1
+ const double timeout = 0.1
) = 0;
};