Re: Suppressing UHD prints

@Sebastion “Even if ’ uhd::msg::register_handler’ would be exposed to
python, you
still can’t drop-in your own null-handler. Swig doesn’t support
callbacks in the target language (python).”

This seems precisely what I have observed working with my example from
my question on 7/2/2015 “message passing: strobe or _post?” I use a
Python method as a callback given to .set_msg_handler. This is
certainly called when I use the message strobe to input a message to the
block, but not when using _post. Is this some new feature? Or am I
wrong that the operation is the same?

Jared.

On 07/06/2015 07:25 PM, Jared D. wrote:

@Sebastion “Even if ’ uhd::msg::register_handler’ would be exposed to python,
you
still can’t drop-in your own null-handler. Swig doesn’t support
callbacks in the target language (python).”

This seems precisely what I have observed working with my example from my
question on 7/2/2015 “message passing: strobe or _post?” I use a Python method as
a callback given to .set_msg_handler. This is certainly called when I use
the message strobe to input a message to the block, but not when using _post. Is
this some new feature? Or am I wrong that the operation is the same?

Well SWIG not supporting it (see [1]) doesn’t mean one can’t write
custom code to run Python from the C end. Python blocks are implemented
via a gateway [2] to do this.

Sebastian

[1] SWIG-3.0 Documentation
[2]
gnuradio/gnuradio-runtime/lib/block_gateway_impl.cc at master · gnuradio/gnuradio · GitHub


Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Sebastian Koslowski
Research Associate

Kaiserstrae 12
Building 05.01
76131 Karlsruhe, Germany

Phone: +49 721 608-46275
Fax: +49 721 608-46071
Email: [email protected]
Web: http://www.cel.kit.edu/

KIT University of the State of Baden-Wuerttemberg and National Research
Center of the Helmholtz Association