Commit graph

76 commits

Author SHA1 Message Date
Martin Braun
ebd5dd03cf Apply clang-formatting to all C/C++ files
- Used clang-format version 14
- Ran ./tools/clang-formatter.sh apply
2023-08-07 15:35:56 -05:00
Martin Braun
107a49c0c2 host: Update code base using clang-tidy
The checks from the new clang-tidy file are applied to the source tree
using:

$ find . -name "*.cpp" | sort -u | xargs \
    --max-procs 8 --max-args 1 clang-tidy --format-style=file \
    --fix -p /path/to/compile_commands.json
2021-03-04 08:07:26 -06:00
Martin Braun
876d4150aa uhd: Apply clang-format against all .cpp and .hpp files in host/
Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of
files that clang-format gets applied against.
2020-03-03 08:51:32 -06:00
Martin Braun
72b45bb8de uhd: Remove all usages of boost::tuple and friends
This replaces all of the following with standard C++ features:

- boost::tuple
- boost::make_tuple
- boost::tuple::get
- #include <boost/tuple/tuple.hpp>

All usages were replaced with search-and-replace scripts (the usages of
get could be automatically replaced with a vim macro, the rest was
straightforward search-and-replace).
2019-11-26 12:21:32 -08:00
Martin Braun
d3a16b7022 uhd: Replace all occurrences of boost::bind with std::bind
Note: Replacing everything with a lambda would be even better, but that
can't be easily scripted so we'll do this as a first step to reduce the
Boost footprint.

This also removes occurences of #include <boost/bind.hpp>, and makes
sure all usages of std::bind have an #include <functional>. clang-format
wasn't always applied to minimize the changeset in this commit, however,
it was applied to the blocks of #includes.

Due to conflicts with other Boost libraries, the placeholders _1, _2,
etc. could not be directly used, but had to be explicitly called out
(as std::placeholders::_1, etc.). This makes the use of std::bind even
uglier, which serves as another reminder that using std::bind (and even
more so, boost::bind) should be avoided.

nirio/rpc/rpc_client.cpp still contains a reference to boost::bind. It
was not possible to remove it by simply doing a search and replace, so
it will be removed in a separate commit.
2019-11-26 12:21:32 -08:00
Martin Braun
5d9a7c92d3 lib: Purge use of boost::assign, except for uhd::dict
Replaced with initialization lists.
Note: uhd::dict does not work with initializer lists without making
changes to said data structure. This commit has no functional changes,
so keeping the boost::assigns for uhd::dict.
2018-05-02 17:01:21 -07: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
michael-west
298a13ac3d UBX: Add support for UBX-TDD 2017-12-07 13:32:26 -08:00
michael-west
c0057e35b8 UHD: Add eeprom info to dboard_base 2017-12-07 13:32:26 -08:00
trungnob
b431866a5e log: Remove logging out of any UHD_STATIC_BLOCK.
Window DLL loading is causing deadlock due to thread creation and
synchronization of logging system; therefore, we want to remove it for
now.
2017-05-20 21:21:59 -07:00
Andrej Rode
21aad77c9c utils: introduce new logging API and remove msg API 2017-02-20 17:13:15 -08: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
Derek Kozel
f360059b99 dboard manager: Allow deferring dboard initialization 2016-08-09 10:21:53 -07:00
Ashish Chaudhari
261ae74f8e dboards: Added APIs to get RX and TX frontend names 2016-02-26 14:36:26 -08:00
Ashish Chaudhari
6db9ac785c dboards: Added ability to register a per-dboard container class
- The typical dboard classes are actually "subdev" classes i.e.
  there is one instance per dboard subdev (front-end). This makes
  it hard to implement shared functionality between multiple
  front-ends.
- This changes adds the ability to create a container class which
  is created per group of subdevs and each subdev gets a pointer
  to the container class for cross linkage.
2016-02-26 14:23:40 -08:00
Ashish Chaudhari
c37ab6091c db_manager: Cleaned up iface pointer in subtree after error 2016-02-18 09:07:07 -08:00
Ashish Chaudhari
b263800437 dboard: Added restricted dboard registration capability
- Moved dboard iface initialization to dboard_manager
- Added a restricted register function. Restricted dboards
  don't expose their control iface in the property tree
