aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-11-11 15:40:02 -0800
committerMartin Braun <martin.braun@ettus.com>2019-11-26 12:21:33 -0800
commitc8950c1e0b82ef3e849d91ffb436ac41514022a4 (patch)
treee460626c225f23b5a45fc7d2d31470cc8826f40e /host
parent14fb3cc6f4c63303a7f35b81087c31eb494f7166 (diff)
downloaduhd-c8950c1e0b82ef3e849d91ffb436ac41514022a4.tar.gz
uhd-c8950c1e0b82ef3e849d91ffb436ac41514022a4.tar.bz2
uhd-c8950c1e0b82ef3e849d91ffb436ac41514022a4.zip
examples: Send only single packets in test_messages
For the burst ACK test, test_messages would send 3 packets. However, that assumes that the underlying link is fast enough to send three packets in time, and some devices are hard to operate without underruns without also specifying a start-of burst timestamp. Often, test_messages would report that no ACK was received, but instead, an underrun was received. test_messages also doesn't need to send three packets. The three packets came from the "start of burst" flag, which no device in UHD supports. The change is thus to send a single packet with an EOB marker for the burst ACK test. This will work regardless of the link speed and CPU power.
Diffstat (limited to 'host')
-rw-r--r--host/examples/test_messages.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/host/examples/test_messages.cpp b/host/examples/test_messages.cpp
index 637f086f0..78abd3c29 100644
--- a/host/examples/test_messages.cpp
+++ b/host/examples/test_messages.cpp
@@ -136,8 +136,7 @@ bool test_burst_ack_message(
md.end_of_burst = true;
md.has_time_spec = false;
- // 3 times max-sps guarantees a SOB, no burst, and EOB packet
- std::vector<std::complex<float>> buff(tx_stream->get_max_num_samps() * 3);
+ std::vector<std::complex<float>> buff(tx_stream->get_max_num_samps());
tx_stream->send(&buff.front(), buff.size(), md);
uhd::async_metadata_t async_md;
@@ -330,7 +329,8 @@ int UHD_SAFE_MAIN(int argc, char* argv[])
("Test Burst ACK ", &test_burst_ack_message)
("Test Underflow ", &test_underflow_message)
("Test Time Error", &test_time_error_message)
- ("Test Late Command", &test_late_command_message);
+ ("Test Late Command", &test_late_command_message)
+ ;
// clang-format on
if (vm.count("test-chain")) {