discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Suppressing UHD prints


From: Koslowski, Sebastian (CEL)
Subject: Re: [Discuss-gnuradio] Suppressing UHD prints
Date: Mon, 6 Jul 2015 20:40:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0


On 07/06/2015 07:25 PM, Jared Dulmage 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 <block>.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] http://www.swig.org/Doc3.0/SWIGDocumentation.html#SWIG_nn30
[2]
https://github.com/gnuradio/gnuradio/blob/master/gnuradio-runtime/lib/block_gateway_impl.cc

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

Dipl.-Ing. Sebastian Koslowski
Research Associate

Kaiserstraße 12
Building 05.01
76131 Karlsruhe, Germany

Phone: +49 721 608-46275
Fax:   +49 721 608-46071
Email: address@hidden
Web:   http://www.cel.kit.edu/

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]