Commit graph

32 commits

Author SHA1 Message Date
Samuel O'Brien
84c33194ce example: Check for failure in tx_samples_from_file
I was using this example for testing with the simulator. If there is a
flow control failure, the original example would just silently finish,
outputing the message "Done!" (Not even printing a timeout message).

This commit asserts that the number of samples sent is equal to the
number of samples provided.

Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
2020-07-31 15:09:33 -05:00
Martin Braun
2ed94af772 uhd: Remove deprecated objects and methods
This removes the following symbols:
- otw_type_t
- clock_config_t
- Any functions that use those symbols
- Non-standard args from examples (e.g., --total-time is deprecated in
  favour of --duration)
2019-11-26 11:49:08 -08:00
natetemple
d3e1d6e9be Examples: wrap up ref setting with option check 2019-11-24 16:56: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
natetemple
b5e80dfb2a Examples: update lo-offset naming in tx from file
Update tx_samples_from_file lo-offset naming convention
2019-01-10 09:47:33 -08:00
Martin Braun
0e909a2a9d examples: Remove superfluous sleep 2018-04-18 10:11:06 -07:00
Martin Braun
305d0e79e2 examples: Fix some minor compiler warnings
All warnings reported by MSVC. Mostly related to narrowing conversions.
2018-02-19 17:01:40 -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
eaed9d5ac5 examples: Fix bandwidth unit (MHz vs. Hz) in tx_samples_from_file 2018-01-15 09:56:32 -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
Ashish Chaudhari
4fc9efd1f5 examples: Added channel param for samps to/from file example
- Also, fixed an issue with the --repeat option in tx_samples_from_file
2017-05-24 10:22:33 -07:00
Nicholas Corgan
1200721b69 Warning fixes
* CMake now not applying C++ flags to C files
* GCC 4.4: anti-aliasing rules
* MSVC: narrowing, differences in subclass function parameters
* Clang: uninitialized variables
2015-03-27 09:35:29 -07:00
Marcus Müller
125820ea68 host/examples: rm'ed refs to d'boards, IF freq.
To reflect a reality where some USRPs don't have daughterboards,
and set_xx_bandwidth doesn't necessarily set an /IF/ bandwidth.
2014-12-12 11:37:53 +01:00
Ben Hilburn
df4cf6d6ec Fixing help text for --ref argument in some examples. Reported by Marcus
Mueller.
2014-06-30 16:00:06 -07:00
Ben Hilburn
ff1546f813 Pushing the bulk of UHD-3.7.0 code. 2014-02-14 12:05:07 -08:00
Ben Hilburn
178ac3f1c9 Merging USRP X300 and X310 support!! 2014-02-04 11:04: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
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
Nicholas Corgan
d9829759d4 examples: tx_samples_from_file can now repeatedly transmit file with optional delays between transmissions 2012-10-10 13:29:43 -07:00
Josh Blum
d9157133fb uhd: added wire format option for tx samples example 2012-06-18 10:07:59 -07:00
Josh Blum
f152764e4b uhd: updated ref sensor checks for new option names 2011-11-10 10:27:54 -08:00
Josh Blum
7c503ad1fa uhd: modify examples to use new time/clock source API 2011-11-07 14:34:40 -08: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
Josh Blum
aa908fafa2 uhd: help messages for user on rx samples to file 2011-10-08 11:48:40 -07:00
Jason Abele
539c9b5a55 Updates to example apps
Add --ref option to specify mboard clock reference source
    Add check for lock to mboard clock reference (where applicable)
    Add check of daughterboard LO lock detect (where applicable)
2011-09-21 16:03:46 -07:00
Josh Blum
9b2ae7e077 uhd: added continuous streaming and new options to tx_waveforms 2011-03-11 12:17:46 -08:00
Josh Blum
60db6edf52 uhd: a lot of tweaking, new parameters, and sig handler for to/from file examples 2011-03-11 12:02:59 -08:00
Josh Blum
1ab3803180 uhd: created tx_samples_from_file.cpp and added to rx_samples_to_file.cpp 2011-03-11 11:14:30 -08:00