summaryrefslogtreecommitdiff
path: root/gr-uhd/python/uhd/bindings/rfnoc_graph_python.cc
blob: 0544a1e365d23db355d1f901d0cc7228cde7b810 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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));
}