[Top][All Lists]

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

[Discuss-gnuradio] Pad 'idle' items when an upstream block gives nothing

From: Jeon
Subject: [Discuss-gnuradio] Pad 'idle' items when an upstream block gives nothing
Date: Wed, 21 Oct 2015 21:53:31 +0900

Consider a flow graph like: http://i.imgur.com/bNa6YuQ.png

Message source produces a short message. Period is quite long. Thus, There should be a long idle time.

I'd like to build a block 'pad idle'. The block pad a predefined sequence if the upstream block gives nothing.

I think a prototype would be: https://gist.github.com/gsongsong/d40b85a76ab8e80ae468#file-gistfile1-txt-L11

By setting the number of required items to zero in forecast(), general_work() will be called even there is no items received. And general work() checks the ninput_items and if it is zero, generates some idle-padding samples/patterns. Otherwise, it just handles and passess a message/samples to downstream.

But it's just my thought. There may be a couple of considerations.

1. Is it allowed to forecast zero item? And does it behave as I expect?
2. If forecasting zero item is possible, willl general_work() be called extremely frequently so that other blocks are prevented from being called?


reply via email to

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