diff options
author | Tom Rondeau | 2012-03-31 15:26:40 -0400 |
---|---|---|
committer | Tom Rondeau | 2012-03-31 17:02:04 -0400 |
commit | 5d3d5cf4315e14be805d8b87c00d0110c4a79797 (patch) | |
tree | 8612438a51ac35ba957668c210e4cb4d1e43f96b /grc/blocks | |
parent | 1aecf53489a4fa76f6a818c170941faa1d02c43a (diff) | |
download | gnuradio-5d3d5cf4315e14be805d8b87c00d0110c4a79797.tar.gz gnuradio-5d3d5cf4315e14be805d8b87c00d0110c4a79797.tar.bz2 gnuradio-5d3d5cf4315e14be805d8b87c00d0110c4a79797.zip |
core: adds vlen and scalar args to type converter blocks in GRC.
Also fixes documentation for these blocks.
Diffstat (limited to 'grc/blocks')
-rw-r--r-- | grc/blocks/Makefile.am | 3 | ||||
-rw-r--r-- | grc/blocks/block_tree.xml | 3 | ||||
-rw-r--r-- | grc/blocks/gr_char_to_float.xml | 17 | ||||
-rw-r--r-- | grc/blocks/gr_char_to_short.xml | 28 | ||||
-rw-r--r-- | grc/blocks/gr_float_to_char.xml | 17 | ||||
-rw-r--r-- | grc/blocks/gr_float_to_int.xml | 35 | ||||
-rw-r--r-- | grc/blocks/gr_float_to_short.xml | 17 | ||||
-rw-r--r-- | grc/blocks/gr_int_to_float.xml | 17 | ||||
-rw-r--r-- | grc/blocks/gr_short_to_char.xml | 28 | ||||
-rw-r--r-- | grc/blocks/gr_short_to_float.xml | 17 |
10 files changed, 177 insertions, 5 deletions
diff --git a/grc/blocks/Makefile.am b/grc/blocks/Makefile.am index 104ba8062..37f493ce5 100644 --- a/grc/blocks/Makefile.am +++ b/grc/blocks/Makefile.am @@ -61,6 +61,7 @@ dist_ourdata_DATA = \ gr_argmax_xx.xml \ gr_channel_model.xml \ gr_char_to_float.xml \ + gr_char_to_short.xml \ gr_chunks_to_symbols.xml \ gr_complex_to_arg.xml \ gr_complex_to_float.xml \ @@ -93,6 +94,7 @@ dist_ourdata_DATA = \ gr_fir_filter_xxx.xml \ gr_float_to_char.xml \ gr_float_to_complex.xml \ + gr_float_to_int.xml \ gr_float_to_short.xml \ gr_float_to_uchar.xml \ gr_fractional_interpolator_xx.xml \ @@ -149,6 +151,7 @@ dist_ourdata_DATA = \ gr_sample_and_hold_xx.xml \ gr_scrambler_bb.xml \ gr_short_to_float.xml \ + gr_short_to_char.xml \ gr_sig_source_x.xml \ gr_simple_correlator.xml \ gr_simple_framer.xml \ diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml index 6c4cc0e88..42187585e 100644 --- a/grc/blocks/block_tree.xml +++ b/grc/blocks/block_tree.xml @@ -73,13 +73,16 @@ <block>gr_complex_to_float</block> <block>gr_float_to_complex</block> + <block>gr_float_to_int</block> <block>gr_float_to_short</block> <block>gr_short_to_float</block> + <block>gr_short_to_char</block> <block>gr_int_to_float</block> <block>gr_float_to_char</block> <block>gr_char_to_float</block> + <block>gr_char_to_short</block> <block>gr_float_to_uchar</block> <block>gr_uchar_to_float</block> diff --git a/grc/blocks/gr_char_to_float.xml b/grc/blocks/gr_char_to_float.xml index 9ab778051..838b6a203 100644 --- a/grc/blocks/gr_char_to_float.xml +++ b/grc/blocks/gr_char_to_float.xml @@ -8,13 +8,28 @@ <name>Char To Float</name> <key>gr_char_to_float</key> <import>from gnuradio import gr</import> - <make>gr.char_to_float()</make> + <make>gr.char_to_float($vlen, $scale)</make> + <callback>set_scale($scale)</callback> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Scale</name> + <key>scale</key> + <value>1</value> + <type>real</type> + </param> <sink> <name>in</name> <type>byte</type> + <vlen>$vlen</vlen> </sink> <source> <name>out</name> <type>float</type> + <vlen>$vlen</vlen> </source> </block> diff --git a/grc/blocks/gr_char_to_short.xml b/grc/blocks/gr_char_to_short.xml new file mode 100644 index 000000000..57261e084 --- /dev/null +++ b/grc/blocks/gr_char_to_short.xml @@ -0,0 +1,28 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Char to Short: +################################################### + --> +<block> + <name>Char To Short</name> + <key>gr_char_to_short</key> + <import>from gnuradio import gr</import> + <make>gr.char_to_short($vlen)</make> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>byte</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>short</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_float_to_char.xml b/grc/blocks/gr_float_to_char.xml index 907de7743..1fa500e3c 100644 --- a/grc/blocks/gr_float_to_char.xml +++ b/grc/blocks/gr_float_to_char.xml @@ -8,13 +8,28 @@ <name>Float To Char</name> <key>gr_float_to_char</key> <import>from gnuradio import gr</import> - <make>gr.float_to_char()</make> + <make>gr.float_to_char($vlen, $scale)</make> + <callback>set_scale($scale)</callback> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Scale</name> + <key>scale</key> + <value>1</value> + <type>real</type> + </param> <sink> <name>in</name> <type>float</type> + <vlen>$vlen</vlen> </sink> <source> <name>out</name> <type>byte</type> + <vlen>$vlen</vlen> </source> </block> diff --git a/grc/blocks/gr_float_to_int.xml b/grc/blocks/gr_float_to_int.xml new file mode 100644 index 000000000..b43c208a5 --- /dev/null +++ b/grc/blocks/gr_float_to_int.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Float to Int: +################################################### + --> +<block> + <name>Float To Int</name> + <key>gr_float_to_int</key> + <import>from gnuradio import gr</import> + <make>gr.float_to_int($vlen, $scale)</make> + <callback>set_scale($scale)</callback> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Scale</name> + <key>scale</key> + <value>1</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>float</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>int</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_float_to_short.xml b/grc/blocks/gr_float_to_short.xml index cb2bcd4be..4f76b8f58 100644 --- a/grc/blocks/gr_float_to_short.xml +++ b/grc/blocks/gr_float_to_short.xml @@ -8,13 +8,28 @@ <name>Float To Short</name> <key>gr_float_to_short</key> <import>from gnuradio import gr</import> - <make>gr.float_to_short()</make> + <make>gr.float_to_short($vlen, $scale)</make> + <callback>set_scale($scale)</callback> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Scale</name> + <key>scale</key> + <value>1</value> + <type>real</type> + </param> <sink> <name>in</name> <type>float</type> + <vlen>$vlen</vlen> </sink> <source> <name>out</name> <type>short</type> + <vlen>$vlen</vlen> </source> </block> diff --git a/grc/blocks/gr_int_to_float.xml b/grc/blocks/gr_int_to_float.xml index 8e6d024e2..7430fec72 100644 --- a/grc/blocks/gr_int_to_float.xml +++ b/grc/blocks/gr_int_to_float.xml @@ -8,13 +8,28 @@ <name>Int To Float</name> <key>gr_int_to_float</key> <import>from gnuradio import gr</import> - <make>gr.int_to_float()</make> + <make>gr.int_to_float($vlen, $scale)</make> + <callback>set_scale($scale)</callback> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Scale</name> + <key>scale</key> + <value>1</value> + <type>real</type> + </param> <sink> <name>in</name> <type>int</type> + <vlen>$vlen</vlen> </sink> <source> <name>out</name> <type>float</type> + <vlen>$vlen</vlen> </source> </block> diff --git a/grc/blocks/gr_short_to_char.xml b/grc/blocks/gr_short_to_char.xml new file mode 100644 index 000000000..9c41da84e --- /dev/null +++ b/grc/blocks/gr_short_to_char.xml @@ -0,0 +1,28 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Short to char: +################################################### + --> +<block> + <name>Short To Char</name> + <key>gr_short_to_char</key> + <import>from gnuradio import gr</import> + <make>gr.short_to_char($vlen)</make> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>short</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>byte</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_short_to_float.xml b/grc/blocks/gr_short_to_float.xml index 8dac97c09..529f8c78c 100644 --- a/grc/blocks/gr_short_to_float.xml +++ b/grc/blocks/gr_short_to_float.xml @@ -8,13 +8,28 @@ <name>Short To Float</name> <key>gr_short_to_float</key> <import>from gnuradio import gr</import> - <make>gr.short_to_float()</make> + <make>gr.short_to_float($vlen, $scale)</make> + <callback>set_scale($scale)</callback> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Scale</name> + <key>scale</key> + <value>1</value> + <type>real</type> + </param> <sink> <name>in</name> <type>short</type> + <vlen>$vlen</vlen> </sink> <source> <name>out</name> <type>float</type> + <vlen>$vlen</vlen> </source> </block> |