diff options
author | Johnathan Corgan | 2012-06-25 06:25:04 -0700 |
---|---|---|
committer | Johnathan Corgan | 2012-06-25 06:25:04 -0700 |
commit | 31c61c16e2073f0c3f54a8d0523d8c4f10ca5dd2 (patch) | |
tree | bf81e2f6ba3a342f32cd9425dfcdfadecfb6d1d6 /gr-blocks/grc | |
parent | 8c23d9f9ebfe04b60d59efc636c6d5b02baacc99 (diff) | |
download | gnuradio-31c61c16e2073f0c3f54a8d0523d8c4f10ca5dd2.tar.gz gnuradio-31c61c16e2073f0c3f54a8d0523d8c4f10ca5dd2.tar.bz2 gnuradio-31c61c16e2073f0c3f54a8d0523d8c4f10ca5dd2.zip |
blocks: added gr::blocks::float_to_int
Diffstat (limited to 'gr-blocks/grc')
-rw-r--r-- | gr-blocks/grc/blocks_block_tree.xml | 7 | ||||
-rw-r--r-- | gr-blocks/grc/blocks_float_to_int.xml | 35 |
2 files changed, 39 insertions, 3 deletions
diff --git a/gr-blocks/grc/blocks_block_tree.xml b/gr-blocks/grc/blocks_block_tree.xml index 29cc2634d..169533d34 100644 --- a/gr-blocks/grc/blocks_block_tree.xml +++ b/gr-blocks/grc/blocks_block_tree.xml @@ -38,7 +38,7 @@ <block>blocks_sub_xx</block> </cat> <cat> - <name>Type Conversions</name> + <name>Stream Type Conversions</name> <block>blocks_char_to_float</block> <block>blocks_char_to_short</block> <block>blocks_complex_to_interleaved_short</block> @@ -48,7 +48,8 @@ <block>blocks_complex_to_mag</block> <block>blocks_complex_to_mag_squared</block> <block>blocks_complex_to_arg</block> - <block>float_to_char</block> - <block>float_to_complex</block> + <block>blocks_float_to_char</block> + <block>blocks_float_to_complex</block> + <block>blocks_float_to_int</block> </cat> </cat> diff --git a/gr-blocks/grc/blocks_float_to_int.xml b/gr-blocks/grc/blocks_float_to_int.xml new file mode 100644 index 000000000..0ff5d9cdf --- /dev/null +++ b/gr-blocks/grc/blocks_float_to_int.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Float to Int: +################################################### + --> +<block> + <name>Float To Int</name> + <key>blocks_float_to_int</key> + <import>from gnuradio import blocks</import> + <make>blocks.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> |