[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Swig error with add_item_tag
From: |
Martin Braun |
Subject: |
Re: [Discuss-gnuradio] Swig error with add_item_tag |
Date: |
Thu, 10 Apr 2014 09:51:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
Hey Jay,
please make sure to provide GR version number for questions like this,
and point us to the exact source file and line number that's causing the
trouble.
As for your error:
On 04/09/2014 08:34 PM, Jay Radcliffe wrote:
> self.add_item_tag(0, nitems_written + index_start - self.block_size,
> self._burst_tag_symbol, gr.pmt.PMT_T, gr.pmt.PMT_F)
> File
> "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/runtime_swig.py",
> line 5172, in block__add_item_tag
> return _runtime_swig.block_gateway_sptr_block__add_item_tag(self, *args)
> NotImplementedError: Wrong number or type of arguments for overloaded
> function 'block_gateway_sptr_block__add_item_tag'.
> Possible C/C++ prototypes are:
> gr::block_gateway::block__add_item_tag(unsigned int,gr::tag_t const &)
> gr::block_gateway::block__add_item_tag(unsigned
> int,uint64_t,pmt::pmt_t const &,pmt::pmt_t const &,pmt::pmt_t const &)
Python/SWIG is picky with overloading and types.
You could try adding a tag_t instead:
t = gr.tag_t()
t.offset = tag_sample_index
t.key = self._burst_tag_symbol
etc...
self.add_item_tag(0, t)
That said, your code should work. tag_sample_index isn't a double, by
any chance?
M