discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Message passing as input and output in block (C++


From: Josh Blum
Subject: Re: [Discuss-gnuradio] Message passing as input and output in block (C++ coding)
Date: Mon, 08 Oct 2012 10:55:31 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0


On 10/07/2012 09:56 PM, Jose Torres Diaz wrote:
> Hi All,
> 
> I have another question about the message passing technique. In this
> opportunity, I would like to create a block that takes message as input,
> but also that post message downstream as output. In my initial attempt, I'm
> using the original blob_to_stream example (see below), the incoming message
> is taken using:
> 
> _msg = this->pop_msg_queue();
> 
> and then, in order to output the incoming message, it is used:
> 
> std::memcpy(output_items[0].get(), blob_mem, noutput_bytes);
> 
> However,
> 
> *(1) Is it possible to use an alternative way like this:
> 
> post_msg(0,_msg.key, _msg.value,_id);   ?


Yes, absolutely. This is the correct way to pass the message downstream.

-josh



reply via email to

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