forked from myriadrf/LimeSuiteNG
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gnuradio: add pregenerated python bindings files.
The gnuradio python bindings could be generated during cmake configuration step, but the process might have issues with crawling through gnuradio headers in system path. And the bindings generation process takes relatively long time, so just add the generated files for git tracking and the files are marked to be regenerated automatically if neccessary.
- Loading branch information
Showing
6 changed files
with
427 additions
and
5 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
plugins/gr-limesdr/python/bindings/docstrings/sink_pydoc_template.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
* Copyright 2024 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, limesdr, __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_limesdr_sink = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_sink_0 = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_sink_1 = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_make = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_set_center_freq = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_set_antenna = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_set_nco = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_set_bandwidth = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_set_digital_filter = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_set_gain = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_set_sample_rate = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_set_oversampling = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_calibrate = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_set_buffer_size = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_set_tcxo_dac = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_write_lms_reg = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_set_gpio_dir = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_write_gpio = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_sink_read_gpio = R"doc()doc"; |
72 changes: 72 additions & 0 deletions
72
plugins/gr-limesdr/python/bindings/docstrings/source_pydoc_template.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
* Copyright 2024 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, limesdr, __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_limesdr_source = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_source_0 = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_source_1 = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_make = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_set_center_freq = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_set_antenna = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_set_nco = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_set_bandwidth = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_set_digital_filter = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_set_gain = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_set_sample_rate = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_set_oversampling = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_calibrate = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_set_buffer_size = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_set_tcxo_dac = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_write_lms_reg = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_set_gpio_dir = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_write_gpio = R"doc()doc"; | ||
|
||
|
||
static const char* __doc_gr_limesdr_source_read_gpio = R"doc()doc"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
/* | ||
* Copyright 2024 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(1) */ | ||
/* BINDTOOL_USE_PYGCCXML(0) */ | ||
/* BINDTOOL_HEADER_FILE(sink.h) */ | ||
/* BINDTOOL_HEADER_FILE_HASH(f2afded25eae99fdd12ae231bd440d70) */ | ||
/***********************************************************************************/ | ||
|
||
#include <pybind11/complex.h> | ||
#include <pybind11/pybind11.h> | ||
#include <pybind11/stl.h> | ||
|
||
namespace py = pybind11; | ||
|
||
#include <limesdr/sink.h> | ||
// pydoc.h is automatically generated in the build directory | ||
#include <sink_pydoc.h> | ||
|
||
void bind_sink(py::module& m) | ||
{ | ||
|
||
using sink = ::gr::limesdr::sink; | ||
|
||
|
||
py::class_<sink, gr::sync_block, gr::block, gr::basic_block, std::shared_ptr<sink>>( | ||
m, "sink", D(sink)) | ||
|
||
.def(py::init(&sink::make), | ||
py::arg("serial"), | ||
py::arg("channel_mode"), | ||
py::arg("filename"), | ||
py::arg("length_tag_name"), | ||
D(sink, make)) | ||
|
||
|
||
.def("set_center_freq", | ||
&sink::set_center_freq, | ||
py::arg("freq"), | ||
py::arg("chan") = 0, | ||
D(sink, set_center_freq)) | ||
|
||
|
||
.def("set_antenna", | ||
&sink::set_antenna, | ||
py::arg("antenna"), | ||
py::arg("channel") = 0, | ||
D(sink, set_antenna)) | ||
|
||
|
||
.def("set_nco", | ||
&sink::set_nco, | ||
py::arg("nco_freq"), | ||
py::arg("channel"), | ||
D(sink, set_nco)) | ||
|
||
|
||
.def("set_bandwidth", | ||
&sink::set_bandwidth, | ||
py::arg("analog_bandw"), | ||
py::arg("channel") = 0, | ||
D(sink, set_bandwidth)) | ||
|
||
|
||
.def("set_digital_filter", | ||
&sink::set_digital_filter, | ||
py::arg("digital_bandw"), | ||
py::arg("channel"), | ||
D(sink, set_digital_filter)) | ||
|
||
|
||
.def("set_gain", | ||
&sink::set_gain, | ||
py::arg("gain_dB"), | ||
py::arg("channel") = 0, | ||
D(sink, set_gain)) | ||
|
||
|
||
.def("set_sample_rate", | ||
&sink::set_sample_rate, | ||
py::arg("rate"), | ||
D(sink, set_sample_rate)) | ||
|
||
|
||
.def("set_oversampling", | ||
&sink::set_oversampling, | ||
py::arg("oversample"), | ||
D(sink, set_oversampling)) | ||
|
||
|
||
.def("calibrate", | ||
&sink::calibrate, | ||
py::arg("bandw"), | ||
py::arg("channel") = 0, | ||
D(sink, calibrate)) | ||
|
||
|
||
.def("set_buffer_size", | ||
&sink::set_buffer_size, | ||
py::arg("size"), | ||
D(sink, set_buffer_size)) | ||
|
||
|
||
.def("set_tcxo_dac", | ||
&sink::set_tcxo_dac, | ||
py::arg("dacVal") = 125, | ||
D(sink, set_tcxo_dac)) | ||
|
||
|
||
.def("write_lms_reg", | ||
&sink::write_lms_reg, | ||
py::arg("address"), | ||
py::arg("val"), | ||
D(sink, write_lms_reg)) | ||
|
||
|
||
.def("set_gpio_dir", &sink::set_gpio_dir, py::arg("dir"), D(sink, set_gpio_dir)) | ||
|
||
|
||
.def("write_gpio", &sink::write_gpio, py::arg("out"), D(sink, write_gpio)) | ||
|
||
|
||
.def("read_gpio", &sink::read_gpio, D(sink, read_gpio)) | ||
|
||
; | ||
} |
Oops, something went wrong.