109 lines
2.7 KiB
C++
109 lines
2.7 KiB
C++
/*
|
|
* Copyright 2021 Free Software Foundation, Inc.
|
|
*
|
|
* 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(periodic_msg_source.h) */
|
|
/* BINDTOOL_HEADER_FILE_HASH(3aa9b26f640e6e96cbfa5450af8f4ac7) */
|
|
/***********************************************************************************/
|
|
|
|
#include <pybind11/complex.h>
|
|
#include <pybind11/pybind11.h>
|
|
#include <pybind11/stl.h>
|
|
|
|
namespace py = pybind11;
|
|
|
|
#include <foo/periodic_msg_source.h>
|
|
// pydoc.h is automatically generated in the build directory
|
|
#include <periodic_msg_source_pydoc.h>
|
|
|
|
void bind_periodic_msg_source(py::module& m)
|
|
{
|
|
|
|
using periodic_msg_source = ::gr::foo::periodic_msg_source;
|
|
|
|
|
|
py::class_<periodic_msg_source, gr::block, gr::basic_block,
|
|
std::shared_ptr<periodic_msg_source>>(m, "periodic_msg_source", D(periodic_msg_source))
|
|
|
|
.def(py::init(&periodic_msg_source::make),
|
|
py::arg("msg"),
|
|
py::arg("interval"),
|
|
py::arg("num_msg") = -1,
|
|
py::arg("quit") = true,
|
|
py::arg("debug") = false,
|
|
D(periodic_msg_source,make)
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.def("set_nmsg",&periodic_msg_source::set_nmsg,
|
|
py::arg("nmsg"),
|
|
D(periodic_msg_source,set_nmsg)
|
|
)
|
|
|
|
|
|
|
|
.def("get_nmsg",&periodic_msg_source::get_nmsg,
|
|
D(periodic_msg_source,get_nmsg)
|
|
)
|
|
|
|
|
|
|
|
.def("set_delay",&periodic_msg_source::set_delay,
|
|
py::arg("delay"),
|
|
D(periodic_msg_source,set_delay)
|
|
)
|
|
|
|
|
|
|
|
.def("get_delay",&periodic_msg_source::get_delay,
|
|
D(periodic_msg_source,get_delay)
|
|
)
|
|
|
|
|
|
|
|
.def("start_tx",&periodic_msg_source::start_tx,
|
|
D(periodic_msg_source,start_tx)
|
|
)
|
|
|
|
|
|
|
|
.def("stop_tx",&periodic_msg_source::stop_tx,
|
|
D(periodic_msg_source,stop_tx)
|
|
)
|
|
|
|
|
|
|
|
.def("is_running",&periodic_msg_source::is_running,
|
|
D(periodic_msg_source,is_running)
|
|
)
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|