discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] GRC Message Source/Sink and Packet Source


From: Josh Blum
Subject: Re: [Discuss-gnuradio] GRC Message Source/Sink and Packet Source
Date: Tue, 05 Jun 2012 09:33:00 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1


On 06/05/2012 03:17 AM, Marius wrote:
> Hi!
> 
> I'm trying to integrate an existing Packet Source into GRC. I have
> some trouble understanding how this is supposed to work:
> 

Actually, this packet sink is integrated into GRC and the design is
actually as regrettable as you can imagine:

http://gnuradio.org/cgit/gnuradio.git/tree/grc/grc_gnuradio/blks2/packet.py

http://gnuradio.org/cgit/gnuradio.git/tree/grc/blocks/blks2_packet_encoder.xml

http://gnuradio.org/cgit/gnuradio.git/tree/grc/blocks/blks2_packet_decoder.xml

The blocks have stream IO all the way, which means there is code slicing
up the stream and feeding the message queue; yes, and spitting it back
out to stream for the decoder.

It probably would be better to have offered a message queue as the input
or output, but these were written before GRC supported message queues.

I also created a version of this packet framer/deframer which uses the
PMT message passing feature instead, there is a nice screenshot in the
message section: https://github.com/guruofquality/grextras/wiki

-josh

> In order to send a packet I need to use the gr_message_queue. How do I
> call a function to add a message to a queue from GRC?
> 
> My Packet Source is supposed to define a message. A Message Sink takes
> one input. I connect that input with a Message Source. I understand
> that in this case the Sink accepts data.
> A packet is a byte data structure. So I want to send bytes to Message
> Sink. How can I return a byte structure into the message sink now? Is
> there any code that does that with GRC block? I know that
> transmit_path.py or benchmark_tx.py do that, but they are not
> separated. Therefore it's by far simpler here.
> 
> Best,
> Marius
> 
> _______________________________________________
> 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]