aboutsummaryrefslogtreecommitdiffstats
path: root/host/python/pyuhd.cpp
diff options
context:
space:
mode:
authorSamuel O'Brien <sam.obrien@ni.com>2020-06-25 15:43:32 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2020-07-16 09:59:25 -0500
commit919a147afcbecace5107a4d0a4da556cfd56df92 (patch)
treec7b5faea5b89069232e7fb9f7cfebe1e495f4bca /host/python/pyuhd.cpp
parentbe6491428db599867129733f73e7ce0ce23e05a7 (diff)
downloaduhd-919a147afcbecace5107a4d0a4da556cfd56df92.tar.gz
uhd-919a147afcbecace5107a4d0a4da556cfd56df92.tar.bz2
uhd-919a147afcbecace5107a4d0a4da556cfd56df92.zip
python: Add bindings for C++ CHDR Parser
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>
Diffstat (limited to 'host/python/pyuhd.cpp')
-rw-r--r--host/python/pyuhd.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/host/python/pyuhd.cpp b/host/python/pyuhd.cpp
index 287680986..9f1a07c43 100644
--- a/host/python/pyuhd.cpp
+++ b/host/python/pyuhd.cpp
@@ -37,6 +37,7 @@ namespace py = pybind11;
#include "usrp/multi_usrp_python.hpp"
#include "usrp/subdev_spec_python.hpp"
#include "utils/paths_python.hpp"
+#include "utils/utils_python.hpp"
// We need this hack because import_array() returns NULL
// for newer Python versions.
@@ -96,4 +97,7 @@ PYBIND11_MODULE(libpyuhd, m)
// Register calibration submodule
auto cal_module = m.def_submodule("cal", "Calibration Objects");
export_cal(cal_module);
+
+ auto chdr_module = m.def_submodule("chdr", "CHDR Parsing");
+ export_utils(chdr_module);
}