Thursday, April 28, 2022

About flowgraph stop and blocks sending last-data-indicator

Hello,
 
long time lurker, first time poster + newbie in GNURadio and digital signal processing here.
I'm terribly sorry if the question I'm about to ask is already answered in the wiki (couldn't find anything so far).
 
I have a question about flowgraph deconstruction / end of execution for message blocks.
 
Imagine, I have two message passing blocks (written in C++). One msg_send that periodically sends a message to a msg_recv block.
Now, for one reason or another, I'd like msg_recv to know that the message it receives is the last one msg_send will send due to someone/thing stopping the flowgraph.
Is it possible to propagate this somehow aka can msg_send be aware that the flowgraph should stop and send a special message to msg_recv?
I tried building this into msg_send's destructor and, while the message gets sent, it never arrives at msg_receive (I imagine due to a disconnect call on flowgraph end).
So for this to work, msg_send would need to know it is done with its entire work in its work function / message generation function (before the block gets disconnected). Is this possible in any way?
 
On that note, I have a few related questions I couldn't find the answer for:
- Is it guaranteed that a message will arrive at its destination as long as the flowgraph is connected, or can it be dropped somewhere between two blocks?
- What would be the order of block destruction when stopping a flowgraph? Is it first created - last destroyed?
 
Thanks in advance for your help and time
JW

No comments:

Post a Comment