| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
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
Note: This is the same procedure as 107a49c0, but applied to all the new
code since then.
|
|
|
|
|
| |
- Remove unused const
- Fix includes to IWYU and clang-format order
|
| |
|
|
|
|
| |
This fixes some clang warnings.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is substantially the same as 7b86a47, but implemented in a ninja
supported way. ninja doesn't allow for arguments, so this uses an environment
variable. This is compatible with both make and ninja. The only change
from the calling point of view is you must set the environment variable
before calling "make test_[devicetype]" instead of after as an arg.
This allows running devtests for a single device instead of all connected devices
or selecting a specific network interface.
Set the additional device arguments with the EXTRA_DEV_ARGS variable.
This can be set as an environment variable or on the command line.
For example: EXTRA_DEV_ARGS=addr=192.168.30.2 make test_x3x0
Also-by: Matthew Crymble <matthew.crymble@ni.com>
Signed-off-by: Steven Koo <steven.koo@ni.com>
|
|
|
|
|
| |
This reverts commit 7b86a47bf7143df1cac252602e3c9ddbdd871d90.
This was causing issues when building UHD with ninja
|
|
|
|
| |
Using 12.5 MS/s exceeded the maximum throughput when using 4 channels over 1 GbE
|
|
|
|
|
|
|
|
|
| |
This allows running devtests for a single device instead of all connected devices
or selecting a specific network interface.
Set the additional device arguments with the EXTRA_DEV_ARGS variable.
This can be set as an environment variable or on the command line.
For example: make test_x3x0 EXTRA_DEV_ARGS=addr=192.168.30.2
|
|
|
|
|
|
| |
These rf_control interfaces allow easier implementation of
radio controls as well as allowing easier sharing of code
for implementing e.g. gain_profile.
|
|
|
|
|
|
|
|
|
| |
This gives us type-safety, as well as allowing us to create unit tests for
RFNoC radio_controls without having to create actual RPC servers and clients
in the unit tests.
This change also fixes a bug in mpmd_mb_controller::set_sync_source, where
it was calling the wrong MPM function.
|
|
|
|
|
|
|
|
|
|
| |
This change reverts cb9329a681552e6ac6277d16e1627afcbb23e637.
The type checking is causing some conversion issues on clang/macos.
The type_index checking doesn't work correctly across shared
libraries and should not be relied on to verify type, since it can
vary from compiler to compiler.
Signed-off-by: Steven Koo <steven.koo@ni.com>
|
|
|
|
|
|
|
| |
If the unittests are invoked with an extra argument -x, an XML report
is generated.
This depends on the python module unittest-xml-reporting (aka. xmlrunner).
|
| |
|
|
|
|
|
|
|
|
|
| |
This allows the image downloader to download files from restricted sources
using HTTP basic auth, specifying the credentials in the UHD_IMAGES_USER and
UHD_IMAGES_PASSWORD environment variables:
```
UHD_IMAGES_USER=lane UHD_IMAGES_PASSWORD=MyS3cretPassword uhd_images_downloader.py
```
|
| |
|
|
|
|
|
| |
Boost 1.67 will fail to build some tests that include mock_transport.hpp
if an additional include is missing.
|
|
|
|
|
|
| |
Increases the supported memory sizes in software to 2^32 and beyond.
Signed-off-by: mattprost <matt.prost@ni.com>
|
|
|
|
|
|
|
|
|
| |
- update_fbs.py would use git directly, instead of the requested git
executable
- There are other corner cases for the git executable detection, which
are now all captured under a more general exception type
Credit to Christopher Friedt for pointing out the original issue.
|
|
|
|
|
|
| |
Windows requires the command 'python' to prepend calls to .py files.
This change moves the path to multi_usrp_test.py to an argument on
Windows.
|
|
|
|
|
|
| |
M_PI may not exist if _USE_MATH_DEFINES isn't defined before the
first include of math.h or cmath on Windows. This changes avoids the
issue all together by defining our own PI.
|
| |
|
|
|
|
| |
Filter for e3x0 no longer matches e31x devices. Switch to e3xx.
|
|
|
|
| |
Signed-off-by: michael-west <michael.west@ettus.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Transports were not disconnecting their links from the I/O service upon
destruction, leaving behind inaccessible send and recv links used by
nothing. This led to I/O errors after creating several transports.
Added callbacks to transports to automatically disconnect their links
from the I/O service when the transport is destroyed. Updated all
callers to supply a disconnect callback.
Signed-off-by: michael-west <michael.west@ettus.com>
|
|
|
|
| |
Signed-off-by: mattprost <matt.prost@ni.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds an enhancement to node_t::set_properties() in which
the instance argument provided to the function (which normally applies
to all properties in the key/value list) can be overridden on a
per-property basis using a special syntax.
If the key consists of the property name followed by a colon (':') and
then a number, the number following the colon is used to determine which
instance of the property this set pertains to, and the value passed via
the instance parameter is ignored for that property. For example, in the
following call:
node->set_properties("dog=10,cat:2=5,bird:0=0.5", 1)
instance 1 of node's 'dog' property is set to 10, the 1 coming from the
instance parameter, instance 2 of the node's 'cat' property is set to 5
due to the override syntax provided in the string, and instance 0 of the
node's 'bird' property is set to 0.5 due to its override.
If the name/instance pair is malformed, e.g. 'value:=10' or
'value:foobar=10', a runtime error is thrown.
|
|
|
|
|
| |
This is an advanced API call that allows direct underlying
access to the radio_control object for RFNoC devices.
|
|
|
|
| |
Signed-off-by: mattprost <matt.prost@ni.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the c++ api, methods like chdr_packet#set_payload() and
chdr_packet#get_payload() are templated over the payload type
(payload_t). For methods like set_payload, they are overloaded by the
type of an argument, so in pybind we can just explicitly instaniate the
template for each payload_t and register it with pybind under the same
name. At runtime, pybind looks at the type of the argument and decides
which to call.
The problem arose with methods like get_payload, which are overloaded by
return type. In C++, the compiler can infer the template type by the
type of the target at the call site. In python, there is no way for the
pybind to determine which variant of get_payload to call, and it would
crash. Previously, the workaround for this was to declare
get_payload_ctrl, get_payload_mgmt, etc, but this was rather
anti-pythonic. This commit utilizes the fact that python methods don't
have a constrained return type to resolve this. Now, get_payload will
call a python method which looks at the chdr_packet#header#pkt_type
field to determine which variant of get_payload to call and returns that
type of payload_t.
Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
|
|
|
|
|
|
|
|
|
| |
The script_test.py script is used to generate data .cpp files from a
wireshark trace for the C++ CHDR Parser tests. This commit expands the
script to also generate the data .py files for the Python CHDR Parser
tests.
Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds pybind11 glue code for the userland chdr parsing code
introduced in the uhd::utils::chdr namespace. Additionally, it moves
some pybind11 adapter code to a common pybind_adaptors.hpp file which
originally existed in the cal_python.hpp file.
This commit also adds unit tests for the python bindings using a
captured wireshark trace which is located in rfnoc_packets_*.py and some
handwritten packets in hardcoded_packets.py
Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit introduces a new public api in uhd::utils which allows serializing
and deserializing chdr packets.
As far as testing, this commit adds the chdr_parse_test test. It uses a
wireshark trace located in rfnoc_packets_*.cpp as well as hand coded
packets from hardcoded_packets.cpp to test the serialization and
deserialization process
Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
|
|
|
|
|
|
|
|
|
|
| |
This commit exposes uhdlib/rfnoc/chdr_types.hpp in the public includes.
Additionally, it takes some types from uhdlib/rfnoc/rfnoc_common.hpp and
exposes them publicly in uhd/rfnoc/rfnoc_types.hpp.
Finally, one constant is moved from uhdlib/rfnoc/rfnoc_common.hpp to
uhd/rfnoc/constants.hpp
Signed-off-by: robot-rover <sam.obrien@ni.com>
|
|
|
|
|
|
|
|
|
| |
It would be confusing to have two classes named chdr_packet. As it makes
more sense to name the new public chdr parser class chdr_packet, the
internal uhd::rfnoc::chdr::chdr_packet class is being renamed to
chdr_packet_writer to better represent its functionality.
Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
|
| |
|
| |
|
|
|
|
|
| |
Support management payloads on busses over 64 bits
Automatically set CHDR width for mpmd_link_if_ctrl_udp
|
|
|
|
|
| |
This allows device::find() calls to proceed even when encountering an empty/invalid
serial number or serial number device argument hint.
|
|
|
|
|
|
| |
Classes which want to implement discoverable_feature can simply inherit
from this registry and get access to an ergonomic map-backed registry of
features.
|
|
|
|
|
|
|
|
| |
The "discoverable features" API handles how clients access the myriad
features we offer, without simply adding a million has_FOO and do_FOO
methods to radio_control and multi_usrp. discoverable_features allows
clients to query the existance of, enumerate, and ultimately they get
(by enum or by type) an object which implements their wanted feature.
|
|
|
|
|
|
| |
This runs update_fbs.py --verify as a unit test, and fail accordingly.
The test passes if git executable is not found or the schema files are
not within a git repo, because both are not a dependency of UHD.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add UHD_ADD_PYTEST() CMake macro
- Add CMake code to tests/CMakeLists.txt to auto-run all registered
Python unit tests
- Add a token unit test (it replicates parts of ranges_test.cpp)
The way Python-based unit tests are implemented in UHD is that they can
import uhd, and then operate on the module as usual.
Writing unit tests in Python instead of C++ can have multiple
advantages:
- If they test PyBind-wrapped C++ code, they can test both the binding
and the underlying C++ code at once
- Writing unit tests in Python may be more concise
|
|
|
|
| |
Before this, the python_api_test didn't assert an error when it failed.
|
|
|
|
|
|
|
|
| |
One of the devtests (the python_api_test) gets skipped without failures
if the uhd module can't be loaded. However, this can mask errors if the
uhd module can't be loaded because it's broken. This change will verify
if the uhd module should have been loaded, and throw an error if that's
the case.
|
| |
|
|
|
|
|
|
|
|
| |
This is a test that automatically executes API calls. The following
tests were broken:
- clock source: On B200mini, we need to set the time source back to
internal to test the clock source.
- The filter API call tests did not match the API calls themselves
|