discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: Embedded Python basic_block input buffer lengths


From: Jeff Long
Subject: Re: Embedded Python basic_block input buffer lengths
Date: Fri, 26 Mar 2021 13:02:19 -0400

The input lengths will be correct, and you can read and/or consume up to that much for each corresponding input. The output lengths are the maximum amount you can write to each output. The work() return value is the usual way to say how much you wrote to every output. For a sync block, it usually does not make sense to read past the data you are going to consume, but it's not wrong.

On Fri, Mar 26, 2021 at 12:20 PM Achilleas Anastasopoulos <anastas@umich.edu> wrote:
Hi Jeff,

Thanks for the pointers!

I did not realize that I could only process the minimum length of the two input buffers.
Dumb mistake on my part...
I just changed that and everything works fine.

BTW, just to confirm:

Is the minimum of the length of all input buffers to be trusted, even if it is larger than the number from forecast?
ie, if forecast says inputs have to be 10 times the required outputs,
and len(output_items[0])=100
and len(input_items[0])=1010, and len(input_items[0])=1005
can I trust the contents of the input buffers 0:1004 ? 

thanks again,
Achilleas

reply via email to

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