>> >> I want to support proper message passing. I noticed that I can register >> a message handler to receive messages. Can you point me to how messages >> are produced? >> > > So you basically need to create a callback function and set it as the > message handler. So you call: > > template <typename T> void set_msg_handler(T msg_handler){ > d_msg_handler = msg_handler_t(msg_handler); > } > > Where d_msg_handler is of type: > > typedef boost::function<void(pmt::pmt_t)> msg_handler_t; > > You then use gruel::send (in msg_passing.h) to a block that has a message > acceptor handler defined (or not; if there is no handler, nothing happens). > You can see gnuradio-core/src/lib/runtime/qa_set_msg_handler.cc for an > example of this. >
I did my own digging last night, and found that gr_block inherits gr_basic_block inherits gr_msg_accepter which has post(). So the gruel::send is just a function to call this post() method. So, there is nothing here that really deals with message propagation. Message sending exists at the block level but not at the flow graph level. Or am I am misunderstanding. -Josh _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio