diff options
author | Jacob Gilbert <mrjacobagilbert@gmail.com> | 2020-08-27 08:11:33 -0700 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2020-10-24 17:45:47 -0400 |
commit | 9248b29768c7810f029a1188726b2ad05141f382 (patch) | |
tree | f67f4ffecb79f4bf962c30f2f134beac86c111ae /gr-blocks/python | |
parent | 88c11a8cf3c437ed0e1a477ce30e7cc01ebc2bfd (diff) |
blocks: improvements to the message_debug block
aggregates the data to be printed into a stringstream so that it is printed at the same time reducing debug information becoming muddled between competing cout statements. this change also provides an argument to this block to disable the printing of PDU uniform vectors which are often not needed for debug purposes
Diffstat (limited to 'gr-blocks/python')
-rw-r--r-- | gr-blocks/python/blocks/bindings/docstrings/message_debug_pydoc_template.h | 3 | ||||
-rw-r--r-- | gr-blocks/python/blocks/bindings/message_debug_python.cc | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/gr-blocks/python/blocks/bindings/docstrings/message_debug_pydoc_template.h b/gr-blocks/python/blocks/bindings/docstrings/message_debug_pydoc_template.h index 61d586e099..d45831e7d6 100644 --- a/gr-blocks/python/blocks/bindings/docstrings/message_debug_pydoc_template.h +++ b/gr-blocks/python/blocks/bindings/docstrings/message_debug_pydoc_template.h @@ -31,3 +31,6 @@ static const char* __doc_gr_blocks_message_debug_num_messages = R"doc()doc"; static const char* __doc_gr_blocks_message_debug_get_message = R"doc()doc"; + + +static const char* __doc_gr_blocks_message_debug_set_vector_print = R"doc()doc"; diff --git a/gr-blocks/python/blocks/bindings/message_debug_python.cc b/gr-blocks/python/blocks/bindings/message_debug_python.cc index c0e2f5ffb8..600fe23588 100644 --- a/gr-blocks/python/blocks/bindings/message_debug_python.cc +++ b/gr-blocks/python/blocks/bindings/message_debug_python.cc @@ -14,7 +14,7 @@ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ /* BINDTOOL_HEADER_FILE(message_debug.h) */ -/* BINDTOOL_HEADER_FILE_HASH(d30bdecc7a85481cac1f2c6ff843509b) */ +/* BINDTOOL_HEADER_FILE_HASH(5768fa881c26e7018f934e8997ac36de) */ /***********************************************************************************/ #include <pybind11/complex.h> @@ -36,7 +36,9 @@ void bind_message_debug(py::module& m) 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(py::init(&message_debug::make), + py::arg("en_uvec") = true, + D(message_debug, make)) .def("num_messages", &message_debug::num_messages, D(message_debug, num_messages)) @@ -47,5 +49,11 @@ void bind_message_debug(py::module& m) py::arg("i"), D(message_debug, get_message)) + + .def("set_vector_print", + &message_debug::set_vector_print, + py::arg("en"), + D(message_debug, set_vector_print)) + ; } |