[Top][All Lists]

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

[Discuss-gnuradio] Detect start of flowgraph for asynchronous blocks

From: Martin Lülf
Subject: [Discuss-gnuradio] Detect start of flowgraph for asynchronous blocks
Date: Thu, 31 Jan 2013 14:29:02 +0100
User-agent: SquirrelMail/1.4.22

Hi list,

I have been playing around with the new message passing interface, but was
unable to detect the start of the flowgraph in my asynchronous block.

The block has a worker thread that will request frames over the network
and send them out over a message port. The worker thread is started in the
constructor of my block like it is done in gr_message_strobe. This will
however result in a race condition since the other side of the message
queue might not have been constructed yet and as a consequence the first
frames (messages) might be send out but not received by any block since
these other blocks have not yet been subscribed to the output port.

So basically I need a different way of starting my worker thread.
Unfortunately the block's start() method does not get called, since my
block is not part of the (stream) flowgraph.
A work-around would be to give my block a stream input and connect it to a
low-rate null source in order to make it receive the start/stop calls, but
that's not elegant at all.

What is the official way of creating a block that will generate
asynchronous messages and wants to make sure that even the first message
it sends out is received by the other blocks?

Any suggestion or pointer into the right direction is appreciated.

Martin Luelf

reply via email to

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