discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Selective tag drop/strip/block


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] Selective tag drop/strip/block
Date: Sat, 9 Jul 2016 15:06:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

Hi Steven,

what you're witnessing is the automatic tag propagation that's the default behaviour for GNU Radio blocks.

In your case, default isn't the right behaviour, as it seems!

Luckily, that's pretty easy to change: gr::block::set_tag_propagation_policy() [1]. The default value is TPP_ALL_TO_ALL (I think we have that documented somewhere, but I can't find it, which is the approximate equivalent of undocumented). Call

set_tag_propagation_policy(TPP_DONT);

in your block's constructor, and you should be fine; however, you'll have to manually add input stream tags to your output stream if you need to keep them.


Best regards,

Marcus


[1] http://gnuradio.org/doc/doxygen/classgr_1_1block.html#a476e218927e426ac88c26431cbf086cd


On 07.07.2016 22:17, Steven Knudsen wrote:
Hi,

I have looked at the “tag” blocks in GRC and done a little Googling, but have not found an answer to this, so please bear with me.

A GRC screenshot is attached for reference.

In my MAC I generate a PDU that has a length and tx_time meta-data that is converted by the PDU to Tagged Stream block to a tagged stream. That stream is fed to 3 other blocks to generate a sync sequence, packet header, and payload. Those three tagged streams are recombined by a Tagged Stream Mux block. The sync sequence and packet header generation are using blocks I wrote and I control what tags are propagated, but the payload is processed using native GRC blocks.

As you can guess, the tx_time tag is propagated along with the payload resulting in two tx_time tags in the “packet” output of the Tagged Stream Mux block, which is a problem :-/

I want to strip the tx_time tag out of the payload stream. Without a native block to do it, I have two choices I think:

  1. write a simple sync block that takes as a parameter a tag key to strip
  2. change my MAC block so generate the tx_time tag differently. Maybe create a “PDU Strobe” output that I can use to trigger my sync sequence block?

I am not crazy about #2 as that erodes the general approach of generating a single MAC PDU containing and associated with all its information. It also mean my sync sequence generator block is no longer like the packet header generator in that the latter simply consumes an input stream and for each length tag received generates a packet header.

It appears I’m asking more than one question here, so to be clear

a) is there a selective tag stripping/blocking block available?
b) what would you recommend as a suitable approach?

Thanks for your time and consideration!

steven

Steven Knudsen, Ph.D., P.Eng.

www.linkedin.com/in/knudstevenknudsen


All the wires are cut, my friends
Live beyond the severed ends.  Louis MacNeice




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


reply via email to

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