discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] possible bug in tag->srcid processing


From: Jeff Long
Subject: Re: [Discuss-gnuradio] possible bug in tag->srcid processing
Date: Wed, 01 Oct 2014 19:55:28 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

On 10/01/2014 10:47 AM, Tom Rondeau wrote:
On Thu, Sep 25, 2014 at 11:17 PM, Jeff Long <address@hidden
<mailto:address@hidden>> wrote:

    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


Hey guys,

Can one of you open an issue on the issue tracker? It'd really help if
you can throw up a simple test case, too.

Thanks!

Tom

Turns out that the vector_source does not use the srcid parameter, and the default srcid for a tag is PMT_F, so everything is working correctly, just not as expected. The user-supplied srcid is ignored.

It would seem like a good idea to fill in this field. The question is with what? The srcid supplied with each tag? The actual srcid of the vector_source, ignoring the supplied value?

- 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 <mailto:address@hidden>
        https://lists.gnu.org/mailman/__listinfo/discuss-gnuradio
        <https://lists.gnu.org/mailman/listinfo/discuss-gnuradio>



    _________________________________________________
    Discuss-gnuradio mailing list
    address@hidden <mailto:address@hidden>
    https://lists.gnu.org/mailman/__listinfo/discuss-gnuradio
    <https://lists.gnu.org/mailman/listinfo/discuss-gnuradio>






reply via email to

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