From 8714e249cdfeb1da4405c35ecc8ab718e4e7dcc6 Mon Sep 17 00:00:00 2001 From: Josh Morman <mormjb@gmail.com> Date: Thu, 23 Apr 2020 08:05:31 -0400 Subject: blocks: add pybind11 bindings --- .../python/blocks/bindings/message_debug_python.cc | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 gr-blocks/python/blocks/bindings/message_debug_python.cc (limited to 'gr-blocks/python/blocks/bindings/message_debug_python.cc') 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)) + + ; +} -- cgit v1.2.3