diff options
author | Tom Rondeau | 2012-06-15 09:57:45 -0400 |
---|---|---|
committer | Tom Rondeau | 2012-06-15 09:57:45 -0400 |
commit | 59ad06e0e30ad4c24053b64c453cfdbe95cc7500 (patch) | |
tree | 8fb78daa9cc737859c944183d1eab00ad0634bf6 /gr-filter | |
parent | 5585c71229cfa7886e0bd090828cd1f5104f6b27 (diff) | |
download | gnuradio-59ad06e0e30ad4c24053b64c453cfdbe95cc7500.tar.gz gnuradio-59ad06e0e30ad4c24053b64c453cfdbe95cc7500.tar.bz2 gnuradio-59ad06e0e30ad4c24053b64c453cfdbe95cc7500.zip |
filter: improving documentation and adding GRC blocks for fir_filter_xxx blocks.
Diffstat (limited to 'gr-filter')
-rw-r--r-- | gr-filter/grc/CMakeLists.txt | 1 | ||||
-rw-r--r-- | gr-filter/grc/filter_block_tree.xml | 1 | ||||
-rw-r--r-- | gr-filter/grc/fir_filter_xxx.xml | 80 | ||||
-rw-r--r-- | gr-filter/include/filter/fir_filter_XXX.h.t | 27 |
4 files changed, 109 insertions, 0 deletions
diff --git a/gr-filter/grc/CMakeLists.txt b/gr-filter/grc/CMakeLists.txt index 1c69e47c3..663cc0b00 100644 --- a/gr-filter/grc/CMakeLists.txt +++ b/gr-filter/grc/CMakeLists.txt @@ -21,6 +21,7 @@ install(FILES filter_block_tree.xml dc_blocker_xx.xml fft_filter_xxx.xml + fir_filter_xxx.xml filter_delay_fc.xml hilbert_fc.xml pfb_channelizer.xml diff --git a/gr-filter/grc/filter_block_tree.xml b/gr-filter/grc/filter_block_tree.xml index 0c685d9f6..988897fcf 100644 --- a/gr-filter/grc/filter_block_tree.xml +++ b/gr-filter/grc/filter_block_tree.xml @@ -32,6 +32,7 @@ <name>Filters</name> <block>dc_blocker_xx</block> <block>fft_filter_xxx</block> + <block>fir_filter_xxx</block> <block>filter_delay_fc</block> <block>hilbert_fc</block> <block>pfb_channelizer_ccf</block> diff --git a/gr-filter/grc/fir_filter_xxx.xml b/gr-filter/grc/fir_filter_xxx.xml new file mode 100644 index 000000000..3925eb555 --- /dev/null +++ b/gr-filter/grc/fir_filter_xxx.xml @@ -0,0 +1,80 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Decimating FIR Filter +################################################### + --> +<block> + <name>Decimating FIR Filter</name> + <key>fir_filter_xxx</key> + <import>from gnuradio import filter</import> + <import>from gnuradio.filter import firdes</import> + <make>filter.fir_filter_$(type)($decim, $taps)</make> + <callback>set_taps($taps)</callback> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex->Complex (Complex Taps)</name> + <key>ccc</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>taps:complex_vector</opt> + </option> + <option> + <name>Complex->Complex (Real Taps)</name> + <key>ccf</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>taps:real_vector</opt> + </option> + <option> + <name>Float->Complex (Complex Taps)</name> + <key>fcc</key> + <opt>input:float</opt> + <opt>output:complex</opt> + <opt>taps:complex_vector</opt> + </option> + <option> + <name>Float->Float (Real Taps)</name> + <key>fff</key> + <opt>input:float</opt> + <opt>output:float</opt> + <opt>taps:real_vector</opt> + </option> + <option> + <name>Float->Short (Real Taps)</name> + <key>fsf</key> + <opt>input:float</opt> + <opt>output:short</opt> + <opt>taps:real_vector</opt> + </option> + <option> + <name>Short->Complex (Complex Taps)</name> + <key>scc</key> + <opt>input:short</opt> + <opt>output:complex</opt> + <opt>taps:complex_vector</opt> + </option> + </param> + <param> + <name>Decimation</name> + <key>decim</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Taps</name> + <key>taps</key> + <type>$type.taps</type> + </param> + <sink> + <name>in</name> + <type>$type.input</type> + </sink> + <source> + <name>out</name> + <type>$type.output</type> + </source> +</block> diff --git a/gr-filter/include/filter/fir_filter_XXX.h.t b/gr-filter/include/filter/fir_filter_XXX.h.t index ef6b8bfc9..647c18db4 100644 --- a/gr-filter/include/filter/fir_filter_XXX.h.t +++ b/gr-filter/include/filter/fir_filter_XXX.h.t @@ -31,6 +31,30 @@ namespace gr { namespace filter { + /*! + * \brief FIR filter with @I_TYPE@ input, @O_TYPE@ output, and @TAP_TYPE@ taps + * \ingroup filter_blk + * + * The fir_filter_XXX blocks create finite impulse response + * (FIR) filters that perform the convolution in the time + * domain: + * + * \code + * out = 0 + * for i in ntaps: + * out += input[n-i] * taps[i] + * \endcode + * + * The taps are a C++ vector (or Python list) of values of the + * type specified by the third letter in the block's suffix. For + * this block, the value is of type @TAP_TYPE@. Taps can be + * created using the firdes or optfir tools. + * + * These versions of the filter can also act as down-samplers + * (or decimators) by specifying an integer value for \p + * decimation. + * + */ class FILTER_API @BASE_NAME@ : virtual public gr_sync_decimator { public: @@ -41,6 +65,9 @@ namespace gr { /*! * \brief FIR filter with @I_TYPE@ input, @O_TYPE@ output, and @TAP_TYPE@ taps * \ingroup filter_blk + * + * \param decimation set the integer decimation rate + * \param taps a vector/list of taps of type @TAP_TYPE@ */ static FILTER_API sptr make(int decimation, const std::vector<@TAP_TYPE@> &taps); |