discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] How to know that the last sample has arrived


From: Ruben Undheim
Subject: Re: [Discuss-gnuradio] How to know that the last sample has arrived
Date: Fri, 21 Apr 2017 19:56:46 +0200

> What about using tagged streams or just a tag on the last sample? Is
> that an option?

So I have been trying out this for a while now. I have created
modified versions of "file_source", "vector_source" and "head" which
all add an "end" stream tag to the last sample. It has turned out VERY
useful, and I think it would be a good idea to include that for all of
them in the mainline code! I could make a pull request if it sounds
interesting.

I have implemented a repeat-block, which uses the "end" tag to know
what to repeat. I have also made a concatenation block with N inputs.
This makes it very easy to for instance pick out samples from a file,
and pad them with let's say 1000000 zeros (or prepend). Putting the
repeat-block afterwards makes the whole sequence (file + 0-sequence)
repeat itself.

However, I have also found one very big caveat.. When using standard
blocks which do decimation, I have not found any reliable way to make
sure that the "end" tag on the very last sample does not simply just
disappear... This causes quite some head-ache. Also when implementing
my own blocks which do decimation, I have to take into account a lot
of different corner cases which are hard to keep track off.


Ruben



reply via email to

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