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