Commit graph

78 commits

Author SHA1 Message Date
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
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
67a96646d0 rfx: Fix calculation of prescaler and band select
The code was broken when converting from BOOST_FOREACH to a range-based
for loop.
Without this fix, the board initialization would crash with an error
like this:

[ERROR] [DBMGR] The daughterboard manager encountered a recoverable
error in init.
Loading the "unknown" daughterboard implementations to continue.
The daughterboard cannot operate until this error is resolved.
LookupError: KeyError: key "0" not found in dict(i,
N14adf4360_regs_t17prescaler_value_tE)
2019-11-22 21:13:58 -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
Martin Braun
282d57591b logging: Demoted more DEBUG to TRACE 2017-04-06 23:34:22 -07:00
Martin Braun
af75b87e51 logging: Demoted a number of DEBUG messages to TRACE 2017-04-05 23:18:08 -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
Martin Braun
99c2730bc9 Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width types)
- Also removes all references to boost/cstdint.hpp and replaces it with
  stdint.h (The 'correct' replacement would be <cstdint>, but not all of our
  compilers support that).
2016-11-08 08:02:22 -08:00
Ashish Chaudhari
c03506fedd dboard: Made dboard class dtors virtual
- Interface and all base classes have virtual destructors
- Wrapped UBX dtor in UHD_SAFE_CALL
2016-02-26 14:23:34 -08:00
Ashish Chaudhari
27a08ccddc prop_tree: Multiple API enhancements to uhd::property
- Added desired and coerced values and accessors to property
- Added support to register desired subscribers
- set APIs don't reallocate storage for a property value
- Renamed callback method registration APIs
- Registering 2 coercers or publishers for a property will throw
- Registering a coercer and a publisher for the same property will throw
2016-02-11 14:36:20 -08:00
Ashish Chaudhari
e4c9656ac2 usrp3: Added new GPIO ATR 3000 core
- Refactored GPIO ATR definitions
- Added new 3000 core with a more efficient API
- Added a separate db_gpio_atr core to control the ATR bus
- Ported b2xx, e3xx and x3xx to the new core
- Minor cleanup
2015-09-29 15:53:43 -07:00
Ben Hilburn
c8454c9f6a Rectifying a great embarassement in UHD. %s/Mhz/MHz. 2014-10-07 13:58:05 +02:00
Josh Blum
f8bf633965 RFX: added support for calibration utils
Special CAL RX antenna rule: keep mixer enabled to reduce transients.
0 dB gains settings for RX and TX to deal with RFX sensitivity range.
2012-06-12 13:36:15 -07:00
Josh Blum
4378ad4584 Merge branch 'master' into next 2012-04-21 11:09:58 -07:00
Nicholas Corgan
a6ec6e2544 mboard id's are now more concise (codenames are separated, for example), and dboard subdev names are more descriptive (RFX RX is now RFX1200 RX, etc) 2012-04-20 14:21:17 -07:00
Josh Blum
20ea7b7bc9 dboard: updated timed sync stuff for wbx* sbx* 2012-04-20 13:37:04 -07:00
Jason Abele
715fd03832 Fix RSSI measurement
Improve incorrect calculation in XCVR
    Remove RFX rssi sensor due to limited dynamic range giving strange
        results
2012-03-11 15:53:59 -07:00
Jason Abele
4b9d692f56 Updates to accommodate loopback calibration mode
Added CAL antenna to WBX, SBX and RFX
2011-11-11 10:22:50 -08:00
Jason Abele
a445f30003 Port of daughterboards from wax to new property trees
Ported:
    Basic/LF
    Unknown
    XCVR
    DBSRX
    DBSRX2
    TVRX
    TVRX2
