# Remove portion of tagged stream

**URL:** <https://www.ruby-forum.com/t/remove-portion-of-tagged-stream/242415>\
**Category:** GNU Radio\
**Created:** [June 23, 2015, 1:10am UTC](https://www.ruby-forum.com/t/remove-portion-of-tagged-stream/242415 "2015-06-23T01:10:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [June 23, 2015, 1:10am UTC](https://www.ruby-forum.com/t/remove-portion-of-tagged-stream/242415/1 "2015-06-23T01:10:20Z")

</div>

Hello all,

Question 1:  
I have another “Does this exist already” question. I’m using the  
correlate  
access code block to tag a stream of data. Is there a block that exists  
that will identify a tag and then remove the next X items, where X is  
user  
defined?

I’m not looking to use the Header Payload/Demux for this, because the  
specification I’m designing to does not call out a header and I need to  
remain interoperable.

Question 2:  
Assuming I have to write this block myself, I’d like some confirmation  
of  
my current thought process.

Since the input/output relationship is not constant, as I will be  
removing  
samples (decimating) sometimes but other times copying input to output  
(sync), is the conclusion that I have to use a general block here  
correct?

Question 3:  
When using a general block, it is my responsibility to consume and  
produce  
everything. With this said, if I call produce(X) to place samples in the  
output buffer, then what does the return statement do? If I return 8000,  
what does this mean?

Thanks,  
Rich

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [June 23, 2015, 1:17am UTC](https://www.ruby-forum.com/t/remove-portion-of-tagged-stream/242415/2 "2015-06-23T01:17:56Z")

</div>

On Mon, Jun 22, 2015 at 4:09 PM, Richard B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Is there a block that exists that will identify a tag and then remove the  
> next X items, where X is user defined?

No.

> is the conclusion that I have to use a general block here correct?

Yes

> if I call produce(X) to place samples in the output buffer, then what does  
> the return statement do? If I return 8000, what does this mean?

Use ‘return WORK\_CALLED\_PRODUCE’.

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [June 23, 2015, 1:24am UTC](https://www.ruby-forum.com/t/remove-portion-of-tagged-stream/242415/3 "2015-06-23T01:24:22Z")

</div>

Thank you!

Rich

On Mon, Jun 22, 2015 at 4:16 PM, Johnathan C.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
