discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] question about gr_message


From: Josh Blum
Subject: Re: [Discuss-gnuradio] question about gr_message
Date: Sat, 23 Jun 2012 20:22:40 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1


On 06/23/2012 07:50 PM, Stephen wrote:
> 
> Hi,
> 
> 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?
> 
> stephen
> 

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.

See relevant headers here:
http://gnuradio.org/cgit/gnuradio.git/tree/gruel/src/include/gruel/pmt.h
http://gnuradio.org/cgit/gnuradio.git/tree/gruel/src/include/gruel/msg_queue.h

And if you want something even *more* structured, here is a formal
message passing API implemented at the gnuradio block level with PMTs:
https://github.com/guruofquality/grextras/wiki#wiki-feature-message-passing

-josh


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




reply via email to

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