[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Examples of Python code using 'current_tags' func
From: |
Vasil Velichkov |
Subject: |
Re: [Discuss-gnuradio] Examples of Python code using 'current_tags' function for Tag Debug block |
Date: |
Wed, 4 Sep 2019 04:08:04 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
Hi Marcus,
On 03/09/2019 08.21, Marcus D. Leech wrote:
> The subject pretty-much says it all.
>
> I'm looking for a Python example of code that uses the 'current_tags'
> function for the Tag Debug block, and picks apart the resulting tag(s).
See:
https://github.com/gnuradio/gnuradio/blob/822aedb5b8934549a10b70dc602a178f9765eef0/gr-blocks/python/blocks/qa_file_metadata.py#L103-L119
https://github.com/gnuradio/gnuradio/blob/822aedb5b8934549a10b70dc602a178f9765eef0/gr-blocks/python/blocks/qa_burst_tagger.py#L42-L57
https://github.com/gnuradio/gnuradio/blob/822aedb5b8934549a10b70dc602a178f9765eef0/gr-digital/python/digital/qa_correlate_access_code_tag.py#L54-L60
> In Python land are the tags just a tuple/list or a dictionary? I've snarfled
> through the generated SWIG code, and can't seem to decipher it.
>
> I'd expect perhaps a tuple:
>
> (offset, tag, value, srcid)
>
> With "tag", "value" and "srcid" all being PMTs.
>
It's not a tuple or list but some swig object
(<gnuradio.gr.runtime_swig.tag_t; proxy of <Swig Object of type 'gr::tag_t *'
at 0x7fb5ed6883c0> >, <gnuradio.gr.runtime_swig.tag_t; proxy of <Swig Object of
type 'gr::tag_t *' at 0x7fb5ed6884e0> >)
Hope this helps.
Cheers,
Vasil