/*
 * 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(8d0691d74a9a5647756395fbb2f17fc9)                     */
/***********************************************************************************/

#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("set_streamer_adapter_id",
             &rfnoc_graph::set_streamer_adapter_id,
             D(rfnoc_graph, set_streamer_adapter_id))
        .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));
}
