diff options
Diffstat (limited to 'gr-uhd/python/uhd/bindings/rfnoc_graph_python.cc')
-rw-r--r-- | gr-uhd/python/uhd/bindings/rfnoc_graph_python.cc | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/gr-uhd/python/uhd/bindings/rfnoc_graph_python.cc b/gr-uhd/python/uhd/bindings/rfnoc_graph_python.cc new file mode 100644 index 0000000000..0544a1e365 --- /dev/null +++ b/gr-uhd/python/uhd/bindings/rfnoc_graph_python.cc @@ -0,0 +1,66 @@ +/* + * Copyright 2021 Marcus Müller + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(rfnoc_graph.h) */ +/* BINDTOOL_HEADER_FILE_HASH(1e32bbc2f1a925bf00fafbcf5a16bf24) */ +/***********************************************************************************/ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/uhd/rfnoc_graph.h> +// pydoc.h is automatically generated in the build directory +#include <rfnoc_graph_pydoc.h> + +void bind_rfnoc_graph(py::module& m) +{ + + using rfnoc_graph = ::gr::uhd::rfnoc_graph; + + + py::class_<rfnoc_graph, std::shared_ptr<rfnoc_graph>>( + m, "rfnoc_graph", D(rfnoc_graph)) + + .def(py::init(&rfnoc_graph::make), D(rfnoc_graph, make)) + .def("connect", + py::overload_cast<const std::string&, + const size_t, + const std::string&, + const size_t, + const bool>(&rfnoc_graph::connect), + D(rfnoc_graph, connect)) + .def("connect", + py::overload_cast<const std::string&, const std::string&, const bool>( + &rfnoc_graph::connect), + D(rfnoc_graph, connect)) + .def("create_rx_streamer", + &rfnoc_graph::create_rx_streamer, + D(rfnoc_graph, create_rx_streamer)) + .def("create_tx_streamer", + &rfnoc_graph::create_tx_streamer, + D(rfnoc_graph, create_tx_streamer)) + .def("commit", &rfnoc_graph::commit, D(rfnoc_graph, commit)) + .def("get_block_id", &rfnoc_graph::get_block_id, D(rfnoc_graph, get_block_id)) + .def("set_time_source", + &rfnoc_graph::set_time_source, + D(rfnoc_graph, set_time_source)) + .def("set_clock_source", + &rfnoc_graph::set_clock_source, + D(rfnoc_graph, set_clock_source)) + .def("get_block_ref", &rfnoc_graph::get_block_ref, D(rfnoc_graph, get_block_ref)); +} |