From 919a147afcbecace5107a4d0a4da556cfd56df92 Mon Sep 17 00:00:00 2001 From: Samuel O'Brien Date: Thu, 25 Jun 2020 15:43:32 -0500 Subject: 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 --- host/python/pyuhd.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'host/python') 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); } -- cgit v1.2.3