Commit graph

48 commits

Author SHA1 Message Date
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
Martin Braun
10ff484ccb examples: Whitespace and other cleanup 2014-10-28 19:42:22 +01:00
Martin Braun
853901782f uhd: Added nicer error reporting to rx examples 2014-04-10 21:26:39 +02:00
Ben Hilburn
178ac3f1c9 Merging USRP X300 and X310 support!! 2014-02-04 11:04:07 -08: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
522bc87d9f uhd: fixed 8sc item32 converter on head/tail cases 2011-11-03 20:37:12 -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
Josh Blum
5c6c179689 usrp-e100: add ability to set/get default master clock rate from EEPROM
Mboard eeprom map class can parse the setting (4 byte float).
The clock control will try to set the eeprom rate if present,
otherwise or under failure condition, it sets the default.

Updated docs, example, and provided helpful verbose.
I would prefer that users burn the desired rate to the eeprom (and they may too).
2011-05-01 17:26:15 -07:00
Josh Blum
f7687f06cf uhd: created rx_multi_samples for multi-channel example 2011-03-11 20:30:04 -08:00
Josh Blum
cadafd4c3e uhd: cleanup/tweaks on timed samples examples 2011-03-11 16:22:20 -08:00
Josh Blum
6d744744d8 uhd: revert changes to rx_timed_samples 2011-03-10 14:47:58 -08:00
Josh Blum
09149bbf7d usrp1: safe destruction for usrp1 device 2011-03-10 14:37:34 -08:00
Josh Blum
2cb6092ddf usrp-e100: combined clkconfig and fpga downloader into usrp-e-utility, simplified code 2011-01-31 20:26:45 +00: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
261bb80d73 uhd: update copyright dates on host code 2011-01-13 16:22:07 -08:00
Josh Blum
4f28afe247 uhd: use double for seconds in example apps so we can do partial seconds 2011-01-12 14:03:25 -08:00
Josh Blum
dc9f22c9a7 uhd: added rx samples to udp example, cleaned up other examples, added gain options 2010-10-27 19:18:26 -07:00
Josh Blum
1625bcb413 uhd: added single usrp interface, added usrp1 properties to prop names 2010-09-20 16:59:44 -07:00
Josh Blum
f86c25317b uhd: removed remaining template stuff from vrt packet handler, also tweaked format in rx timed samples 2010-07-26 11:46:08 -07:00
Josh Blum
508af598a1 uhd: switch statements to handle error code, default md to error code none 2010-07-12 20:39:21 -07:00
Josh Blum
bf77d1f6e3 uhd: added error codes to rx metadata, switched examples to use
vrt packet handler fills in error codes and inspects non-data packet
2010-07-09 17:35:15 -07:00
Josh Blum
79c513d0b2 uhd: added dilv option for timed examples, also made tx timed example fragment 2010-07-07 13:06:02 -07:00
Josh Blum
11f2aa1ea0 uhd: replaced old send and recv with inline wrappers that take a single buffer and look more like the vectored send/recv 2010-07-05 13:49:00 -07:00
Josh Blum
6469d2419f uhd: filling in mimo usrp implementation, renamed get_name to get_pp_string for simple and mimo usrp 2010-07-05 13:45:16 -07:00
Josh Blum
51cb8da583 uhd: reworked time_spec_t to be more flexible: arithmetic, comparison operators...
Replaced nsecs with fractional seconds in units of seconds.
Replaced nsecs and secs members with public function members.
time_spec_t has a more diverse set of constructors and methods.
It can handle the cases where frac secs are greater than 1 second.
2010-06-24 20:29:11 -07:00
Josh Blum
fadd3a44a8 uhd: created benchmark rx example app
Made mods to time spec to support math operators.
2010-06-24 18:55:08 -07:00
Josh Blum
339aa3ccd4 uhd: working windows implementation of thread priority setting, added called to example apps 2010-06-16 19:18:06 -07:00
Josh Blum
71169b8e03 Added timeout error message to timed samples example.
Added try catch to recv helper because vrt unpack can throw.
2010-05-24 14:38:25 -07:00
Josh Blum
17c494b79a Added tx timed samples example.
Added called to device to get max samples per packet.
Removed device props that gave max samples per packet.
2010-05-18 14:26:43 -07:00
Josh Blum
eae0bec99b Created args string contructor for device address.
Using the args string for the find devices app.
Added documentation to simple usrp.
2010-04-20 12:05:33 -07:00
Josh Blum
d743784919 converted timespec to use nanoseconds for fractional part 2010-04-08 10:57:16 -07:00
Josh Blum
97496ace66 simplified the usage of dboard, dsp, and mboard proxies.
removed the dict structure for each, we are just going to have one.
2010-04-05 16:36:51 -07:00
Josh Blum
1cc8c6c964 paradigm shift for the dsp abstraction 2010-04-05 14:37:21 -07:00
Josh Blum
83bd55d639 extended stream cmd with mode enum, and extended fragment flags in metadata 2010-04-03 19:43:20 -07:00
Josh Blum
54e8b566f6 Moved usrp specific things into usrp directories and namespaces.
Renamed simple device to simple usrp (it was usrp specific).
Moved tune helper to usrp dir for same reason.
2010-04-01 16:01:46 -07:00
Josh Blum
91ef18021c moved props into usrp and multiple hpp files 2010-04-01 15:08:52 -07:00
Josh Blum
f9be69cae7 Added io type and otw type for describing types. 2010-03-30 14:07:19 -07:00
Josh Blum
52df9afd67 Split utils.hpp into subdir with multiple files.
static for static block and static instance (singleton)
assert for assertion and throwing related stuff
algorithm for my addons to std::algorithm (has)
and a new one, safe main, for having a main catch-all
2010-03-27 01:02:58 -07:00
Josh Blum
af586ae149 Overhaullllllled the way we do streaming. There is an odd bug where
a zero length command (now, no chain) used to stop the streaming.
Now it seems to do the reverse... must investigate.

Made all clock configuration into enums. The strings were painful
and there cant be that many variations that enums cant cover them.
The enums will make more sense to developers than mystery strings.
2010-03-25 18:36:16 -07:00
Josh Blum
24bd27b90d Reorganized apps dir into utils and examples dir.
The files get installed into the pkg data directory.
2010-03-23 20:44:50 -07:00
Renamed from host/apps/uhd_rx_timed_samples.cpp (Browse further)