i’ve a _bb block that i wrote. On the first call to work() i
get 2047 bytes, 2nd call 127, then 7 and then 1 byte …then the
whole thing starts again.
The scheduler will basically give you every input sample it has
I would like to get the same amount of data for each call to
work() (e.g. always 512 bytes on input). Is that possible?
You can ensure that you always get AT LEAST AS MANY input items as you
need by making your own forecast() method. If more data is available,
you will get more, but you don’t need to consume all of it. Look at
some of the blocks that inherit from gr_block instead of gr_sync_block.
Where does 2047, 127, 7 and 1 come from anyway?
(2^11 - 1, 2^7 -1, 2^3 - 1, 2^1 - 1)
Buffer sizes tend to be in multiples of a page.