discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Setting the noutput_items variable in a tagged_stream


From: Gonzalo Arcos
Subject: [Discuss-gnuradio] Setting the noutput_items variable in a tagged_stream_block
Date: Sat, 2 Apr 2016 21:22:41 -0300

Hello,

I am doing changes to the OFDM carrier allocator block, just to test a few things. This block is a tagged stream block.

I've seen that tagged stream blocks have a function called calculate_output_stream_length, that according to the documentation does the following: "Given a number of input items, it returns the maximum number of output items." Also, the documentation says that forecast should not be overriden in tagged stream blocks which is logical.

The problem i am facing is that when work() is called for the ofdm carrier allocator, the value of the parameter noutput_items has nothing to do with the number returned by calculate_output_stream_length. I was expecting for it to be the same, since as far as i understand that is the use of the calculate_output_stream_length function, to determine how many outputItems i will have when executing the work function for a given number of input items.. 

The number that comes in the parameter noutput_items when work is called, is always half of the number set in the Min Ouput Buffer variable for that block, which is visible from GNU Radio Companion. If i set 0 there, then the default buffer size is used. 
The problem that i am facing is that the default value is not always big enough, and in these cases the flowgraph wont work. However, i do not want to assign an excessively high value for the buffer if i am not gonna use it, that is why i need to dynamically change the noutput_items based on the number of input items, which is exactly what calculate_output_stream_length is supposed to do!

Any ideas why i am experiencing this behavior from GNU Radio?

Thanks in advance.

reply via email to

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