diff options
Diffstat (limited to 'host/python')
-rw-r--r-- | host/python/CMakeLists.txt | 1 | ||||
-rw-r--r-- | host/python/pyuhd.cpp | 4 | ||||
-rw-r--r-- | host/python/uhd/__init__.py | 3 | ||||
-rw-r--r-- | host/python/uhd/property_tree.py | 12 |
4 files changed, 20 insertions, 0 deletions
diff --git a/host/python/CMakeLists.txt b/host/python/CMakeLists.txt index d4417903d..1e9fefa43 100644 --- a/host/python/CMakeLists.txt +++ b/host/python/CMakeLists.txt @@ -31,6 +31,7 @@ execute_process( # Build pyuhd library add_library(pyuhd SHARED pyuhd.cpp + ${CMAKE_SOURCE_DIR}/lib/property_tree_python.cpp ${CMAKE_SOURCE_DIR}/lib/usrp/multi_usrp_python.cpp ) # python expects extension modules with a particular suffix diff --git a/host/python/pyuhd.cpp b/host/python/pyuhd.cpp index bb564c276..eadb88d40 100644 --- a/host/python/pyuhd.cpp +++ b/host/python/pyuhd.cpp @@ -14,6 +14,7 @@ namespace py = pybind11; #include "cal/cal_python.hpp" +#include "property_tree_python.hpp" #include "rfnoc/ddc_block_control_python.hpp" #include "rfnoc/duc_block_control_python.hpp" #include "rfnoc/fft_block_control_python.hpp" @@ -110,4 +111,7 @@ PYBIND11_MODULE(libpyuhd, m) auto chdr_module = m.def_submodule("chdr", "CHDR Parsing"); export_utils(chdr_module); + + // Register property tree + export_property_tree(m); } diff --git a/host/python/uhd/__init__.py b/host/python/uhd/__init__.py index 99c10c3b1..bf11ac513 100644 --- a/host/python/uhd/__init__.py +++ b/host/python/uhd/__init__.py @@ -14,3 +14,6 @@ from . import rfnoc from . import dsp from . import chdr from .libpyuhd.paths import * +from .property_tree import PropertyTree + + diff --git a/host/python/uhd/property_tree.py b/host/python/uhd/property_tree.py new file mode 100644 index 000000000..02c6d108c --- /dev/null +++ b/host/python/uhd/property_tree.py @@ -0,0 +1,12 @@ +# +# Copyright 2020 Ettus Research, a National Instruments Brand +# +# SPDX-License-Identifier: GPL-3.0-or-later +# +""" +Access to the property tree +""" + +from . import libpyuhd as lib + +PropertyTree = lib.property_tree |