3 * Copyright 2010 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
24 * WARNING: This file is automatically generated by generate_gri_fir_XXX.py
25 * Any changes made to this file will be overwritten.
34 #include <gr_reverse.h>
39 * \brief FIR with internal buffer for @I_TYPE@ input,
40 @O_TYPE@ output and @TAP_TYPE@ taps
48 std::vector<@TAP_TYPE@> d_taps; // reversed taps
57 * \brief construct new FIR with given taps.
59 * Note that taps must be in forward order, e.g., coefficient 0 is
60 * stored in new_taps[0], coefficient 1 is stored in
63 @NAME@ (const std::vector<@TAP_TYPE@> &taps);
70 * \brief compute a single output value.
72 * \p input must have ntaps() valid entries.
73 * input[0] .. input[ntaps() - 1] are referenced to compute the output value.
75 * \returns the filtered input value.
77 @O_TYPE@ filter (@I_TYPE@ input);
80 * \brief compute an array of N output values.
82 * \p input must have (n - 1 + ntaps()) valid entries.
83 * input[0] .. input[n - 1 + ntaps() - 1] are referenced to compute the output values.
85 void filterN (@O_TYPE@ output[], const @I_TYPE@ input[],
89 * \brief compute an array of N output values, decimating the input
91 * \p input must have (decimate * (n - 1) + ntaps()) valid entries.
92 * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to
93 * compute the output values.
95 void filterNdec (@O_TYPE@ output[], const @I_TYPE@ input[],
96 unsigned long n, unsigned decimate);
99 * \brief install \p new_taps as the current taps.
101 void set_taps (const std::vector<@TAP_TYPE@> &taps);
106 * \return number of taps in filter.
108 unsigned ntaps () const { return d_taps.size (); }
111 * \return current taps
113 const std::vector<@TAP_TYPE@> get_taps () const
115 return gr_reverse(d_taps);
119 #endif /* @GUARD_NAME@ */