|
From: | Tom Rondeau |
Subject: | Re: [Discuss-gnuradio] possible bug in tag->srcid processing |
Date: | Wed, 1 Oct 2014 10:47:59 -0400 |
It looks like you're doing it right. The example gr-blocks/examples/vector_source_with_tags.grc does the same thing, and also fails to report srcid correctly.
Walked through the process in Python and it works fine.
In [57]: h = pmt.to_pmt('hello')
In [58]: type(h)
Out[58]: pmt.pmt_swig.swig_int_ptr
In [59]: pmt.is_symbol(h)
Out[59]: True
So, probably not a swig problem. Somehow, the 'symbolness' of srcid is getting lost before it gets to the tag debug block.
Removed the is_symbol() check in tag debug, and got this:
thread[thread-per-block[2]: <block tag_debug (3)>]:
pmt_symbol_to_string: wrong_type : #f
Gave up.
- Jeff
On 09/25/2014 08:50 PM, Jared Dulmage wrote:
_______________________________________________This issue is for GNURadio 3.7.4 on Ubuntu 14.04 and gcc 4.8.2, swig 2.0.11.
I have a simple GRC flow graph consisting of a vector source -> throttle
-> tag debug. Vector source params:
Vector:[1, ] * 100
Tags: [python_to_tag({'offset': 0, 'key': pmt.to_pmt('PDU'), 'value':
pmt.to_pmt(2.3), 'srcid': pmt.to_pmt('blocks_vector_source_x_0')}),]
Output looks like:
----------------------------------------------------------------------
Tag Debug: Debug tags
Input Stream: 00
Offset: 0 Source: n/a Key: PDU Value: 2.3
----------------------------------------------------------------------
The srcid appears to be correctly translated to a pmt symbol in python
and set in python_to_tag, but in tag_debug_impl.cc:126 the type check
(pmt::is_symbol(d_tags_itr->srcid) ?
pmt::symbol_to_string(d_tags_itr->srcid) : "n/a")
is false. Within the debugger the test pmt::is_bool(d_tags_itr->srcid)
returns true. I am not sure how to further debug this problem. Is this
a swig issue? Am I making a mistake in the tag creation?
Appreciate any suggestions.
Jared.
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Prev in Thread] | Current Thread | [Next in Thread] |