aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Rossetto <aaron.rossetto@ni.com>2019-10-17 15:09:50 -0500
committerMartin Braun <martin.braun@ettus.com>2019-11-26 12:21:32 -0800
commit7bf6ddcb95518118a46befac42aa2ae909808549 (patch)
treebda7d95aa7b8defbe43dc09e344e25b724992932
parent0bd233e64210c6605e8a6ec1424fa81f9ea8a681 (diff)
downloaduhd-7bf6ddcb95518118a46befac42aa2ae909808549.tar.gz
uhd-7bf6ddcb95518118a46befac42aa2ae909808549.tar.bz2
uhd-7bf6ddcb95518118a46befac42aa2ae909808549.zip
examples: Add Rx/Tx stream args parameters to benchmark_rate
-rw-r--r--host/examples/benchmark_rate.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/host/examples/benchmark_rate.cpp b/host/examples/benchmark_rate.cpp
index dd67ebf3c..d1a296861 100644
--- a/host/examples/benchmark_rate.cpp
+++ b/host/examples/benchmark_rate.cpp
@@ -296,6 +296,7 @@ int UHD_SAFE_MAIN(int argc, char* argv[])
// variables to be set by po
std::string args;
std::string rx_subdev, tx_subdev;
+ std::string rx_stream_args, tx_stream_args;
double duration;
double rx_rate, tx_rate;
std::string rx_otw, tx_otw;
@@ -315,6 +316,8 @@ int UHD_SAFE_MAIN(int argc, char* argv[])
("duration", po::value<double>(&duration)->default_value(10.0), "duration for the test in seconds")
("rx_subdev", po::value<std::string>(&rx_subdev), "specify the device subdev for RX")
("tx_subdev", po::value<std::string>(&tx_subdev), "specify the device subdev for TX")
+ ("rx_stream_args", po::value<std::string>(&rx_stream_args)->default_value(""), "stream args for RX streamer")
+ ("tx_stream_args", po::value<std::string>(&tx_stream_args)->default_value(""), "stream args for TX streamer")
("rx_rate", po::value<double>(&rx_rate), "specify to perform a RX rate test (sps)")
("tx_rate", po::value<double>(&tx_rate), "specify to perform a TX rate test (sps)")
("rx_otw", po::value<std::string>(&rx_otw)->default_value("sc16"), "specify the over-the-wire sample mode for RX")
@@ -492,6 +495,7 @@ int UHD_SAFE_MAIN(int argc, char* argv[])
// create a receive streamer
uhd::stream_args_t stream_args(rx_cpu, rx_otw);
stream_args.channels = rx_channel_nums;
+ stream_args.args = uhd::device_addr_t(rx_stream_args);
uhd::rx_streamer::sptr rx_stream = usrp->get_rx_stream(stream_args);
auto rx_thread = thread_group.create_thread([=, &burst_timer_elapsed]() {
benchmark_rx_rate(
@@ -506,6 +510,7 @@ int UHD_SAFE_MAIN(int argc, char* argv[])
// create a transmit streamer
uhd::stream_args_t stream_args(tx_cpu, tx_otw);
stream_args.channels = tx_channel_nums;
+ stream_args.args = uhd::device_addr_t(tx_stream_args);
uhd::tx_streamer::sptr tx_stream = usrp->get_tx_stream(stream_args);
auto tx_thread = thread_group.create_thread([=, &burst_timer_elapsed]() {
benchmark_tx_rate(