|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] What factor determines input_item size (ninput_items)? |
Date: | Fri, 28 Aug 2015 19:34:15 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
Hi Jeon,What factor determines input_item size (ninput_items)? these are two things: the input item size is the size of a single item, and ninput_items is the amount of items that your (general_)work call sees. You are referring to the second thing: Consider this flow graph: A -> B -> C A is the upstream block (e.g. USRP source), B is your block, and C is a downstream block (e.g. Vector sink). ninput_items is determined by how many samples are available. Your block B has no influence on it; whenever the upstream block A finishes doing its (general_)work, GNU Radio updates the number of items available in the buffer between A and B. It then asks B whether it wants to work on this amount of input samples. I see your forecast method, and it seems to do the right thing: If your block is in the SYNC state, to output anything, it needs 480 items. If there's no 480 input items, GNU Radio won't call your general_work, usually. You should try printing ninput_items, to see if that's correct. Now, your block has two input streams. If they are somehow related, timing and buffer sizes might actually lead to a deadlock situation. Can you give us an overview over the whole flowgraph? Best regards, Marcus On 28.08.2015 19:00, Jeon wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |