diff options
Diffstat (limited to 'gr-qtgui/python/qtgui/bindings/waterfall_sink_c_python.cc')
-rw-r--r-- | gr-qtgui/python/qtgui/bindings/waterfall_sink_c_python.cc | 236 |
1 files changed, 236 insertions, 0 deletions
diff --git a/gr-qtgui/python/qtgui/bindings/waterfall_sink_c_python.cc b/gr-qtgui/python/qtgui/bindings/waterfall_sink_c_python.cc new file mode 100644 index 0000000000..2bca9829a5 --- /dev/null +++ b/gr-qtgui/python/qtgui/bindings/waterfall_sink_c_python.cc @@ -0,0 +1,236 @@ +/* + * Copyright 2020 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 */ + +#include <pybind11/complex.h> +#include <pybind11/pybind11.h> +#include <pybind11/stl.h> + +namespace py = pybind11; + +#include <gnuradio/qtgui/utils.h> +#include <qwt_legend.h> +#include <qwt_painter.h> +#include <qwt_plot.h> +#include <qwt_plot_canvas.h> +#include <qwt_plot_curve.h> +#include <qwt_plot_magnifier.h> +#include <qwt_plot_marker.h> +#include <qwt_plot_panner.h> +#include <qwt_plot_zoomer.h> +#include <qwt_scale_engine.h> +#include <qwt_scale_widget.h> +#include <qwt_symbol.h> + +#include <gnuradio/qtgui/waterfall_sink_c.h> +// pydoc.h is automatically generated in the build directory +#include <waterfall_sink_c_pydoc.h> + +void bind_waterfall_sink_c(py::module& m) +{ + + using waterfall_sink_c = ::gr::qtgui::waterfall_sink_c; + + + py::class_<waterfall_sink_c, + gr::sync_block, + gr::block, + gr::basic_block, + std::shared_ptr<waterfall_sink_c>>( + m, "waterfall_sink_c", D(waterfall_sink_c)) + + .def(py::init(&waterfall_sink_c::make), + py::arg("fftsize"), + py::arg("wintype"), + py::arg("fc"), + py::arg("bw"), + py::arg("name"), + py::arg("nconnections") = 1, + py::arg("parent") = __null, + D(waterfall_sink_c, make)) + + + .def("exec_", &waterfall_sink_c::exec_, D(waterfall_sink_c, exec_)) + + + .def("qwidget", &waterfall_sink_c::qwidget, D(waterfall_sink_c, qwidget)) + + + // .def("pyqwidget",&waterfall_sink_c::pyqwidget, + // D(waterfall_sink_c,pyqwidget) + // ) + // For the sip conversion to python to work, the widget object + // needs to be explicitly converted to Long + .def( + "pyqwidget", + [](std::shared_ptr<waterfall_sink_c> p) { + return PyLong_AsLong(p->pyqwidget()); + }, + D(waterfall_sink_c, pyqwidget)) + + + .def("clear_data", &waterfall_sink_c::clear_data, D(waterfall_sink_c, clear_data)) + + + .def("set_fft_size", + &waterfall_sink_c::set_fft_size, + py::arg("fftsize"), + D(waterfall_sink_c, set_fft_size)) + + + .def("fft_size", &waterfall_sink_c::fft_size, D(waterfall_sink_c, fft_size)) + + + .def("set_time_per_fft", + &waterfall_sink_c::set_time_per_fft, + py::arg("t"), + D(waterfall_sink_c, set_time_per_fft)) + + + .def("set_fft_average", + &waterfall_sink_c::set_fft_average, + py::arg("fftavg"), + D(waterfall_sink_c, set_fft_average)) + + + .def("fft_average", + &waterfall_sink_c::fft_average, + D(waterfall_sink_c, fft_average)) + + + .def("set_fft_window", + &waterfall_sink_c::set_fft_window, + py::arg("win"), + D(waterfall_sink_c, set_fft_window)) + + + .def("fft_window", &waterfall_sink_c::fft_window, D(waterfall_sink_c, fft_window)) + + + .def("set_frequency_range", + &waterfall_sink_c::set_frequency_range, + py::arg("centerfreq"), + py::arg("bandwidth"), + D(waterfall_sink_c, set_frequency_range)) + + + .def("set_intensity_range", + &waterfall_sink_c::set_intensity_range, + py::arg("min"), + py::arg("max"), + D(waterfall_sink_c, set_intensity_range)) + + + .def("set_update_time", + &waterfall_sink_c::set_update_time, + py::arg("t"), + D(waterfall_sink_c, set_update_time)) + + + .def("set_title", + &waterfall_sink_c::set_title, + py::arg("title"), + D(waterfall_sink_c, set_title)) + + + .def("set_time_title", + &waterfall_sink_c::set_time_title, + py::arg("title"), + D(waterfall_sink_c, set_time_title)) + + + .def("set_line_label", + &waterfall_sink_c::set_line_label, + py::arg("which"), + py::arg("line"), + D(waterfall_sink_c, set_line_label)) + + + .def("set_line_alpha", + &waterfall_sink_c::set_line_alpha, + py::arg("which"), + py::arg("alpha"), + D(waterfall_sink_c, set_line_alpha)) + + + .def("set_color_map", + &waterfall_sink_c::set_color_map, + py::arg("which"), + py::arg("color"), + D(waterfall_sink_c, set_color_map)) + + + .def("title", &waterfall_sink_c::title, D(waterfall_sink_c, title)) + + + .def("line_label", + &waterfall_sink_c::line_label, + py::arg("which"), + D(waterfall_sink_c, line_label)) + + + .def("line_alpha", + &waterfall_sink_c::line_alpha, + py::arg("which"), + D(waterfall_sink_c, line_alpha)) + + + .def("color_map", + &waterfall_sink_c::color_map, + py::arg("which"), + D(waterfall_sink_c, color_map)) + + + .def("set_size", + &waterfall_sink_c::set_size, + py::arg("width"), + py::arg("height"), + D(waterfall_sink_c, set_size)) + + + .def("auto_scale", &waterfall_sink_c::auto_scale, D(waterfall_sink_c, auto_scale)) + + + .def("min_intensity", + &waterfall_sink_c::min_intensity, + py::arg("which"), + D(waterfall_sink_c, min_intensity)) + + + .def("max_intensity", + &waterfall_sink_c::max_intensity, + py::arg("which"), + D(waterfall_sink_c, max_intensity)) + + + .def("enable_menu", + &waterfall_sink_c::enable_menu, + py::arg("en") = true, + D(waterfall_sink_c, enable_menu)) + + + .def("enable_grid", + &waterfall_sink_c::enable_grid, + py::arg("en") = true, + D(waterfall_sink_c, enable_grid)) + + + .def("disable_legend", + &waterfall_sink_c::disable_legend, + D(waterfall_sink_c, disable_legend)) + + + .def("enable_axis_labels", + &waterfall_sink_c::enable_axis_labels, + py::arg("en") = true, + D(waterfall_sink_c, enable_axis_labels)) + + ; +} |