From bcdb8a1b8f98625c7414138b18f519cdb2ff7bcf Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 18 Feb 2022 11:36:06 +0100 Subject: python: rfnoc: Add connect_through_blocks() and get_block_chain() These RFNoC C++ API calls were previously not exported into Python. --- host/lib/rfnoc/rfnoc_python.hpp | 15 +++++++++++++-- host/python/uhd/rfnoc.py | 3 +++ 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'host') 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 +#include #include #include #include #include #include #include -#include -#include #include #include #include +#include #include #include #include @@ -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 -- cgit v1.2.3