diff options
-rw-r--r-- | gnuradio-core/src/lib/general/gr_char_to_float.h | 10 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_char_to_short.h | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_float_to_char.h | 10 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_float_to_int.h | 10 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_float_to_short.h | 10 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_int_to_float.h | 10 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_short_to_char.h | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_short_to_float.h | 10 | ||||
-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 |
18 files changed, 241 insertions, 5 deletions
diff --git a/gnuradio-core/src/lib/general/gr_char_to_float.h b/gnuradio-core/src/lib/general/gr_char_to_float.h index 4ad8e59a8..1ab53a087 100644 --- a/gnuradio-core/src/lib/general/gr_char_to_float.h +++ b/gnuradio-core/src/lib/general/gr_char_to_float.h @@ -35,6 +35,9 @@ gr_make_char_to_float (size_t vlen=1, float scale=1); /*! * \brief Convert stream of chars to a stream of float * \ingroup converter_blk + * + * \param vlen vector length of data streams. + * \param scale a scalar divider to change the output signal scale. */ class GR_CORE_API gr_char_to_float : public gr_sync_block @@ -48,7 +51,14 @@ class GR_CORE_API gr_char_to_float : public gr_sync_block float d_scale; public: + /*! + * Get the scalar divider value. + */ float scale() const; + + /*! + * Set the scalar divider value. + */ void set_scale(float scale); virtual int work (int noutput_items, diff --git a/gnuradio-core/src/lib/general/gr_char_to_short.h b/gnuradio-core/src/lib/general/gr_char_to_short.h index 58f9a62b0..e93c15b12 100644 --- a/gnuradio-core/src/lib/general/gr_char_to_short.h +++ b/gnuradio-core/src/lib/general/gr_char_to_short.h @@ -35,6 +35,8 @@ gr_make_char_to_short (size_t vlen=1); /*! * \brief Convert stream of chars to a stream of float * \ingroup converter_blk + * + * \param vlen vector length of data streams. */ class GR_CORE_API gr_char_to_short : public gr_sync_block diff --git a/gnuradio-core/src/lib/general/gr_float_to_char.h b/gnuradio-core/src/lib/general/gr_float_to_char.h index c88645a18..00e83d465 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_char.h +++ b/gnuradio-core/src/lib/general/gr_float_to_char.h @@ -35,6 +35,9 @@ gr_make_float_to_char (size_t vlen=1, float scale=1); /*! * \brief Convert stream of float to a stream of char * \ingroup converter_blk + * + * \param vlen vector length of data streams. + * \param scale a scalar multiplier to change the output signal scale. */ class GR_CORE_API gr_float_to_char : public gr_sync_block @@ -48,7 +51,14 @@ class GR_CORE_API gr_float_to_char : public gr_sync_block float d_scale; public: + /*! + * Get the scalar multiplier value. + */ float scale() const; + + /*! + * Set the scalar multiplier value. + */ void set_scale(float scale); virtual int work (int noutput_items, diff --git a/gnuradio-core/src/lib/general/gr_float_to_int.h b/gnuradio-core/src/lib/general/gr_float_to_int.h index 0b42c0aab..ef1987a76 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_int.h +++ b/gnuradio-core/src/lib/general/gr_float_to_int.h @@ -35,6 +35,9 @@ gr_make_float_to_int (size_t vlen=1, float scale=1); /*! * \brief Convert stream of float to a stream of short * \ingroup converter_blk + * + * \param vlen vector length of data streams. + * \param scale a scalar multiplier to change the output signal scale. */ class GR_CORE_API gr_float_to_int : public gr_sync_block @@ -48,7 +51,14 @@ class GR_CORE_API gr_float_to_int : public gr_sync_block float d_scale; public: + /*! + * Get the scalar multiplier value. + */ float scale() const; + + /*! + * Set the scalar multiplier value. + */ void set_scale(float scale); virtual int work (int noutput_items, diff --git a/gnuradio-core/src/lib/general/gr_float_to_short.h b/gnuradio-core/src/lib/general/gr_float_to_short.h index 93e441f41..beb95486f 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_short.h +++ b/gnuradio-core/src/lib/general/gr_float_to_short.h @@ -35,6 +35,9 @@ gr_make_float_to_short (size_t vlen=1, float scale=1); /*! * \brief Convert stream of float to a stream of short * \ingroup converter_blk + * + * \param vlen vector length of data streams. + * \param scale a scalar multiplier to change the output signal scale. */ class GR_CORE_API gr_float_to_short : public gr_sync_block @@ -47,7 +50,14 @@ class GR_CORE_API gr_float_to_short : public gr_sync_block float d_scale; public: + /*! + * Get the scalar multiplier value. + */ float scale() const; + + /*! + * Set the scalar multiplier value. + */ void set_scale(float scale); virtual int work (int noutput_items, diff --git a/gnuradio-core/src/lib/general/gr_int_to_float.h b/gnuradio-core/src/lib/general/gr_int_to_float.h index af6488a50..7c55e3b3c 100644 --- a/gnuradio-core/src/lib/general/gr_int_to_float.h +++ b/gnuradio-core/src/lib/general/gr_int_to_float.h @@ -35,6 +35,9 @@ gr_make_int_to_float (size_t vlen=1, float scale=1); /*! * \brief Convert stream of int to a stream of float * \ingroup converter_blk + * + * \param vlen vector length of data streams. + * \param scale a scalar divider to change the output signal scale. */ class GR_CORE_API gr_int_to_float : public gr_sync_block @@ -48,7 +51,14 @@ class GR_CORE_API gr_int_to_float : public gr_sync_block float d_scale; public: + /*! + * Get the scalar divider value. + */ float scale() const; + + /*! + * Set the scalar divider value. + */ void set_scale(float scale); virtual int work (int noutput_items, diff --git a/gnuradio-core/src/lib/general/gr_short_to_char.h b/gnuradio-core/src/lib/general/gr_short_to_char.h index 9682d86ec..f6b3b41ca 100644 --- a/gnuradio-core/src/lib/general/gr_short_to_char.h +++ b/gnuradio-core/src/lib/general/gr_short_to_char.h @@ -35,6 +35,8 @@ gr_make_short_to_char (size_t vlen=1); /*! * \brief Convert stream of short to a stream of float * \ingroup converter_blk + * + * \param vlen vector length of data streams. */ class GR_CORE_API gr_short_to_char : public gr_sync_block diff --git a/gnuradio-core/src/lib/general/gr_short_to_float.h b/gnuradio-core/src/lib/general/gr_short_to_float.h index efdc81ecd..e45d0b14b 100644 --- a/gnuradio-core/src/lib/general/gr_short_to_float.h +++ b/gnuradio-core/src/lib/general/gr_short_to_float.h @@ -35,6 +35,9 @@ gr_make_short_to_float (size_t vlen=1, float scale=1); /*! * \brief Convert stream of short to a stream of float * \ingroup converter_blk + * + * \param vlen vector length of data streams. + * \param scale a scalar divider to change the output signal scale. */ class GR_CORE_API gr_short_to_float : public gr_sync_block @@ -48,7 +51,14 @@ class GR_CORE_API gr_short_to_float : public gr_sync_block float d_scale; public: + /*! + * Get the scalar divider value. + */ float scale() const; + + /*! + * Set the scalar divider value. + */ void set_scale(float scale); virtual int work (int noutput_items, 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> |