Commit graph

60 commits

Author SHA1 Message Date
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
Derek Kozel
8027df7a22 examples: Improved error message in tx_waveforms
Non-CONST type waveforms require a non-zero wave freq
2019-01-14 10:24:08 -08:00
natetemple
a476cba5f5 Examples: Add lo-offset to tx_waveforms 2019-01-10 09:47:33 -08:00
Brent Stapleton
aa1ec63537 examples: optimize tx_waveforms memory allocations
Move filling the TX buffer outside the critical path. Now, we pre-fill
the TX buffer before entering the send loop (and before setting the
TX stream time), and fill the TX buffer after calling send() (for the
next iteration).
2019-01-03 09:20:18 -08:00
Brent Stapleton
7d34f4d2c8 examples: formatting in tx_waveforms
- Format `if` statements to multiple lines
- Add quick comment on the exit checks
2019-01-03 09:20:18 -08:00
Sugandha Gupta
c661c352ca examples: Select subdev spec before setting channels 2018-06-12 06:48:59 -07:00
Martin Braun
0303f1ed55 lib: Purge all references to boost::this_thread::sleep()
Replace with std::this_thread::sleep_for().
2018-04-30 17:10:26 -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
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
Andrej Rode
26cc20847c uhd: replace BOOST_FOREACH with C++11 range-based for loop
Note: This is the first commit that uses for-range, and range-based
for-loops are now usable for UHD development.
2017-02-10 16:44:33 -08:00
Martin Braun
62898fc131 examples: tx_waveforms was always checking lo_lock on channel 0, regardless of channel used 2016-08-11 09:59:24 -07:00
Paul David
2bdc0e2e31 examples: added options for specifying number of samples to transmit 2016-04-04 16:57:59 -07:00
michael-west
0d290169f2 UHD: Add pps source option to tx_waveforms example 2015-09-01 13:33:16 -07:00
Martin Braun
7c6bc34f62 Merge branch 'maint'
Conflicts:
	fpga-src
	host/CMakeLists.txt
	host/cmake/Modules/UHDVersion.cmake
	host/lib/usrp/b200/b200_impl.hpp
	host/lib/usrp/e300/e300_fpga_defs.hpp
	host/lib/usrp/x300/x300_fw_common.h
2015-07-14 14:51:14 -07:00
Martin Braun
1c185f8478 examples: Improved tx_waveform multi-channel sync 2015-07-14 12:19:41 -07:00
Martin Braun
84e1e3c9ce Merge branch 'maint'
Conflicts:
	host/examples/rx_samples_to_file.cpp
2014-12-15 11:27:02 +01: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
Martin Braun
10ff484ccb examples: Whitespace and other cleanup 2014-10-28 19:42:22 +01:00
Moritz Fischer
198a0e2d9c examples: Minor change to tx_waveforms example.
Signed-off-by: Moritz Fischer <moritz@ettus.com>
2014-10-07 12:09:37 +02: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
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
d7a3534611 uhd: added setup sleep to tx waveforms 2012-03-23 14:36:56 -07:00
Josh Blum
4a27f6e4bd uhd: add over-the-wire option to tx waveforms 2012-02-12 14:38:35 -08:00
Josh Blum
1b2108274a uhd: typo fix in tx waveforms options 2012-01-03 11:22:42 -08:00
Josh Blum
74106084ed uhd: simplification for tx waveforms 2011-11-11 11:55:04 -08:00
Josh Blum
f152764e4b uhd: updated ref sensor checks for new option names 2011-11-10 10:27:54 -08:00
Josh Blum
c29adad91e uhd: performance improvement for tx waveforms using integer table lookup 2011-11-10 10:23:05 -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
f3afd2eb94 uhd: performance speed up for tx waveforms, no iterative libmath per sample 2011-11-06 14:53:52 -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
406ddc022c uhd: specify range on tx_waveforms --ampl 2011-10-10 17:48:46 -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
72de17aaf6 uhd: many tweaks for tx_waveforms including performance 2011-06-07 10:05:31 -07:00
Nick Foster
2374f70826 tx_waveforms: don't have to set time_spec for every pkt in the stream 2011-05-26 14:08:16 -07:00
Nick Foster
5208cc8b60 tx_waveform: no SOB for continuous streaming 2011-05-26 13:48:25 -07:00
Nick Foster
c90282da8e UHD: make tx_waveforms MIMO-capable 2011-05-26 13:09:37 -07:00
Josh Blum
232a398f9d uhd: added missing set_tx_antenna() in tx waveforms 2011-03-15 12:30:20 -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
fb7e8a09a5 uhd: replaced std::vector<type> for buffer arguments in send/recv
Created new type ref_vector for representing a vector of pointers.
Can be created from std::vector or a pointer.

Removes the convenience constrcutors for send/recv, its not needed.

Removes malloc/free overhead when using send/recv with pointer.
2011-02-09 19:01:28 -08:00
Josh Blum
67bba00825 uhd: replaced sdev and single usrp in examples with usrp and multi usrp 2011-01-31 18:01:27 -08:00
Josh Blum
b94d4776cc uhd: use doubles as the theta when calculating the sine table 2011-01-21 10:38:27 -08:00