aboutsummaryrefslogtreecommitdiffstats
path: root/host/python/pyuhd.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-10-12 12:22:00 +0200
committerAaron Rossetto <aaron.rossetto@ni.com>2020-10-16 14:58:15 -0500
commit7ee106187e1d0991e7ae79abd905a79dc5760b5f (patch)
tree4cf445e5b170817692567120e8506e20f5afb878 /host/python/pyuhd.cpp
parent0167ad7608adb170970458b19735738808f0c5c8 (diff)
downloaduhd-7ee106187e1d0991e7ae79abd905a79dc5760b5f.tar.gz
uhd-7ee106187e1d0991e7ae79abd905a79dc5760b5f.tar.bz2
uhd-7ee106187e1d0991e7ae79abd905a79dc5760b5f.zip
python: Add access to the property_tree from Python
Example: >>> usrp = uhd.usrp.multi_usrp("") >>> tree = usrp.get_tree() >>> print(tree.access_int("/name").get())
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 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);
}