Commit graph

26 commits

Author SHA1 Message Date
Martin Braun
e398d13d67 examples: Remove default --ref and --pps values
This changes the behaviour of the examples in a way that leaving
out the --ref argument will not force it to be 'internal'. Previously,
the following command:

    rx_samples_to_file --args type=xxx,clock_source=external

would still use the internal reference, because the default value for
--ref was internal, and no other value for --ref was provided. Even
worse, the following command:

    rx_samples_to_file --args \
        type=xxx,clock_source=external,time_source=external

might throw errors/warnings, because internal clock source plus external
time source is generally not supported, and the example would force the
clock source to be internal unless `--ref internal` was also provided.

For all cases that `clock_source` or `time_source` were not given as
a device argument, this is a no-op because `internal` is the default
value anyway.

In two examples, this includes minor code changes:
- In rfnoc_radio_loopback, if both --ref and --pps were given, we now
  use set_sync_source() to speed up setting the reference sources. On
  the N310/N300 series in particular, this saves a few seconds at
  initialization over the previous implementation (which set clock and
  time reference separately).
- In test_dboard_coercion, the code would fail without a default value
  for --ref, so we no longer require such a default value.
2023-05-19 08:52:20 -05:00
Martin Braun
8972efb734 examples: Fix tx_bursts bandwidth/freq/gain reporting
This example would not specify a channel when querying the actual
frequency/bandwidth/gain after setting it. When using the --channels
options like this:

    tx_bursts --channels 1 --freq 1e9 [...]

...it would request the frequency of 1 GHz on channel 1, then query the
frequency on channel 0 when reporting the "actual" frequency.

Also removes some boost::format().
2021-12-16 09:18:47 -06:00
natetemple
1996adfc49 Examples: tx_bursts add subdev, ref, lo-offset, bw options 2019-11-22 20:38:27 -08:00
Ciro Nishiguchi
60a70f7142 examples: remove thread priority elevation
Remove UHD call to elevate thread priority to realtime. Setting all
threads to the same realtime priority can cause the threads to not share
access to the network interface fairly, which adversely affects
operation of the worker threads in UHD.
2019-10-22 16:18:46 -07:00
Brent Stapleton
967be2a4e8 uhd: mpm: apply clang-format to all files
Applying formatting changes to all .cpp and .hpp files in the following
directories:
```
find host/examples/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/tests/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/lib/usrp/dboard/neon/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/lib/usrp/dboard/magnesium/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/lib/usrp/device3/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/lib/usrp/mpmd/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/lib/usrp/x300/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/utils/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find mpm/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
```

Also formatted host/include/, except Cpp03 was used as a the language
standard instead of Cpp11.
```
sed -i 's/ Cpp11/ Cpp03/g' .clang-format
find host/include/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
```

Formatting style was designated by the .clang-format file.
2019-01-16 11:40:23 -08:00
Brent Stapleton
601e0ed87b examples: utils: skip formatting program options
Turning off clang formatting around the program option declarations.
clang-format makes them looks bad an unreadable because it thinks the
options are function calls or something.
2019-01-16 11:40:23 -08:00
Martin Braun
ae5211d71d uhd: Update license headers
All copyright is now attributed to "Ettus Research, a National
Instruments company".

SPDX headers were also updated to latest version 3.0.
2018-02-19 16:54:52 -08:00
Martin Braun
4f948e2c8b Move all license headers to SPDX format. 2017-12-22 10:45:51 -08:00
Andrej Rode
c33928d2bb utils: add set_thread_name API call, move thread_priority to thread 2017-06-29 13:43:05 -07:00
Martin Braun
47cdd6319c uhd: Replaced many lexical_cast with appropriate C++11 equivalents 2017-06-29 13:40:07 -07:00
michael-west
7dd34d09d9 examples: tx_bursts fixes
- Wait for ACKs for all channels
- Put EOB on last data packet instead of empty packet
- Exit with failure when send times out and SIGINT has been received
2016-08-02 17:35:48 -07:00
Martin Braun
10ff484ccb examples: Whitespace and other cleanup 2014-10-28 19:42:22 +01:00
Ben Hilburn
ff1546f813 Pushing the bulk of UHD-3.7.0 code. 2014-02-14 12:05:07 -08:00
Nicholas Corgan
6cdc9cdd5b 120 MHz daughterboard support, Integer-N tuning, ADF435x code consolidation
* Added support for new CBX-120, SBX-120, and WBX-120 daughterboards
* Added implementation of Integer-N tuning for all CBX, SBX, and WBX daughterboards
* Added --int-n option to examples to show how to use Integer-N tuning API
* Removed duplicate ADF4350/ADF4351 code and moved it to common/adf435x_common.cpp
2014-01-24 07:17:42 -08:00
Nicholas Corgan
96e50aebb7 examples: changed examples that force usage of all channels to allow user to input which channels to use 2013-08-26 16:04:18 -07:00
Josh Blum
c464a63e87 uhd: added new calls to streamer object + support work
* The transmit streamer gives access to the async msg queue.
* The receive streamer gives access to the issue stream cmd.
* Supporting usrp implementation files updated.
* Example applications updated to use this API.
2013-07-15 15:44:42 -07:00
Moritz Fischer
171e46cebe examples & utils: return EXIT_FAILURE and EXIT_SUCCESS respectively
instead of 0 and 1.
2012-10-26 14:00:29 -07:00
Josh Blum
7bcaacdbc7 examples: fix tx bursts so we only set EOB at the end 2012-05-30 12:51:26 -07:00
Nick Foster
6d53b7eb4b tx_bursts: set EOB on nsamps <= spb 2012-03-16 13:59:46 -07:00
Josh Blum
fac15db5d7 uhd: renamed some of the stream types and functions 2011-11-03 20:37:11 -07:00
Josh Blum
a629bbe7e3 uhd: updated examples to use new streamer interface 2011-11-03 20:37:10 -07:00
Nick Foster
db6fa3812a tx_bursts: minor change 2011-05-27 12:46:52 -07:00
Nick Foster
5025104a6d tx_bursts: optional repeat 2011-05-27 12:32:30 -07:00
Nick Foster
0bee80caee minor change to tx_bursts 2011-05-26 17:13:18 -07:00
Nick Foster
39bfc25fc3 add gain to tx burst app 2011-05-26 16:50:31 -07:00
Nick Foster
202ae92825 added tx_bursts MIMO burst transmit test 2011-05-26 14:52:12 -07:00