2011-11-07 11:21:24 -08:00
Josh Blum
ef256d2f6c rfx: setup frontend property tree for rfx dboard 2011-11-07 11:20:04 -08:00
Josh Blum
d38757f465 usrp: deleted a bunch on obsoleted files in usrp directory 2011-06-29 13:23:18 -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
0de4f165e9 usrp: replaced conditional dboard debug prints w/ UHD_LOGV(often) 2011-05-04 14:34:49 -07:00
Jason Abele
cbf580374d Added RSSI sensor for RFX series (not rfx400) 2011-05-02 15:38:55 -07:00
Josh Blum
546b5b8829 rfx: reverted change, now prefer R divider to clock divider
There seems to be some issue using lower clock rates, at least on E100,
I am reverting this now until I can figure out why it happens,
or until I can find a more stable way to offer this feature.
2011-04-16 17:51:05 +01:00
Josh Blum
1304340f26 rfx: changes to pick from the dboard clock rates and use R=1 2011-04-18 10:58:50 -07:00
Jason Abele
f64dad9d95 Correct RFX400 div2 logic, makes RFX400 TX work 2011-03-31 12:36:42 -07:00
Josh Blum
1526889803 uhd: switch algorithm namespace to uhd 2011-02-24 17:28:10 -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
557d62ee64 Merge branch 'sensors' into dboard_serial 2011-02-22 10:59:21 -08:00
Jason Abele
7d00269ff9 Make RFX400 work in UHD
RFX400 POWER_IO needs to be pulled up (pull down for other RFX)
    RFX400 RX Mixer has div2 built in, so no output div2 for RFX400 RX
2011-02-16 12:01:38 -08:00
Josh Blum
9de6f36bc5 usrp: implement sensors in all the dboards, deprecated read rssi and get lo locked 2011-02-11 18:43:20 -08:00
Josh Blum
261bb80d73 uhd: update copyright dates on host code 2011-01-13 16:22:07 -08:00
Josh Blum
395bbbbc11 uhd: replace all the instances of float not pertaining to io types with double, simplifies life 2011-01-11 19:46:45 -08:00
Josh Blum
b08ac6273f uhd: removed windows warnings, added string formatting in usrp-n 2010-11-11 19:13:22 -08:00
Josh Blum
775383e635 uhd: added meta-range clip and implemented in dboards, fixed step calculation 2010-11-10 19:29:06 -08:00
Josh Blum
08dfff3798 uhd: created a meta range that is a range of ranges for gains and freqs
created a templated range that that holds a start, stop, and step

created a meta-range template that is a vector of ranges
meta-range can calculate the overall start, stop, step
or be indexed to get at components

replaced instances of range.min, max, step with the functions
start() stop() and step()

the xcvr frequency range is now expressed in as two ranges
(have to fix its clip function though)
2010-11-10 19:29:06 -08:00
Jason Abele
6a3e499f58 Fix Bandwidth for IQ subdevs on Basic/LF
Additional typo cleanup and fix WBX bandwidth
2010-10-28 18:14:35 -07: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
Jason Abele
bb82453a77 Added bandwidth property to all daughterboards
Updated existing bandwidth property to reflect double-sided
    bandwidth rather than lowpass bandwidth
2010-10-25 16:47:07 -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
98ba0cc067 uhd: extract named prop returns a named prop (not a tuple)
simplifies the code after the property set/get declaration
2010-08-15 10:51:25 -07:00
Jason Abele
94e7cec66a Propogate gain range into RX pga0 helper for RFX boards 2010-08-02 17:40:30 -07:00
Jason Abele
4220097f99 Fixes gain range for rfx400 vs other rfx 2010-08-02 12:35:36 -07:00
Josh Blum
9a9ca6dfad uhd: work on tune logic, and subdev connection logic 2010-07-16 16:51:30 -07:00
Josh Blum
2a3d0e653e usrp: removed spectrum inverted property from subdev code and tune helper (it wasnt used) 2010-07-16 16:51:30 -07:00
Josh Blum
2d7c3f4cc3 Merge branch 'burn_dbid' into pre_merge 2010-06-18 17:24:39 -07:00