On 06/23/2012 07:50 PM, Stephen wrote:
> I have a question about gr_message. Does gr_message work with anything
> but strings? I see where a call to gr_make_message_from_string copies
> the string into the message but I don't see anything done with arg1 or
> arg2. The same for just creating a message and passing in arg1 and arg2.
> I don't see them ever put into the message. Am I not understanding
> something or are strings the only message data that works?
gr_message is basically just a binary blob (aka a string) and like 2 or
3 random integers. The scope plotter makes use of arg1 and arg2 for
example, so its really up to the implementation to interpret the blob
and the args. I suspect the args were added when the author got sick of
parsing integers out of the blob. :-)
If you want something more structured than a simple blob, gnuradio has
basically replaced the need for gr_message with the PMT library and the
the gr_msg_queue with the gruel::msg_queue. Unfortunately, all of the
existing code (basically wx gui and those horrid benchmark examples)
does not use the new stuff.