Created
October 2, 2014 14:57
-
-
Save trondeau/f44a4f93d0dfdd6820b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/gnuradio-runtime/include/gnuradio/block.h b/gnuradio-runtime/include/gnuradio/block.h | |
index 43fc50c..df58e78 100644 | |
--- a/gnuradio-runtime/include/gnuradio/block.h | |
+++ b/gnuradio-runtime/include/gnuradio/block.h | |
@@ -617,7 +617,7 @@ namespace gr { | |
uint64_t abs_offset, | |
const pmt::pmt_t &key, | |
const pmt::pmt_t &value, | |
- const pmt::pmt_t &srcid=pmt::PMT_F) | |
+ const pmt::pmt_t &srcid=pmt::PMT_NIL) | |
{ | |
tag_t tag; | |
tag.offset = abs_offset; | |
diff --git a/gnuradio-runtime/python/gnuradio/gr/tag_utils.py b/gnuradio-runtime/python/gnuradio/gr/tag_utils.py | |
index cbca9d4..84bdb2e 100644 | |
--- a/gnuradio-runtime/python/gnuradio/gr/tag_utils.py | |
+++ b/gnuradio-runtime/python/gnuradio/gr/tag_utils.py | |
@@ -89,9 +89,22 @@ def python_to_tag(tag_struct): | |
tag.srcid = tag_struct[3] | |
good = True | |
+ elif(len(tag_struct) == 3): | |
+ if(isinstance(tag_struct[0], (int,long))): | |
+ tag.offset = tag_struct[0] | |
+ good = True | |
+ | |
+ if(isinstance(tag_struct[1], pmt.pmt_swig.swig_int_ptr)): | |
+ tag.key = tag_struct[1] | |
+ good = True | |
+ | |
+ if(isinstance(tag_struct[2], pmt.pmt_swig.swig_int_ptr)): | |
+ tag.value = tag_struct[2] | |
+ good = True | |
+ | |
+ tag.srcid = pmt.PMT_NIL | |
+ | |
if(good): | |
return tag | |
else: | |
return None | |
- | |
- | |
diff --git a/gr-blocks/lib/vector_source_X_impl.cc.t b/gr-blocks/lib/vector_source_X_impl.cc.t | |
index 93f672b..cb17c70 100644 | |
--- a/gr-blocks/lib/vector_source_X_impl.cc.t | |
+++ b/gr-blocks/lib/vector_source_X_impl.cc.t | |
@@ -106,7 +106,7 @@ namespace gr { | |
optr += size; | |
for(unsigned t = 0; t < d_tags.size(); t++) { | |
add_item_tag(0, nitems_written(0)+i+d_tags[t].offset, | |
- d_tags[t].key, d_tags[t].value); | |
+ d_tags[t].key, d_tags[t].value, d_tags[t].srcid); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment