python bindings
This commit is contained in:
@@ -29,7 +29,19 @@ include(GrPybind)
|
||||
########################################################################
|
||||
|
||||
list(APPEND foo_python_files
|
||||
python_bindings.cc)
|
||||
python_bindings.cc
|
||||
|
||||
burst_tagger_python.cc
|
||||
channel_model_python.cc
|
||||
packet_dropper_python.cc
|
||||
packet_pad2_python.cc
|
||||
packet_pad_python.cc
|
||||
pad_tagged_stream_python.cc
|
||||
periodic_msg_source_python.cc
|
||||
random_periodic_msg_source_python.cc
|
||||
rtt_measure_python.cc
|
||||
wireshark_connector_python.cc
|
||||
)
|
||||
|
||||
GR_PYBIND_MAKE_OOT(foo
|
||||
../..
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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(burst_tagger.h) */
|
||||
/* BINDTOOL_HEADER_FILE_HASH(c99561501264e56677e8f0631b47434d) */
|
||||
/***********************************************************************************/
|
||||
|
||||
#include <pybind11/complex.h>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
#include <foo/burst_tagger.h>
|
||||
// pydoc.h is automatically generated in the build directory
|
||||
#include <burst_tagger_pydoc.h>
|
||||
|
||||
void bind_burst_tagger(py::module& m)
|
||||
{
|
||||
|
||||
using burst_tagger = ::gr::foo::burst_tagger;
|
||||
|
||||
|
||||
py::class_<burst_tagger, gr::sync_block, gr::block, gr::basic_block,
|
||||
std::shared_ptr<burst_tagger>>(m, "burst_tagger", D(burst_tagger))
|
||||
|
||||
.def(py::init(&burst_tagger::make),
|
||||
py::arg("tag_name"),
|
||||
py::arg("mult"),
|
||||
D(burst_tagger,make)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
* 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(channel_model.h) */
|
||||
/* BINDTOOL_HEADER_FILE_HASH(2d1fbde4f2f01f74496f71008f2acb85) */
|
||||
/***********************************************************************************/
|
||||
|
||||
#include <pybind11/complex.h>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
#include <foo/channel_model.h>
|
||||
// pydoc.h is automatically generated in the build directory
|
||||
#include <channel_model_pydoc.h>
|
||||
|
||||
void bind_channel_model(py::module& m)
|
||||
{
|
||||
|
||||
using channel_model = ::gr::foo::channel_model;
|
||||
|
||||
|
||||
py::class_<channel_model, gr::hier_block2,
|
||||
std::shared_ptr<channel_model>>(m, "channel_model", D(channel_model))
|
||||
|
||||
.def(py::init(&channel_model::make),
|
||||
py::arg("noise_voltage") = 0.,
|
||||
py::arg("frequency_offset") = 0.,
|
||||
py::arg("epsilon") = 1.,
|
||||
py::arg("taps") = std::vector<gr_complex>(1, 1),
|
||||
py::arg("noise_seed") = 0,
|
||||
py::arg("block_tags") = false,
|
||||
D(channel_model,make)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.def("set_noise_voltage",&channel_model::set_noise_voltage,
|
||||
py::arg("noise_voltage"),
|
||||
D(channel_model,set_noise_voltage)
|
||||
)
|
||||
|
||||
|
||||
|
||||
.def("set_frequency_offset",&channel_model::set_frequency_offset,
|
||||
py::arg("frequency_offset"),
|
||||
D(channel_model,set_frequency_offset)
|
||||
)
|
||||
|
||||
|
||||
|
||||
.def("set_taps",&channel_model::set_taps,
|
||||
py::arg("taps"),
|
||||
D(channel_model,set_taps)
|
||||
)
|
||||
|
||||
|
||||
|
||||
.def("set_timing_offset",&channel_model::set_timing_offset,
|
||||
py::arg("epsilon"),
|
||||
D(channel_model,set_timing_offset)
|
||||
)
|
||||
|
||||
|
||||
|
||||
.def("noise_voltage",&channel_model::noise_voltage,
|
||||
D(channel_model,noise_voltage)
|
||||
)
|
||||
|
||||
|
||||
|
||||
.def("frequency_offset",&channel_model::frequency_offset,
|
||||
D(channel_model,frequency_offset)
|
||||
)
|
||||
|
||||
|
||||
|
||||
.def("taps",&channel_model::taps,
|
||||
D(channel_model,taps)
|
||||
)
|
||||
|
||||
|
||||
|
||||
.def("timing_offset",&channel_model::timing_offset,
|
||||
D(channel_model,timing_offset)
|
||||
)
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2021 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNU Radio
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
*/
|
||||
#include "pydoc_macros.h"
|
||||
#define D(...) DOC(gr,foo, __VA_ARGS__ )
|
||||
/*
|
||||
This file contains placeholders for docstrings for the Python bindings.
|
||||
Do not edit! These were automatically extracted during the binding process
|
||||
and will be overwritten during the build process
|
||||
*/
|
||||
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_burst_tagger = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_burst_tagger_burst_tagger = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_burst_tagger_make = R"doc()doc";
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2021 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNU Radio
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
*/
|
||||
#include "pydoc_macros.h"
|
||||
#define D(...) DOC(gr,foo, __VA_ARGS__ )
|
||||
/*
|
||||
This file contains placeholders for docstrings for the Python bindings.
|
||||
Do not edit! These were automatically extracted during the binding process
|
||||
and will be overwritten during the build process
|
||||
*/
|
||||
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_channel_model = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_channel_model_channel_model_0 = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_channel_model_channel_model_1 = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_channel_model_make = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_channel_model_set_noise_voltage = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_channel_model_set_frequency_offset = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_channel_model_set_taps = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_channel_model_set_timing_offset = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_channel_model_noise_voltage = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_channel_model_frequency_offset = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_channel_model_taps = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_channel_model_timing_offset = R"doc()doc";
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2021 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNU Radio
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
*/
|
||||
#include "pydoc_macros.h"
|
||||
#define D(...) DOC(gr,foo, __VA_ARGS__ )
|
||||
/*
|
||||
This file contains placeholders for docstrings for the Python bindings.
|
||||
Do not edit! These were automatically extracted during the binding process
|
||||
and will be overwritten during the build process
|
||||
*/
|
||||
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_packet_dropper = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_packet_dropper_packet_dropper = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_packet_dropper_make = R"doc()doc";
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2021 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNU Radio
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
*/
|
||||
#include "pydoc_macros.h"
|
||||
#define D(...) DOC(gr,foo, __VA_ARGS__ )
|
||||
/*
|
||||
This file contains placeholders for docstrings for the Python bindings.
|
||||
Do not edit! These were automatically extracted during the binding process
|
||||
and will be overwritten during the build process
|
||||
*/
|
||||
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_packet_pad2 = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_packet_pad2_packet_pad2 = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_packet_pad2_make = R"doc()doc";
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2021 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNU Radio
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
*/
|
||||
#include "pydoc_macros.h"
|
||||
#define D(...) DOC(gr,foo, __VA_ARGS__ )
|
||||
/*
|
||||
This file contains placeholders for docstrings for the Python bindings.
|
||||
Do not edit! These were automatically extracted during the binding process
|
||||
and will be overwritten during the build process
|
||||
*/
|
||||
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_packet_pad = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_packet_pad_packet_pad = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_packet_pad_make = R"doc()doc";
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2021 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNU Radio
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
*/
|
||||
#include "pydoc_macros.h"
|
||||
#define D(...) DOC(gr,foo, __VA_ARGS__ )
|
||||
/*
|
||||
This file contains placeholders for docstrings for the Python bindings.
|
||||
Do not edit! These were automatically extracted during the binding process
|
||||
and will be overwritten during the build process
|
||||
*/
|
||||
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_pad_tagged_stream = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_pad_tagged_stream_pad_tagged_stream = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_pad_tagged_stream_make = R"doc()doc";
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2021 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNU Radio
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
*/
|
||||
#include "pydoc_macros.h"
|
||||
#define D(...) DOC(gr,foo, __VA_ARGS__ )
|
||||
/*
|
||||
This file contains placeholders for docstrings for the Python bindings.
|
||||
Do not edit! These were automatically extracted during the binding process
|
||||
and will be overwritten during the build process
|
||||
*/
|
||||
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_periodic_msg_source = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_periodic_msg_source_periodic_msg_source_0 = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_periodic_msg_source_periodic_msg_source_1 = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_periodic_msg_source_make = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_periodic_msg_source_set_nmsg = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_periodic_msg_source_get_nmsg = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_periodic_msg_source_set_delay = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_periodic_msg_source_get_delay = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_periodic_msg_source_start_tx = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_periodic_msg_source_stop_tx = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_periodic_msg_source_is_running = R"doc()doc";
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2021 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNU Radio
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
*/
|
||||
#include "pydoc_macros.h"
|
||||
#define D(...) DOC(gr,foo, __VA_ARGS__ )
|
||||
/*
|
||||
This file contains placeholders for docstrings for the Python bindings.
|
||||
Do not edit! These were automatically extracted during the binding process
|
||||
and will be overwritten during the build process
|
||||
*/
|
||||
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_random_periodic_msg_source = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_random_periodic_msg_source_random_periodic_msg_source_0 = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_random_periodic_msg_source_random_periodic_msg_source_1 = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_random_periodic_msg_source_make = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_random_periodic_msg_source_set_nmsg = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_random_periodic_msg_source_get_nmsg = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_random_periodic_msg_source_set_delay = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_random_periodic_msg_source_get_delay = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_random_periodic_msg_source_start_tx = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_random_periodic_msg_source_stop_tx = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_random_periodic_msg_source_is_running = R"doc()doc";
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2021 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNU Radio
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
*/
|
||||
#include "pydoc_macros.h"
|
||||
#define D(...) DOC(gr,foo, __VA_ARGS__ )
|
||||
/*
|
||||
This file contains placeholders for docstrings for the Python bindings.
|
||||
Do not edit! These were automatically extracted during the binding process
|
||||
and will be overwritten during the build process
|
||||
*/
|
||||
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_rtt_measure = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_rtt_measure_rtt_measure = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_rtt_measure_make = R"doc()doc";
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2021 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNU Radio
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
*/
|
||||
#include "pydoc_macros.h"
|
||||
#define D(...) DOC(gr,foo, __VA_ARGS__ )
|
||||
/*
|
||||
This file contains placeholders for docstrings for the Python bindings.
|
||||
Do not edit! These were automatically extracted during the binding process
|
||||
and will be overwritten during the build process
|
||||
*/
|
||||
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_wireshark_connector = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_wireshark_connector_wireshark_connector = R"doc()doc";
|
||||
|
||||
|
||||
static const char *__doc_gr_foo_wireshark_connector_make = R"doc()doc";
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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(packet_dropper.h) */
|
||||
/* BINDTOOL_HEADER_FILE_HASH(c324ec3cc59fd3973f47d4c8193587cb) */
|
||||
/***********************************************************************************/
|
||||
|
||||
#include <pybind11/complex.h>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
#include <foo/packet_dropper.h>
|
||||
// pydoc.h is automatically generated in the build directory
|
||||
#include <packet_dropper_pydoc.h>
|
||||
|
||||
void bind_packet_dropper(py::module& m)
|
||||
{
|
||||
|
||||
using packet_dropper = ::gr::foo::packet_dropper;
|
||||
|
||||
|
||||
py::class_<packet_dropper, gr::block, gr::basic_block,
|
||||
std::shared_ptr<packet_dropper>>(m, "packet_dropper", D(packet_dropper))
|
||||
|
||||
.def(py::init(&packet_dropper::make),
|
||||
py::arg("drop_rate"),
|
||||
py::arg("seed"),
|
||||
D(packet_dropper,make)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* 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(packet_pad2.h) */
|
||||
/* BINDTOOL_HEADER_FILE_HASH(b2e434a4d5f7a750e8183bd819862469) */
|
||||
/***********************************************************************************/
|
||||
|
||||
#include <pybind11/complex.h>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
#include <foo/packet_pad2.h>
|
||||
// pydoc.h is automatically generated in the build directory
|
||||
#include <packet_pad2_pydoc.h>
|
||||
|
||||
void bind_packet_pad2(py::module& m)
|
||||
{
|
||||
|
||||
using packet_pad2 = ::gr::foo::packet_pad2;
|
||||
|
||||
|
||||
py::class_<packet_pad2, gr::tagged_stream_block, gr::block, gr::basic_block,
|
||||
std::shared_ptr<packet_pad2>>(m, "packet_pad2", D(packet_pad2))
|
||||
|
||||
.def(py::init(&packet_pad2::make),
|
||||
py::arg("debug") = false,
|
||||
py::arg("delay") = false,
|
||||
py::arg("delay_sec") = 0.01,
|
||||
py::arg("pad_front") = 0,
|
||||
py::arg("pad_tail") = 0,
|
||||
D(packet_pad2,make)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* 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(packet_pad.h) */
|
||||
/* BINDTOOL_HEADER_FILE_HASH(80e623b2c0e35d7918618f96aff3c11c) */
|
||||
/***********************************************************************************/
|
||||
|
||||
#include <pybind11/complex.h>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
#include <foo/packet_pad.h>
|
||||
// pydoc.h is automatically generated in the build directory
|
||||
#include <packet_pad_pydoc.h>
|
||||
|
||||
void bind_packet_pad(py::module& m)
|
||||
{
|
||||
|
||||
using packet_pad = ::gr::foo::packet_pad;
|
||||
|
||||
|
||||
py::class_<packet_pad, gr::block, gr::basic_block,
|
||||
std::shared_ptr<packet_pad>>(m, "packet_pad", D(packet_pad))
|
||||
|
||||
.def(py::init(&packet_pad::make),
|
||||
py::arg("debug") = false,
|
||||
py::arg("delay") = false,
|
||||
py::arg("delay_sec") = 0.01,
|
||||
py::arg("pad_front") = 0,
|
||||
py::arg("pad_tail") = 0,
|
||||
D(packet_pad,make)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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(pad_tagged_stream.h) */
|
||||
/* BINDTOOL_HEADER_FILE_HASH(7a558a15cd1883b28237a8c9f3d5419f) */
|
||||
/***********************************************************************************/
|
||||
|
||||
#include <pybind11/complex.h>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
#include <foo/pad_tagged_stream.h>
|
||||
// pydoc.h is automatically generated in the build directory
|
||||
#include <pad_tagged_stream_pydoc.h>
|
||||
|
||||
void bind_pad_tagged_stream(py::module& m)
|
||||
{
|
||||
|
||||
using pad_tagged_stream = ::gr::foo::pad_tagged_stream;
|
||||
|
||||
|
||||
py::class_<pad_tagged_stream, gr::tagged_stream_block, gr::block, gr::basic_block,
|
||||
std::shared_ptr<pad_tagged_stream>>(m, "pad_tagged_stream", D(pad_tagged_stream))
|
||||
|
||||
.def(py::init(&pad_tagged_stream::make),
|
||||
py::arg("buffer_size"),
|
||||
py::arg("len_tag_name"),
|
||||
D(pad_tagged_stream,make)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* 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)
|
||||
)
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,9 +21,18 @@ namespace py = pybind11;
|
||||
// Please do not delete
|
||||
/**************************************/
|
||||
// BINDING_FUNCTION_PROTOTYPES(
|
||||
void bind_burst_tagger(py::module& m);
|
||||
void bind_channel_model(py::module& m);
|
||||
void bind_packet_dropper(py::module& m);
|
||||
void bind_packet_pad2(py::module& m);
|
||||
void bind_packet_pad(py::module& m);
|
||||
void bind_pad_tagged_stream(py::module& m);
|
||||
void bind_periodic_msg_source(py::module& m);
|
||||
void bind_random_periodic_msg_source(py::module& m);
|
||||
void bind_rtt_measure(py::module& m);
|
||||
void bind_wireshark_connector(py::module& m);
|
||||
// ) END BINDING_FUNCTION_PROTOTYPES
|
||||
|
||||
|
||||
// We need this hack because import_array() returns NULL
|
||||
// for newer Python versions.
|
||||
// This function is also necessary because it ensures access to the C API
|
||||
@@ -49,5 +58,15 @@ PYBIND11_MODULE(foo_python, m)
|
||||
// Please do not delete
|
||||
/**************************************/
|
||||
// BINDING_FUNCTION_CALLS(
|
||||
bind_burst_tagger(m);
|
||||
bind_channel_model(m);
|
||||
bind_packet_dropper(m);
|
||||
bind_packet_pad2(m);
|
||||
bind_packet_pad(m);
|
||||
bind_pad_tagged_stream(m);
|
||||
bind_periodic_msg_source(m);
|
||||
bind_random_periodic_msg_source(m);
|
||||
bind_rtt_measure(m);
|
||||
bind_wireshark_connector(m);
|
||||
// ) END BINDING_FUNCTION_CALLS
|
||||
}
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* 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(random_periodic_msg_source.h) */
|
||||
/* BINDTOOL_HEADER_FILE_HASH(0a96820144211e87383cb24fd175ffdf) */
|
||||
/***********************************************************************************/
|
||||
|
||||
#include <pybind11/complex.h>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
#include <foo/random_periodic_msg_source.h>
|
||||
// pydoc.h is automatically generated in the build directory
|
||||
#include <random_periodic_msg_source_pydoc.h>
|
||||
|
||||
void bind_random_periodic_msg_source(py::module& m)
|
||||
{
|
||||
|
||||
using random_periodic_msg_source = ::gr::foo::random_periodic_msg_source;
|
||||
|
||||
|
||||
py::class_<random_periodic_msg_source, gr::block, gr::basic_block,
|
||||
std::shared_ptr<random_periodic_msg_source>>(m, "random_periodic_msg_source", D(random_periodic_msg_source))
|
||||
|
||||
.def(py::init(&random_periodic_msg_source::make),
|
||||
py::arg("msg_len"),
|
||||
py::arg("interval"),
|
||||
py::arg("num_msg") = 1,
|
||||
py::arg("quit") = true,
|
||||
py::arg("debug") = false,
|
||||
py::arg("seed") = 0,
|
||||
D(random_periodic_msg_source,make)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.def("set_nmsg",&random_periodic_msg_source::set_nmsg,
|
||||
py::arg("nmsg"),
|
||||
D(random_periodic_msg_source,set_nmsg)
|
||||
)
|
||||
|
||||
|
||||
|
||||
.def("get_nmsg",&random_periodic_msg_source::get_nmsg,
|
||||
D(random_periodic_msg_source,get_nmsg)
|
||||
)
|
||||
|
||||
|
||||
|
||||
.def("set_delay",&random_periodic_msg_source::set_delay,
|
||||
py::arg("delay"),
|
||||
D(random_periodic_msg_source,set_delay)
|
||||
)
|
||||
|
||||
|
||||
|
||||
.def("get_delay",&random_periodic_msg_source::get_delay,
|
||||
D(random_periodic_msg_source,get_delay)
|
||||
)
|
||||
|
||||
|
||||
|
||||
.def("start_tx",&random_periodic_msg_source::start_tx,
|
||||
D(random_periodic_msg_source,start_tx)
|
||||
)
|
||||
|
||||
|
||||
|
||||
.def("stop_tx",&random_periodic_msg_source::stop_tx,
|
||||
D(random_periodic_msg_source,stop_tx)
|
||||
)
|
||||
|
||||
|
||||
|
||||
.def("is_running",&random_periodic_msg_source::is_running,
|
||||
D(random_periodic_msg_source,is_running)
|
||||
)
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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(rtt_measure.h) */
|
||||
/* BINDTOOL_HEADER_FILE_HASH(30ed3e91a71527c380abe7384d62fcea) */
|
||||
/***********************************************************************************/
|
||||
|
||||
#include <pybind11/complex.h>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
#include <foo/rtt_measure.h>
|
||||
// pydoc.h is automatically generated in the build directory
|
||||
#include <rtt_measure_pydoc.h>
|
||||
|
||||
void bind_rtt_measure(py::module& m)
|
||||
{
|
||||
|
||||
using rtt_measure = ::gr::foo::rtt_measure;
|
||||
|
||||
|
||||
py::class_<rtt_measure, gr::block, gr::basic_block,
|
||||
std::shared_ptr<rtt_measure>>(m, "rtt_measure", D(rtt_measure))
|
||||
|
||||
.def(py::init(&rtt_measure::make),
|
||||
py::arg("interval"),
|
||||
D(rtt_measure,make)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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(wireshark_connector.h) */
|
||||
/* BINDTOOL_HEADER_FILE_HASH(10414a436e555bc27b41e65120989433) */
|
||||
/***********************************************************************************/
|
||||
|
||||
#include <pybind11/complex.h>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
#include <foo/wireshark_connector.h>
|
||||
// pydoc.h is automatically generated in the build directory
|
||||
#include <wireshark_connector_pydoc.h>
|
||||
|
||||
void bind_wireshark_connector(py::module& m)
|
||||
{
|
||||
|
||||
using wireshark_connector = ::gr::foo::wireshark_connector;
|
||||
|
||||
|
||||
py::class_<wireshark_connector, gr::block, gr::basic_block,
|
||||
std::shared_ptr<wireshark_connector>>(m, "wireshark_connector", D(wireshark_connector))
|
||||
|
||||
.def(py::init(&wireshark_connector::make),
|
||||
py::arg("type"),
|
||||
py::arg("debug") = false,
|
||||
D(wireshark_connector,make)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
py::enum_<::gr::foo::LinkType>(m,"LinkType")
|
||||
.value("WIFI", ::gr::foo::WIFI) // 127
|
||||
.value("ZIGBEE", ::gr::foo::ZIGBEE) // 195
|
||||
.export_values()
|
||||
;
|
||||
|
||||
py::implicitly_convertible<int, ::gr::foo::LinkType>();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user