Update to GR 3.9.0. WIP with plenty of untested code.

This commit is contained in:
Nick Foster
2021-02-10 20:55:39 -08:00
parent 9c77b55c0b
commit fd1771f161
59 changed files with 207 additions and 16379 deletions

View File

@@ -29,7 +29,9 @@ include(GrPybind)
########################################################################
list(APPEND air_modes_python_files
python_bindings.cc)
python_bindings.cc
preamble_python.cc
slicer_python.cc)
GR_PYBIND_MAKE_OOT(air_modes
../..

View File

@@ -7,7 +7,7 @@
*
*/
#include "pydoc_macros.h"
#define D(...) DOC(gr,air-modes, __VA_ARGS__ )
#define D(...) DOC(gr,air_modes, __VA_ARGS__ )
/*
This file contains placeholders for docstrings for the Python bindings.
Do not edit! These were automatically extracted during the binding process
@@ -16,12 +16,27 @@
static const char *__doc_gr_air-modes_preamble = R"doc()doc";
static const char *__doc_gr_air_modes_preamble = R"doc()doc";
static const char *__doc_gr_air-modes_preamble_preamble = R"doc()doc";
static const char *__doc_gr_air_modes_preamble_preamble_0 = R"doc()doc";
static const char *__doc_gr_air-modes_preamble_make = R"doc()doc";
static const char *__doc_gr_air_modes_preamble_preamble_1 = R"doc()doc";
static const char *__doc_gr_air_modes_preamble_make = R"doc()doc";
static const char *__doc_gr_air_modes_preamble_set_rate = R"doc()doc";
static const char *__doc_gr_air_modes_preamble_set_threshold = R"doc()doc";
static const char *__doc_gr_air_modes_preamble_get_rate = R"doc()doc";
static const char *__doc_gr_air_modes_preamble_get_threshold = R"doc()doc";

View File

@@ -7,7 +7,7 @@
*
*/
#include "pydoc_macros.h"
#define D(...) DOC(gr,air-modes, __VA_ARGS__ )
#define D(...) DOC(gr,air_modes, __VA_ARGS__ )
/*
This file contains placeholders for docstrings for the Python bindings.
Do not edit! These were automatically extracted during the binding process
@@ -16,12 +16,12 @@
static const char *__doc_gr_air-modes_slicer = R"doc()doc";
static const char *__doc_gr_air_modes_slicer = R"doc()doc";
static const char *__doc_gr_air-modes_slicer_slicer = R"doc()doc";
static const char *__doc_gr_air_modes_slicer_slicer = R"doc()doc";
static const char *__doc_gr_air-modes_slicer_make = R"doc()doc";
static const char *__doc_gr_air_modes_slicer_make = R"doc()doc";

View File

@@ -14,7 +14,7 @@
/* BINDTOOL_GEN_AUTOMATIC(0) */
/* BINDTOOL_USE_PYGCCXML(0) */
/* BINDTOOL_HEADER_FILE(preamble.h) */
/* BINDTOOL_HEADER_FILE_HASH(99cc0f448ffd5f8da017452a42ffb8c1) */
/* BINDTOOL_HEADER_FILE_HASH(7ce2f89dad5c95a56a123d11871bad67) */
/***********************************************************************************/
#include <pybind11/complex.h>
@@ -23,26 +23,54 @@
namespace py = pybind11;
#include <air-modes/preamble.h>
#include <air_modes/preamble.h>
// pydoc.h is automatically generated in the build directory
#include <preamble_pydoc.h>
void bind_preamble(py::module& m)
{
using preamble = gr::air-modes::preamble;
using preamble = ::gr::air_modes::preamble;
py::class_<preamble, gr::block, gr::basic_block,
std::shared_ptr<preamble>>(m, "preamble", D(preamble))
.def(py::init(&preamble::make),
py::arg("channel_rate"),
py::arg("threshold_db"),
D(preamble,make)
)
.def("set_rate",&preamble::set_rate,
py::arg("channel_rate"),
D(preamble,set_rate)
)
.def("set_threshold",&preamble::set_threshold,
py::arg("threshold_db"),
D(preamble,set_threshold)
)
.def("get_rate",&preamble::get_rate,
D(preamble,get_rate)
)
.def("get_threshold",&preamble::get_threshold,
D(preamble,get_threshold)
)
;

View File

@@ -14,7 +14,7 @@
/* BINDTOOL_GEN_AUTOMATIC(0) */
/* BINDTOOL_USE_PYGCCXML(0) */
/* BINDTOOL_HEADER_FILE(slicer.h) */
/* BINDTOOL_HEADER_FILE_HASH(eec2a2cee44fc77b3705ab2abfac8702) */
/* BINDTOOL_HEADER_FILE_HASH(de5bad12b8ae0f22c88c9cd886eaf8cc) */
/***********************************************************************************/
#include <pybind11/complex.h>
@@ -23,20 +23,21 @@
namespace py = pybind11;
#include <air-modes/slicer.h>
#include <air_modes/slicer.h>
// pydoc.h is automatically generated in the build directory
#include <slicer_pydoc.h>
void bind_slicer(py::module& m)
{
using slicer = gr::air-modes::slicer;
using slicer = ::gr::air_modes::slicer;
py::class_<slicer, gr::block, gr::basic_block,
py::class_<slicer, gr::sync_block, gr::block, gr::basic_block,
std::shared_ptr<slicer>>(m, "slicer", D(slicer))
.def(py::init(&slicer::make),
py::arg("queue"),
D(slicer,make)
)