I’ve set up a very simple flow graph, just a vector source, throttle and
file sink, and I would like to place a tag on the first element of the
vector that contains time metadata. I’m using this code:
#write at tag to output port 0 with given absolute item offset
self.add_item_tag(0, offset, key, value)
I think the problem has something to do with not implementing the
correct modules. My question is, what are the appropriate modules to
import to read and write stream tags in python?
set item_index to x so the tag gets associated with outputs_items[0][x]
You might want to look more that that coding guide, at lot of the
snippets are just work functions, but many contain full class
definitions with import statements. For example:
Thanks!
Do you by any chance have links to specific code examples that could
help
out? I’ve been trying to look at old examples you have posted to others
on
this forum, however, some of the links from github seem to be broken.
Thanks!
Do you by any chance have links to specific code examples that could help
out? I’ve been trying to look at old examples you have posted to others on
this forum, however, some of the links from github seem to be broken.
There was a lot of work in various branches off of gnuradio which I had
merged into next. That branch is gone, and that work has been combined
into the GrExtras project. The link and relevant coding guide was
moved/updated: Home · guruofquality/grextras Wiki · GitHub
I also had one more quick question, I’m getting this error:
‘gr_top_block_sptr’ object has no attribute ‘add_item_tag’, though I
thought add_item_tag was inherited from gr_block.
Thanks again!
Not sure, you might send a code snippet. It looks like you are calling a
method of the top block, and not from the block’s work function?
Also, I’ve been assuming that nitems_written/read is from
gr_block_detail,
and add_item_tag is from gr_block and that they have both been swigged,
since you used them in your example. Is it possible that they haven’t
been?
Thanks
-Anisha
I also had one more quick question, I’m getting this error:
‘gr_top_block_sptr’ object has no attribute ‘add_item_tag’, though I
thought add_item_tag was inherited from gr_block.
Thanks again!