summaryrefslogtreecommitdiff
path: root/gr-analog/python/analog/bindings/pwr_squelch_cc_python.cc
diff options
context:
space:
mode:
authorJosh Morman <mormjb@gmail.com>2020-04-23 07:54:44 -0400
committerJosh Morman <mormjb@gmail.com>2020-06-04 10:05:47 -0400
commitd8058406fa93becbfd8f5cbde0e96363e190d9ba (patch)
tree3486e94a10cbf2ba28a33e7f9eafbad7a95347a1 /gr-analog/python/analog/bindings/pwr_squelch_cc_python.cc
parent941e6e493cbcc331116d22d346f5d30a6f35dabb (diff)
analog: add pybind11 bindings
Diffstat (limited to 'gr-analog/python/analog/bindings/pwr_squelch_cc_python.cc')
-rw-r--r--gr-analog/python/analog/bindings/pwr_squelch_cc_python.cc81
1 files changed, 81 insertions, 0 deletions
diff --git a/gr-analog/python/analog/bindings/pwr_squelch_cc_python.cc b/gr-analog/python/analog/bindings/pwr_squelch_cc_python.cc
new file mode 100644
index 0000000000..7715f69aa2
--- /dev/null
+++ b/gr-analog/python/analog/bindings/pwr_squelch_cc_python.cc
@@ -0,0 +1,81 @@
+/*
+ * 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/analog/pwr_squelch_cc.h>
+// pydoc.h is automatically generated in the build directory
+#include <pwr_squelch_cc_pydoc.h>
+
+void bind_pwr_squelch_cc(py::module& m)
+{
+
+ using pwr_squelch_cc = ::gr::analog::pwr_squelch_cc;
+
+
+ py::class_<pwr_squelch_cc,
+ gr::analog::squelch_base_cc,
+ std::shared_ptr<pwr_squelch_cc>>(m, "pwr_squelch_cc", D(pwr_squelch_cc))
+
+ .def(py::init(&pwr_squelch_cc::make),
+ py::arg("db"),
+ py::arg("alpha") = 1.0E-4,
+ py::arg("ramp") = 0,
+ py::arg("gate") = false,
+ D(pwr_squelch_cc, make))
+
+
+ .def("squelch_range",
+ &pwr_squelch_cc::squelch_range,
+ D(pwr_squelch_cc, squelch_range))
+
+
+ .def("threshold", &pwr_squelch_cc::threshold, D(pwr_squelch_cc, threshold))
+
+
+ .def("set_threshold",
+ &pwr_squelch_cc::set_threshold,
+ py::arg("db"),
+ D(pwr_squelch_cc, set_threshold))
+
+
+ .def("set_alpha",
+ &pwr_squelch_cc::set_alpha,
+ py::arg("alpha"),
+ D(pwr_squelch_cc, set_alpha))
+
+
+ .def("ramp", &pwr_squelch_cc::ramp, D(pwr_squelch_cc, ramp))
+
+
+ .def("set_ramp",
+ &pwr_squelch_cc::set_ramp,
+ py::arg("ramp"),
+ D(pwr_squelch_cc, set_ramp))
+
+
+ .def("gate", &pwr_squelch_cc::gate, D(pwr_squelch_cc, gate))
+
+
+ .def("set_gate",
+ &pwr_squelch_cc::set_gate,
+ py::arg("gate"),
+ D(pwr_squelch_cc, set_gate))
+
+
+ .def("unmuted", &pwr_squelch_cc::unmuted, D(pwr_squelch_cc, unmuted))
+
+ ;
+}