summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--grc/blocks/Makefile.am1
-rw-r--r--grc/blocks/block_tree.xml4
-rw-r--r--grc/blocks/gr_chunks_to_symbols.xml9
-rw-r--r--grc/blocks/gr_delay.xml9
-rw-r--r--grc/blocks/gr_packed_to_unpacked_xx.xml11
-rw-r--r--grc/blocks/gr_stream_mux.xml75
-rw-r--r--grc/blocks/gr_unpacked_to_packed_xx.xml11
7 files changed, 117 insertions, 3 deletions
diff --git a/grc/blocks/Makefile.am b/grc/blocks/Makefile.am
index df3479761..7d0876b2f 100644
--- a/grc/blocks/Makefile.am
+++ b/grc/blocks/Makefile.am
@@ -167,6 +167,7 @@ dist_ourdata_DATA = \
gr_simple_squelch_cc.xml \
gr_single_pole_iir_filter_xx.xml \
gr_skiphead.xml \
+ gr_stream_mux.xml \
gr_stream_to_streams.xml \
gr_stream_to_vector.xml \
gr_streams_to_stream.xml \
diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml
index 6fec0be67..444d922ed 100644
--- a/grc/blocks/block_tree.xml
+++ b/grc/blocks/block_tree.xml
@@ -109,8 +109,10 @@
<block>gr_stream_to_vector</block>
<block>gr_vector_to_stream</block>
-
+
<block>blks2_stream_to_vector_decimator</block>
+
+ <block>gr_stream_mux</block>
</cat>
<cat>
<name>Misc Conversions</name>
diff --git a/grc/blocks/gr_chunks_to_symbols.xml b/grc/blocks/gr_chunks_to_symbols.xml
index b54e710ef..e9da38e9a 100644
--- a/grc/blocks/gr_chunks_to_symbols.xml
+++ b/grc/blocks/gr_chunks_to_symbols.xml
@@ -57,12 +57,21 @@
<value>2</value>
<type>int</type>
</param>
+ <param>
+ <name>Num Ports</name>
+ <key>num_ports</key>
+ <value>1</value>
+ <type>int</type>
+ </param>
+ <check>$num_ports &gt; 0</check>
<sink>
<name>in</name>
<type>$in_type</type>
+ <nports>$num_ports</nports>
</sink>
<source>
<name>out</name>
<type>$out_type</type>
+ <nports>$num_ports</nports>
</source>
</block>
diff --git a/grc/blocks/gr_delay.xml b/grc/blocks/gr_delay.xml
index 64a774def..5cc411a78 100644
--- a/grc/blocks/gr_delay.xml
+++ b/grc/blocks/gr_delay.xml
@@ -47,20 +47,29 @@
<type>int</type>
</param>
<param>
+ <name>Num Ports</name>
+ <key>num_ports</key>
+ <value>1</value>
+ <type>int</type>
+ </param>
+ <param>
<name>Vec Length</name>
<key>vlen</key>
<value>1</value>
<type>int</type>
</param>
+ <check>$num_ports &gt; 0</check>
<check>$vlen &gt; 0</check>
<sink>
<name>in</name>
<type>$type</type>
<vlen>$vlen</vlen>
+ <nports>$num_ports</nports>
</sink>
<source>
<name>out</name>
<type>$type</type>
<vlen>$vlen</vlen>
+ <nports>$num_ports</nports>
</source>
</block>
diff --git a/grc/blocks/gr_packed_to_unpacked_xx.xml b/grc/blocks/gr_packed_to_unpacked_xx.xml
index 5fd9729a4..c1477dd9c 100644
--- a/grc/blocks/gr_packed_to_unpacked_xx.xml
+++ b/grc/blocks/gr_packed_to_unpacked_xx.xml
@@ -38,7 +38,7 @@
<param>
<name>Endianness</name>
<key>endianness</key>
- <type>enum</type>
+ <type>int</type>
<option>
<name>MSB</name>
<key>gr.GR_MSB_FIRST</key>
@@ -48,12 +48,21 @@
<key>gr.GR_LSB_FIRST</key>
</option>
</param>
+ <param>
+ <name>Num Ports</name>
+ <key>num_ports</key>
+ <value>1</value>
+ <type>int</type>
+ </param>
+ <check>$num_ports &gt; 0</check>
<sink>
<name>in</name>
<type>$type</type>
+ <nports>$num_ports</nports>
</sink>
<source>
<name>out</name>
<type>$type</type>
+ <nports>$num_ports</nports>
</source>
</block>
diff --git a/grc/blocks/gr_stream_mux.xml b/grc/blocks/gr_stream_mux.xml
new file mode 100644
index 000000000..8efe7b655
--- /dev/null
+++ b/grc/blocks/gr_stream_mux.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Stream Mux:
+## all types, many inputs, only one output
+###################################################
+ -->
+<block>
+ <name>Stream Mux</name>
+ <key>gr_stream_mux</key>
+ <import>from gnuradio import gr</import>
+ <make>gr.stream_mux($type.size*$vlen, $lengths)</make>
+ <param>
+ <name>Type</name>
+ <key>type</key>
+ <type>enum</type>
+ <option>
+ <name>Complex</name>
+ <key>complex</key>
+ <opt>size:gr.sizeof_gr_complex</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>float</key>
+ <opt>size:gr.sizeof_float</opt>
+ </option>
+ <option>
+ <name>Int</name>
+ <key>int</key>
+ <opt>size:gr.sizeof_int</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>short</key>
+ <opt>size:gr.sizeof_short</opt>
+ </option>
+ <option>
+ <name>Byte</name>
+ <key>byte</key>
+ <opt>size:gr.sizeof_char</opt>
+ </option>
+ </param>
+ <param>
+ <name>Lengths</name>
+ <key>lengths</key>
+ <value>1, 1</value>
+ <type>int_vector</type>
+ </param>
+ <param>
+ <name>Num Inputs</name>
+ <key>num_inputs</key>
+ <value>2</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Vec Length</name>
+ <key>vlen</key>
+ <value>1</value>
+ <type>int</type>
+ </param>
+ <check>$num_inputs &gt; 0</check>
+ <check>$num_inputs == len($lengths)</check>
+ <check>$vlen &gt; 0</check>
+ <sink>
+ <name>in</name>
+ <type>$type</type>
+ <vlen>$vlen</vlen>
+ <nports>$num_inputs</nports>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>$type</type>
+ <vlen>$vlen</vlen>
+ </source>
+</block>
diff --git a/grc/blocks/gr_unpacked_to_packed_xx.xml b/grc/blocks/gr_unpacked_to_packed_xx.xml
index f7457eb5c..427c80082 100644
--- a/grc/blocks/gr_unpacked_to_packed_xx.xml
+++ b/grc/blocks/gr_unpacked_to_packed_xx.xml
@@ -38,7 +38,7 @@
<param>
<name>Endianness</name>
<key>endianness</key>
- <type>enum</type>
+ <type>int</type>
<option>
<name>MSB</name>
<key>gr.GR_MSB_FIRST</key>
@@ -48,12 +48,21 @@
<key>gr.GR_LSB_FIRST</key>
</option>
</param>
+ <param>
+ <name>Num Ports</name>
+ <key>num_ports</key>
+ <value>1</value>
+ <type>int</type>
+ </param>
+ <check>$num_ports &gt; 0</check>
<sink>
<name>in</name>
<type>$type</type>
+ <nports>$num_ports</nports>
</sink>
<source>
<name>out</name>
<type>$type</type>
+ <nports>$num_ports</nports>
</source>
</block>