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:
- write a simple sync block that takes as a
parameter a tag key to strip
- 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
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio