summaryrefslogtreecommitdiff
path: root/gr-blocks/examples
diff options
context:
space:
mode:
authorTom Rondeau <tom@trondeau.com>2014-10-02 12:18:29 -0400
committerTom Rondeau <tom@trondeau.com>2014-10-02 12:18:29 -0400
commit4f03a54b2b802f0eff6802985ec6479738843c57 (patch)
tree627730c5a39b28b31db1db41c6384fae28dde9da /gr-blocks/examples
parentd598e49b4ca0a63985c675a12dc78cbc2a8931ee (diff)
blocks: better handling of srcid with vector_source blocks.
- vector_source now adds the srcid of the tag to the actual tag stream. - tag_utils' python_to_tag can now be called with just 3 parameters by omitting the srcid; gets filled in with PMT_F. - updated vector_source_with_tags example to have tags with and without srcid set.
Diffstat (limited to 'gr-blocks/examples')
-rw-r--r--gr-blocks/examples/vector_source_with_tags.grc128
1 files changed, 106 insertions, 22 deletions
diff --git a/gr-blocks/examples/vector_source_with_tags.grc b/gr-blocks/examples/vector_source_with_tags.grc
index 981ee6cf9d..e266b91f85 100644
--- a/gr-blocks/examples/vector_source_with_tags.grc
+++ b/gr-blocks/examples/vector_source_with_tags.grc
@@ -69,7 +69,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>samp_rate</value>
+ <value>tag1</value>
</param>
<param>
<key>_enabled</key>
@@ -77,7 +77,7 @@
</param>
<param>
<key>value</key>
- <value>32000</value>
+ <value>gr.tag_utils.python_to_tag((1, pmt.intern('mark'), pmt.PMT_T))</value>
</param>
<param>
<key>alias</key>
@@ -85,7 +85,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(184, 11)</value>
+ <value>(16, 267)</value>
</param>
<param>
<key>_rotation</key>
@@ -120,6 +120,33 @@
</param>
</block>
<block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>32000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(184, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
<key>import</key>
<param>
<key>id</key>
@@ -147,10 +174,10 @@
</param>
</block>
<block>
- <key>blocks_vector_source_x</key>
+ <key>blocks_throttle</key>
<param>
<key>id</key>
- <value>blocks_vector_source_x_0</value>
+ <value>blocks_throttle_0</value>
</param>
<param>
<key>_enabled</key>
@@ -161,22 +188,18 @@
<value>float</value>
</param>
<param>
- <key>vector</key>
- <value>(-0.75, -0.5, -0.25, 0.0, 0.25, 0.5, 0.75, 0.0)</value>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
</param>
<param>
- <key>tags</key>
- <value>[tag0]</value>
+ <key>vlen</key>
+ <value>1</value>
</param>
<param>
- <key>repeat</key>
+ <key>ignoretag</key>
<value>True</value>
</param>
<param>
- <key>vlen</key>
- <value>1</value>
- </param>
- <param>
<key>alias</key>
<value></value>
</param>
@@ -194,7 +217,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(16, 107)</value>
+ <value>(272, 123)</value>
</param>
<param>
<key>_rotation</key>
@@ -202,10 +225,10 @@
</param>
</block>
<block>
- <key>blocks_throttle</key>
+ <key>blocks_tag_debug</key>
<param>
<key>id</key>
- <value>blocks_throttle_0</value>
+ <value>blocks_tag_debug_0</value>
</param>
<param>
<key>_enabled</key>
@@ -216,15 +239,23 @@
<value>float</value>
</param>
<param>
- <key>samples_per_second</key>
- <value>samp_rate</value>
+ <key>name</key>
+ <value></value>
+ </param>
+ <param>
+ <key>filter</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
</param>
<param>
<key>vlen</key>
<value>1</value>
</param>
<param>
- <key>ignoretag</key>
+ <key>display</key>
<value>True</value>
</param>
<param>
@@ -236,6 +267,53 @@
<value></value>
</param>
<param>
+ <key>_coordinate</key>
+ <value>(456, 195)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_vector_source_x</key>
+ <param>
+ <key>id</key>
+ <value>blocks_vector_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>vector</key>
+ <value>(-0.75, -0.5, -0.25, 0.0, 0.25, 0.5, 0.75, 0.0)</value>
+ </param>
+ <param>
+ <key>tags</key>
+ <value>[tag0, tag1]</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
<key>minoutbuf</key>
<value>0</value>
</param>
@@ -245,7 +323,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(272, 123)</value>
+ <value>(16, 107)</value>
</param>
<param>
<key>_rotation</key>
@@ -592,7 +670,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(440, 107)</value>
+ <value>(456, 107)</value>
</param>
<param>
<key>_rotation</key>
@@ -611,4 +689,10 @@
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
+ <connection>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>blocks_tag_debug_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
</flow_graph>