Hi All,

I'm working with 2 blocks that I've created using "UHD_AMsg_Source" as a
reference model. In these blocks, I am passing pmt_dict type as messages,
ie:

 this->post_msg(0, AMSG_KEY, dictionary,_id);

Where, dictionary contains data/metadata that I can read in the next block
downstream.

BLOCK 1  -- (pmt_dict included in the message) -->  BLOCK 2

The blocks are working ok, but the problem is that when I want to generate
several packets and post them downstream, BLOCK 1 runs until finishes and
then BLOCK 2 takes the control until finishes. The problem is the "return"
sentence in my work function. I did 2 possible ways

Option 1: Using -1

work {
//work here
return -1
}

In this way BLOCK 1 stops working after one iteration and it does not run
as many times as I want.

Option 1: Not using return

work {
//work here
}

In this way BLOCK 1 runs many times and posts messages downstream all those
times, but it gives the control to BLOCK 2 when it finishes. Then, BLOCK 2
takes the messages from the message queue. However, this implementation is
not useful for me. BLOCK 1 should post a message downstream and then, BLOCK
2 takes the message and work with the packet.

Any suggestion is welcome, thanks a lot for your time,

Regards,

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

Reply via email to