discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Is there a way to know whether more input data wi


From: Sakthivel Velumani
Subject: Re: [Discuss-gnuradio] Is there a way to know whether more input data will become available?
Date: Wed, 17 Jan 2018 23:20:17 +0100

Hi Markus,

A better way is to specify the amount of data you need for the processing in the forecast function. By doing so, the GNU Radio scheduler will guarantee the sufficient amount of input data and hence you can remove the return 0 from the work function.

Best,
Sakthivel

On Wed, Jan 17, 2018 at 3:20 PM, Markus Wirsing <address@hidden> wrote:
Hello,

I have the following problem:

I wrote a block that does some processing and needs to look ahead in the
data for a certain amount.
Therefore the work function of the sync_block will return 0 if the
current amount of data is insufficient.

This works fine if the program is running infinitely.
However, when using a head block and running to completion,
it can occur that there is no more data available, which leads to the
scheduler infinitely trying again to call the work function, which then
returns 0.
Can this be detected by the block, so that the block can empty the input
buffer and the program can complete?

Or is there another good way to solve this problem?
I feel like this should be a common problem, but I haven't found a good
solution.

Thank you in advance for any hints on how to solve this.

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


reply via email to

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