[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Is it safe to use get_tags_in_range within foreca
From: |
Michael Dickens |
Subject: |
Re: [Discuss-gnuradio] Is it safe to use get_tags_in_range within forecast? |
Date: |
Thu, 18 Jan 2018 10:13:20 -0500 |
Hi Markus - I think you'd be safe using a 1:1 sync block; ignore forecast since
it's just an estimate & at least some of the time your block is copying 1:1 so
it's kinda in the right ballpark; then in ::work() retrieve all of the rags in
input range & if your special one is found then copy the data starting with
that tag location & make sure to return the correct value for the # of items
generated. If your tag isn't found, then just drop the data. You'll have better
control of you inherit from gr::block instead of gr::sync_block, but I think
either could work. What you're looking to do, I think, is basically a tag-based
flow control or gate & the above should work fine for it. Hope this is useful.
- MLD
On Wed, Jan 17, 2018, at 6:28 AM, Markus Wirsing wrote:
> What I want to do is write a block that copies a certain number of
> samples after a certain tag to the output and drops all other samples.
> I'll go through your questions below. But any further ideas on how to
> implement this would also be appreciated.