diff options
author | Martin Braun <martin.braun@ettus.com> | 2022-02-18 11:36:06 +0100 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-02-24 13:39:56 -0600 |
commit | bcdb8a1b8f98625c7414138b18f519cdb2ff7bcf (patch) | |
tree | dc279fead8de5acf6f27d80bdb4b707c666dd5ca | |
parent | 0f15704cb9daf963a1d146c4f5413bfafb12e4de (diff) | |
download | uhd-bcdb8a1b8f98625c7414138b18f519cdb2ff7bcf.tar.gz uhd-bcdb8a1b8f98625c7414138b18f519cdb2ff7bcf.tar.bz2 uhd-bcdb8a1b8f98625c7414138b18f519cdb2ff7bcf.zip |
python: rfnoc: Add connect_through_blocks() and get_block_chain()
These RFNoC C++ API calls were previously not exported into Python.
-rw-r--r-- | host/lib/rfnoc/rfnoc_python.hpp | 15 | ||||
-rw-r--r-- | host/python/uhd/rfnoc.py | 3 |
2 files changed, 16 insertions, 2 deletions
diff --git a/host/lib/rfnoc/rfnoc_python.hpp b/host/lib/rfnoc/rfnoc_python.hpp index 19f408daf..dd776da37 100644 --- a/host/lib/rfnoc/rfnoc_python.hpp +++ b/host/lib/rfnoc/rfnoc_python.hpp @@ -8,17 +8,18 @@ #define INCLUDED_UHD_RFNOC_PYTHON_HPP #include "../stream_python.hpp" +#include <uhd/features/discoverable_feature.hpp> +#include <uhd/features/gpio_power_iface.hpp> #include <uhd/rfnoc/block_id.hpp> #include <uhd/rfnoc/graph_edge.hpp> #include <uhd/rfnoc/mb_controller.hpp> #include <uhd/rfnoc/noc_block_base.hpp> #include <uhd/rfnoc/register_iface.hpp> #include <uhd/rfnoc/res_source_info.hpp> -#include <uhd/features/discoverable_feature.hpp> -#include <uhd/features/gpio_power_iface.hpp> #include <uhd/rfnoc_graph.hpp> #include <uhd/transport/adapter_id.hpp> #include <uhd/types/device_addr.hpp> +#include <uhd/utils/graph_utils.hpp> #include <pybind11/operators.h> #include <pybind11/stl.h> #include <memory> @@ -513,6 +514,16 @@ void export_rfnoc(py::module& m) }, py::arg("id"), py::arg("instance") = 0); + + m.def("get_block_chain", &uhd::rfnoc::get_block_chain); + m.def("connect_through_blocks", + &uhd::rfnoc::connect_through_blocks, + py::arg("graph"), + py::arg("src_blk"), + py::arg("src_port"), + py::arg("dst_blk"), + py::arg("dst_port"), + py::arg("skip_property_propagation") = false); } #endif /* INCLUDED_UHD_RFNOC_PYTHON_HPP */ diff --git a/host/python/uhd/rfnoc.py b/host/python/uhd/rfnoc.py index c355777b0..a9e141d93 100644 --- a/host/python/uhd/rfnoc.py +++ b/host/python/uhd/rfnoc.py @@ -32,3 +32,6 @@ SiggenBlockControl = lib.rfnoc.siggen_block_control SwitchboardBlockControl = lib.rfnoc.switchboard_block_control VectorIirBlockControl = lib.rfnoc.vector_iir_block_control WindowBlockControl = lib.rfnoc.window_block_control + +connect_through_blocks = lib.rfnoc.connect_through_blocks +get_block_chain = lib.rfnoc.get_block_chain |