I had this issue once and if I remember correctly, connecting the block to the flowgraph (i.e. connect any block to your message port, even if that port will never send messages) will make your message handler react to messages from your python code.

Hope this helps
Martin


Am 03.05.2013 19:46, schrieb Sean Nowlan:
On 05/03/2013 01:41 PM, Sean Nowlan wrote:
On 05/03/2013 01:26 PM, Marcus Müller wrote:
Hi Sean,
have you tried using tb.msg_connect(src, "out_port_id", dst,
"in_port_id") instead of tb.connect?

Cheers
Marcus

I'm trying to post a message to a port from top_block as opposed to
connecting the output port of one block to the input of "dst". The
documentation indicates this can be done using
"dst.to_basic_block()._post(port, msg)".Unfortunately this is not
working for me.

http://gnuradio.org/doc/doxygen/page_msg_passing.html

More precisely, posting the message doesn't fail, so I *guess* it
worked. However the handler function is not called. I used the
boost::bind call to bind the message handler function following the lead
of the example code.

--sean



_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to