From 59ad06e0e30ad4c24053b64c453cfdbe95cc7500 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Fri, 15 Jun 2012 09:57:45 -0400 Subject: filter: improving documentation and adding GRC blocks for fir_filter_xxx blocks. --- gr-filter/grc/CMakeLists.txt | 1 + gr-filter/grc/filter_block_tree.xml | 1 + gr-filter/grc/fir_filter_xxx.xml | 80 +++++++++++++++++++++++++++++ gr-filter/include/filter/fir_filter_XXX.h.t | 27 ++++++++++ 4 files changed, 109 insertions(+) create mode 100644 gr-filter/grc/fir_filter_xxx.xml (limited to 'gr-filter') 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 @@ Filters dc_blocker_xx fft_filter_xxx + fir_filter_xxx filter_delay_fc hilbert_fc pfb_channelizer_ccf 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 @@ + + + + Decimating FIR Filter + fir_filter_xxx + from gnuradio import filter + from gnuradio.filter import firdes + filter.fir_filter_$(type)($decim, $taps) + set_taps($taps) + + Type + type + enum + + + + + + + + + Decimation + decim + 1 + int + + + Taps + taps + $type.taps + + + in + $type.input + + + out + $type.output + + 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); -- cgit