diff options
author | Josh Morman <mormjb@gmail.com> | 2020-04-23 08:05:31 -0400 |
---|---|---|
committer | Josh Morman <mormjb@gmail.com> | 2020-06-04 10:05:47 -0400 |
commit | 8714e249cdfeb1da4405c35ecc8ab718e4e7dcc6 (patch) | |
tree | ba54f56c0f9951855ddade5f426ad34c9efb0ce0 /gr-blocks/python/blocks/bindings/complex_to_real_python.cc | |
parent | 2aaa3593989a709911a83aa4890a8f6a22c484f3 (diff) |
blocks: add pybind11 bindings
Diffstat (limited to 'gr-blocks/python/blocks/bindings/complex_to_real_python.cc')
-rw-r--r-- | gr-blocks/python/blocks/bindings/complex_to_real_python.cc | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gr-blocks/python/blocks/bindings/complex_to_real_python.cc b/gr-blocks/python/blocks/bindings/complex_to_real_python.cc new file mode 100644 index 0000000000..9e59c2a88a --- /dev/null +++ b/gr-blocks/python/blocks/bindings/complex_to_real_python.cc @@ -0,0 +1,40 @@ +/* + * 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/blocks/complex_to_real.h> +// pydoc.h is automatically generated in the build directory +#include <complex_to_real_pydoc.h> + +void bind_complex_to_real(py::module& m) +{ + + using complex_to_real = ::gr::blocks::complex_to_real; + + + py::class_<complex_to_real, + gr::sync_block, + gr::block, + gr::basic_block, + std::shared_ptr<complex_to_real>>(m, "complex_to_real", D(complex_to_real)) + + .def(py::init(&complex_to_real::make), + py::arg("vlen") = 1, + D(complex_to_real, make)) + + + ; +} |