Stream tags in Python

Dear all,

I need to use stream tags and the get_time_last_pps informations to
control the received data storage. I am wondering how to get the stream
tags in Python?

I tried the method used in C++ and transfered in Python
samp0_count = self.nitems_read(0)
get_tags_in_range(rx_time_tags, 0, samp0_count, samp0_count +
ninput_items)

but got the error:‘gr_top_block_sptr’ object has no attribute
‘nitems_read’

I tried gr.tagged_file_sink to directly store the time tags with the
received data into one data file, though I could not really see the data
file created by this file sink block.

How can I pull out the stream tag from the downstream corresponding with
the received data in order to get the time or number of samples of
certain received data?

Any suggestion will be really appreciated. Thank you so much!

Thanks,
Yan

On 12/01/2011 01:31 PM, Yan N. wrote:

Dear all,

I need to use stream tags and the get_time_last_pps informations to
control the received data storage. I am wondering how to get the
stream tags in Python?

You need my “next” branch installed. (BTW, I am working on squashing
some of this work so Tom will feel safe to merge it into the mainline).

http://gnuradio.org/redmine/projects/gnuradio/wiki/WriteBlocksInPython
http://gnuradio.org/redmine/projects/gnuradio/wiki/BlocksCodingGuide

-josh

Thank you so much for your suggestions. I am wondering how to connect
these work class with other blocks in the flowgraph which have been
built? In other words, how to use them in flowgraph building?