summaryrefslogtreecommitdiffstats
path: root/host/examples
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-10-04 10:09:31 -0700
committerJosh Blum <josh@joshknows.com>2010-10-04 10:09:31 -0700
commit1da774f8abffefb9ed239699551fb116a5effba3 (patch)
tree77385c5a521e5a2e99dbf969d7770ff4b6bf229f /host/examples
parent46d2fc423d2fdcf32454621c6f41e555d2496702 (diff)
parent9cea1342941e74b911ca26cc41c64e340f04c270 (diff)
downloaduhd-1da774f8abffefb9ed239699551fb116a5effba3.tar.gz
uhd-1da774f8abffefb9ed239699551fb116a5effba3.tar.bz2
uhd-1da774f8abffefb9ed239699551fb116a5effba3.zip
Merge branch 'timeout' into usrp_e_mmap
Diffstat (limited to 'host/examples')
-rw-r--r--host/examples/tx_timed_samples.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/host/examples/tx_timed_samples.cpp b/host/examples/tx_timed_samples.cpp
index f34c121d5..2a15b2f66 100644
--- a/host/examples/tx_timed_samples.cpp
+++ b/host/examples/tx_timed_samples.cpp
@@ -95,8 +95,11 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
size_t num_tx_samps = dev->send(
&buff.front(), samps_to_send, md,
uhd::io_type_t::COMPLEX_FLOAT32,
- uhd::device::SEND_MODE_FULL_BUFF
+ uhd::device::SEND_MODE_FULL_BUFF,
+ //send will backup into the host this many seconds before sending:
+ seconds_in_future + 0.1 //timeout (delay before transmit + padding)
);
+ if (num_tx_samps == 0) std::cout << "Send timeout..." << std::endl;
if(verbose) std::cout << std::endl << boost::format("Sent %d samples") % num_tx_samps << std::endl;
}