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/message_debug_python.cc | |
parent | 2aaa3593989a709911a83aa4890a8f6a22c484f3 (diff) |
blocks: add pybind11 bindings
Diffstat (limited to 'gr-blocks/python/blocks/bindings/message_debug_python.cc')
-rw-r--r-- | gr-blocks/python/blocks/bindings/message_debug_python.cc | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gr-blocks/python/blocks/bindings/message_debug_python.cc b/gr-blocks/python/blocks/bindings/message_debug_python.cc new file mode 100644 index 0000000000..198a14c1cb --- /dev/null +++ b/gr-blocks/python/blocks/bindings/message_debug_python.cc @@ -0,0 +1,43 @@ +/* + * 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/message_debug.h> +// pydoc.h is automatically generated in the build directory +#include <message_debug_pydoc.h> + +void bind_message_debug(py::module& m) +{ + + using message_debug = ::gr::blocks::message_debug; + + + py::class_<message_debug, gr::block, gr::basic_block, std::shared_ptr<message_debug>>( + m, "message_debug", D(message_debug)) + + .def(py::init(&message_debug::make), D(message_debug, make)) + + + .def("num_messages", &message_debug::num_messages, D(message_debug, num_messages)) + + + .def("get_message", + &message_debug::get_message, + py::arg("i"), + D(message_debug, get_message)) + + ; +} |