python: add range property tree access

This commit is contained in:
Michael Dickens 2026-08-25 10:14:53 -04:00 committed by mkoop-ni
parent 9e8b5b9553
commit 6cb889675f

View File

@ -7,6 +7,7 @@
#include "property_tree_python.hpp"
#include <uhd/property_tree.hpp>
#include <uhd/types/device_addr.hpp>
#include <uhd/types/ranges.hpp>
#include <uhd/usrp/dboard_iface.hpp>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
@ -41,6 +42,7 @@ void export_property_tree(py::module& m)
export_property<double>(m, "double");
export_property<std::string>(m, "str");
export_property<bool>(m, "bool");
export_property<uhd::meta_range_t>(m, "range");
export_property<uhd::device_addr_t>(m, "device_addr");
export_property<uhd::usrp::dboard_iface::sptr>(m, "dboard_iface");
@ -60,6 +62,9 @@ void export_property_tree(py::module& m)
.def("access_bool",
&property_tree::access<bool>,
py::return_value_policy::reference)
.def("access_range",
&property_tree::access<uhd::meta_range_t>,
py::return_value_policy::reference)
.def("access_device_addr",
&property_tree::access<uhd::device_addr_t>,
py::return_value_policy::reference)