From f29be5398081e78ed0edeaf712cc608e770f2523 Mon Sep 17 00:00:00 2001
From: Marcus Müller <mmueller@gnuradio.org>
Date: Fri, 4 Jun 2021 22:13:27 +0200
Subject: uhd: pybind rfnoc_graph,_rx/tx_streamer
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
---
 gr-uhd/python/uhd/bindings/rfnoc_graph_python.cc | 66 ++++++++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 gr-uhd/python/uhd/bindings/rfnoc_graph_python.cc

(limited to 'gr-uhd/python/uhd/bindings/rfnoc_graph_python.cc')

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));
+}
-- 
cgit v1.2.3