2016-02-16 16:19:01 -08:00
Josh Blum
1afac89b4a usrp: db manager tweak for contructor throwing 2012-01-11 09:08:40 -08:00
Josh Blum
c5def1feff uhd: typo fix for the error print 2011-12-15 14:22:55 -08:00
Josh Blum
bd132be3d3 usrp: better error message when dboard fails in init 2011-12-15 10:12:33 -08:00
Josh Blum
d9035414a2 usrp: work on dboard code to use subtrees to populate frontend props 2011-11-07 11:20:04 -08:00
Josh Blum
93aee13653 usrp: dboard sensors fix, populate for tvrx, and should be empty on basics/unknown 2011-08-18 10:11:57 -07:00
Josh Blum
aa6b340f43 uhd: added subtree capability to property tree 2011-07-08 10:08:43 -07:00
Josh Blum
d38757f465 usrp: deleted a bunch on obsoleted files in usrp directory 2011-06-29 13:23:18 -07:00
Josh Blum
35a0bce9f0 uhd: make sure things are initialized 2011-06-29 12:20:19 -07:00
Josh Blum
54b8be72fd uhd: properties tweaks and docs 2011-06-29 11:26:33 -07:00
Josh Blum
8308fb0eef usrp: got probe working w/ the new property tree 2011-06-28 16:05:08 -07:00
Josh Blum
4888233252 uhd: re-work to make the properties easier to use 2011-06-28 11:11:04 -07:00
Josh Blum
5aab802b60 usrp: populate a tree from a subdev 2011-06-27 20:26:52 -07:00
Josh Blum
09cf8eb164 uhd: added more SAFE_CALL macros to hardware wrapper dtors
And removed the calls on the sptr resets (not needed now).
2011-06-10 15:23:24 -07:00
Josh Blum
e709e4d365 uhd: added safe call on a few dboard related deconstructors 2011-06-10 13:11:22 -07:00
Josh Blum
7f01386f63 uhd: replaced warning post with calls to UHD_MSG(warning)
The message api can support warnings, error, and status messages.
The default handler is to stdio, but the user can change this.
2011-05-04 18:36:10 -07:00
Josh Blum
c8dca30d72 uhd: replaced many conditional prints with UHD_LOG usage 2011-05-04 15:27:11 -07:00
Josh Blum
40feb62b3d usrp: work on dboard_manager to register an ID for multiple xcvr combinations 2011-04-26 14:15:16 -07:00
Josh Blum
4357f5d3c0 uhd: replaced instanced of std::exception with the uhd exceptions 2011-02-24 16:35:29 -08:00
Josh Blum
16f08844d7 uhd: renamed the assert header to assert has
only the assert has implementation is in this header

uhd assert throw moved to the exception header

updated code base includes to match
2011-02-24 14:54:24 -08:00
Josh Blum
76ebda895c uhd: switch dboard id prop to whole eeprom struct
modified implementation code and burner app

also made dboard manager use safe constructor that will use none ids if construction fails
2011-02-22 11:55:54 -08:00
Josh Blum
9a2e26e500 uhd: added read-back calls to dboard iface gpio settings, and optional mask 2010-11-26 23:27:53 -05:00
Josh Blum
cea3d05095 uhd: replaced print warning with a post warning call and registry
renamed print warning calls in the implementation

fixed issue with dict::pop so it now works even if the value is not comparable
2010-10-26 14:14:01 -07:00
Josh Blum
c2ec8c143e usrp: use a dash as the gain name prefix separator, removed RX/TX auto suffix for XCVR board cnames 2010-10-20 18:40:36 -07:00
Josh Blum
d96b2e7587 usrp: use the dboard id to prefix the subdev gain group names 2010-10-20 17:41:59 -07:00
Josh Blum
a4f8ad59b2 usrp: added subdev enabled property
the dboard manager will disable all subdevs at startup and shutdown

setting the subdev spec will enable only the subdevs in use

all dboards are currently implemented as always enabled

nothing tested
2010-09-30 11:05:33 -07:00
Josh Blum
852f5c5f7b dboard: better warnings for invalid IDs and invalid ID combinations 2010-09-28 10:21:11 -07:00
Josh Blum
d769ff8cc3 usrp: removed gain handler code (replaced by gain group) 2010-07-27 15:45:49 -07:00
Josh Blum
f1fe66acd4 usrp: changed opaque pointer implementation for dboard contructor args 2010-07-22 10:26:48 -07:00
Josh Blum
e3058c022e uhd: added checking for xcvr dbids, added unknown dboard rx and tx constructors (for bad dbids or combinations) 2010-06-18 17:20:46 -07:00
Josh Blum
16335c1082 uhd: added dboard manager call to register xcvr board, implemented in xcvr dboard code 2010-06-18 16:39:45 -07:00
Josh Blum
33193a06c1 replaced the assert falses with an invalid code path exception 2010-06-02 15:49:53 -07:00
Josh Blum
39943a5b0c Added support to set GPIO pins from dboard interface:
write gpio and set pin control (atr or gpio)

Added property to get dboard interface from the dboard obj.
2010-05-24 16:31:23 -07:00