From bf77d1f6e38e1cb561520408ecff8f633f5cefc7 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 9 Jul 2010 17:35:15 -0700 Subject: uhd: added error codes to rx metadata, switched examples to use vrt packet handler fills in error codes and inspects non-data packet --- host/examples/benchmark_rx_rate.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'host/examples/benchmark_rx_rate.cpp') diff --git a/host/examples/benchmark_rx_rate.cpp b/host/examples/benchmark_rx_rate.cpp index 7b512e56e..ba4dd34d0 100644 --- a/host/examples/benchmark_rx_rate.cpp +++ b/host/examples/benchmark_rx_rate.cpp @@ -53,10 +53,13 @@ static inline void test_device( uhd::io_type_t::COMPLEX_FLOAT32, uhd::device::RECV_MODE_ONE_PACKET ); - if (num_rx_samps == 0){ + if (num_rx_samps == 0 and md.error_code == uhd::rx_metadata_t::ERROR_CODE_TIMEOUT){ std::cerr << "Unexpected timeout on recv, exit test..." << std::endl; return; } + if (num_rx_samps == 0){ + std::cerr << "Unexpected error on recv, continuing..." << std::endl; + } if (not md.has_time_spec){ std::cerr << "Metadata missing time spec, exit test..." << std::endl; return; -- cgit v1.2.3