On Sat, Jul 18, 2015 at 1:19 AM, Richard Bell <richard.be...@gmail.com>
wrote:

> Since tags are in a different buffer then data, if I use get_tags_in_range
> to get tags outside the current noutput_items worth of data I'm working on,
> and erase one of those tags, would the tag simply disappear from the sample
> that has long ago passed through the block?
>
> Here is an example:
>
> nitems_read = 1000;
> noutput_items = 50;
> get_tags_in_range(tags, 0, 100, 200);
> tags.erase(tags.begin());
>
> You can see the current block of data lies between items 1000 and 1049 but
> I'm deleting a tag from the range 100 to 200, whose item may be several
> blocks upstream by now.
>
> If all this works as I've described above, how can we protect blocks up
> stream that may be acting on this tag when it suddenly disappears because
> of an erase call like the one above?
>
> Rich
>

No, what you are describing does not affect downstream blocks. When you
issue get_tags_in_range, we actually only provide you a copy of the tags
from your block's local tag buffer. Erasing it like you're doing here
doesn't remove it from the underlying buffer, just the vector 'tags' that
you have built locally. When tags propagate, the buffer (implemented as a
multimap) is moved downstream by copying each tag in the map from the input
port(s) to the output port(s) based on the propagation policy you set.

The model you are probably looking at in some of the sync blocks is just us
erasing the tags in the local vector. It's just the way we decided to keep
track of the information there, but it does not (should not) affect the
propagation downstream by removing it.

Tom
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to