From 8526c6bdb330a2bccb99280dffe50de47ff439a5 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 11 Oct 2009 22:18:42 -0700 Subject: [PATCH] Added num_ports to various blocks that have infinite ports possible in io signature. Also, added the gr stream mux block. --- grc/blocks/Makefile.am | 1 + grc/blocks/block_tree.xml | 4 +- grc/blocks/gr_chunks_to_symbols.xml | 9 +++ grc/blocks/gr_delay.xml | 9 +++ grc/blocks/gr_packed_to_unpacked_xx.xml | 11 +++- grc/blocks/gr_stream_mux.xml | 75 +++++++++++++++++++++++++ grc/blocks/gr_unpacked_to_packed_xx.xml | 11 +++- 7 files changed, 117 insertions(+), 3 deletions(-) create mode 100644 grc/blocks/gr_stream_mux.xml diff --git a/grc/blocks/Makefile.am b/grc/blocks/Makefile.am index df347976..7d0876b2 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 6fec0be6..444d922e 100644 --- a/grc/blocks/block_tree.xml +++ b/grc/blocks/block_tree.xml @@ -109,8 +109,10 @@ gr_stream_to_vector gr_vector_to_stream - + blks2_stream_to_vector_decimator + + gr_stream_mux Misc Conversions diff --git a/grc/blocks/gr_chunks_to_symbols.xml b/grc/blocks/gr_chunks_to_symbols.xml index b54e710e..e9da38e9 100644 --- a/grc/blocks/gr_chunks_to_symbols.xml +++ b/grc/blocks/gr_chunks_to_symbols.xml @@ -57,12 +57,21 @@ 2 int + + Num Ports + num_ports + 1 + int + + $num_ports > 0 in $in_type + $num_ports out $out_type + $num_ports diff --git a/grc/blocks/gr_delay.xml b/grc/blocks/gr_delay.xml index 64a774de..5cc411a7 100644 --- a/grc/blocks/gr_delay.xml +++ b/grc/blocks/gr_delay.xml @@ -46,21 +46,30 @@ 0 int + + Num Ports + num_ports + 1 + int + Vec Length vlen 1 int + $num_ports > 0 $vlen > 0 in $type $vlen + $num_ports out $type $vlen + $num_ports diff --git a/grc/blocks/gr_packed_to_unpacked_xx.xml b/grc/blocks/gr_packed_to_unpacked_xx.xml index 5fd9729a..c1477dd9 100644 --- a/grc/blocks/gr_packed_to_unpacked_xx.xml +++ b/grc/blocks/gr_packed_to_unpacked_xx.xml @@ -38,7 +38,7 @@ Endianness endianness - enum + int + + Num Ports + num_ports + 1 + int + + $num_ports > 0 in $type + $num_ports out $type + $num_ports diff --git a/grc/blocks/gr_stream_mux.xml b/grc/blocks/gr_stream_mux.xml new file mode 100644 index 00000000..8efe7b65 --- /dev/null +++ b/grc/blocks/gr_stream_mux.xml @@ -0,0 +1,75 @@ + + + + Stream Mux + gr_stream_mux + from gnuradio import gr + gr.stream_mux($type.size*$vlen, $lengths) + + Type + type + enum + + + + + + + + Lengths + lengths + 1, 1 + int_vector + + + Num Inputs + num_inputs + 2 + int + + + Vec Length + vlen + 1 + int + + $num_inputs > 0 + $num_inputs == len($lengths) + $vlen > 0 + + in + $type + $vlen + $num_inputs + + + out + $type + $vlen + + diff --git a/grc/blocks/gr_unpacked_to_packed_xx.xml b/grc/blocks/gr_unpacked_to_packed_xx.xml index f7457eb5..427c8008 100644 --- a/grc/blocks/gr_unpacked_to_packed_xx.xml +++ b/grc/blocks/gr_unpacked_to_packed_xx.xml @@ -38,7 +38,7 @@ Endianness endianness - enum + int + + Num Ports + num_ports + 1 + int + + $num_ports > 0 in $type + $num_ports out $type + $num_ports -- 2.30.2