diff options
author | Josh Blum <josh@joshknows.com> | 2012-02-12 14:38:35 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-02-12 14:38:35 -0800 |
commit | 4a27f6e4bdad5e4de743e77f0a998dbe1e852cf0 (patch) | |
tree | 9a9b6e463a7f3c0cdf10bd0eef918f3689da99b4 | |
parent | 8442ea5e2cfec89db6e58736a969da2842734631 (diff) | |
download | uhd-4a27f6e4bdad5e4de743e77f0a998dbe1e852cf0.tar.gz uhd-4a27f6e4bdad5e4de743e77f0a998dbe1e852cf0.tar.bz2 uhd-4a27f6e4bdad5e4de743e77f0a998dbe1e852cf0.zip |
uhd: add over-the-wire option to tx waveforms
-rw-r--r-- | host/examples/tx_waveforms.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/host/examples/tx_waveforms.cpp b/host/examples/tx_waveforms.cpp index 39f70aec6..6a377fdac 100644 --- a/host/examples/tx_waveforms.cpp +++ b/host/examples/tx_waveforms.cpp @@ -90,7 +90,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ uhd::set_thread_priority_safe(); //variables to be set by po - std::string args, wave_type, ant, subdev, ref; + std::string args, wave_type, ant, subdev, ref, otw; size_t spb; double rate, freq, gain, wave_freq, bw; float ampl; @@ -111,6 +111,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("wave-type", po::value<std::string>(&wave_type)->default_value("CONST"), "waveform type (CONST, SQUARE, RAMP, SINE)") ("wave-freq", po::value<double>(&wave_freq)->default_value(0), "waveform frequency in Hz") ("ref", po::value<std::string>(&ref)->default_value("internal"), "clock reference (internal, external, mimo)") + ("otw", po::value<std::string>(&otw)->default_value("sc16"), "specify the over-the-wire sample mode") ; po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); @@ -193,7 +194,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //create a transmit streamer //linearly map channels (index0 = channel0, index1 = channel1, ...) - uhd::stream_args_t stream_args("fc32"); + uhd::stream_args_t stream_args("fc32", otw); for (size_t chan = 0; chan < usrp->get_tx_num_channels(); chan++) stream_args.channels.push_back(chan); //linear mapping uhd::tx_streamer::sptr tx_stream = usrp->get_tx_stream(stream_args); |