discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] put a block to sleep


From: Martin Braun
Subject: Re: [Discuss-gnuradio] put a block to sleep
Date: Wed, 21 May 2014 14:53:15 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 21.05.2014 11:53, Mostafa Alizadeh wrote:
Hello everybody,

I want to connect a source to a sink block but there must be a sort of
synchronization between them. The sink block should ask the source to
generate data stream on some specific instances. Between these
instances, the source block must put to the sleep or be disabled. How
could I do this?

I thought it was possible with exchanging messages between these two
blocks by which the sink block send a message to the source to disable
or enable it. But this doesn't work because the scheduler will remain on
the source after generating only one block of data (I need to generate
just one block) at the start up of the flowgraph!

If you just need one block, you can use blocks.head.
To "keep your block alive", you can use a heartbeat message: Give your block another message port, and use the message strobe to send it messages every N ms. Once it's alive, you can figure out if you need your source to send more data.

M



reply via email to

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