Thank you very much Marcus, Michael, Abin, and Ron, really appreciate your responses.
To give some context, I just started designing a prototype reader to implement a custom protocol for backscatter neural implants; very excited to build my platform with GNU-radio :)
After reading all the information from your responses and links provided, I still have a problem with my implementation. According to the buffer sizes that you mentioned, I should not have this problem, but
I think I am missing something. I may need to re-design my system/flow-graph, but I would like to get a last advice/help, if possible. Thanks in advance!
I want my block Decoder to consume_each(>8900) but I get overflows "D" messages. See details below
I have 2 general out of tree blocks: Gate and Decoder.
They both have:
ninput_items_required[0] = noutput_items;
const gr_complex *in = (const gr_complex *) input_items[0];
gr_complex *out = (gr_complex *) output_items[0];
The flow-graph looks like
uhd_source -> fir_filter_ccc -> Gate -> Decoder -> other blocks. (Using a USRP N210 + SBX)
The idea is that I want the block Decoder to only process the input samples when I have received k samples. Let's set k=~8900
So, at the Decoder block general_work(), I set consume_each(0) until ninput_items[0]>=k.
Basically, at the Decoder general_work() I have the following (just a overview, not pseudo-code):
if (ninput_items[0] <k)
//do nothing
//consume_each(0)
else
// process the input samples
//consume_each(k)
My problem is that if I set k~8900, I get 'D' messages on the terminal.
And one interesting? thing happens. When ninput_items[0] gets close to k=8500 (or higher value), is when I start getting 'D', and after
that ninput_items[0] = 800, no matter the value of k.
Thank you.
Laura.