summaryrefslogtreecommitdiff
path: root/gr-filter/include
diff options
context:
space:
mode:
Diffstat (limited to 'gr-filter/include')
-rw-r--r--gr-filter/include/filter/CMakeLists.txt5
-rw-r--r--gr-filter/include/filter/fir_filter_XXX.h.t4
-rw-r--r--gr-filter/include/filter/interp_fir_filter_XXX.h.t81
3 files changed, 86 insertions, 4 deletions
diff --git a/gr-filter/include/filter/CMakeLists.txt b/gr-filter/include/filter/CMakeLists.txt
index 267b8b66b..e9ba8c246 100644
--- a/gr-filter/include/filter/CMakeLists.txt
+++ b/gr-filter/include/filter/CMakeLists.txt
@@ -64,8 +64,9 @@ endmacro(expand_h)
########################################################################
# Invoke macro to generate various sources
#######################################################################
-expand_h(fir_filter_XXX fff ccf ccc scc fsf)
-expand_h(freq_xlating_fir_filter_XXX ccc ccf fcc fcf scc scf)
+expand_h(fir_filter_XXX fff ccc ccf fcc fff fsf scc)
+expand_h(freq_xlating_fir_filter_XXX ccc ccf fcc fcf scf scc)
+expand_h(interp_fir_filter_XXX ccc ccf fcc fff fsf scc)
add_custom_target(filter_generated_includes DEPENDS
${generated_includes}
diff --git a/gr-filter/include/filter/fir_filter_XXX.h.t b/gr-filter/include/filter/fir_filter_XXX.h.t
index 647c18db4..fc768bcad 100644
--- a/gr-filter/include/filter/fir_filter_XXX.h.t
+++ b/gr-filter/include/filter/fir_filter_XXX.h.t
@@ -72,8 +72,8 @@ namespace gr {
static FILTER_API sptr make(int decimation,
const std::vector<@TAP_TYPE@> &taps);
- virtual void set_taps (const std::vector<@TAP_TYPE@> &taps) = 0;
- virtual std::vector<@TAP_TYPE@> taps () const = 0;
+ virtual void set_taps(const std::vector<@TAP_TYPE@> &taps) = 0;
+ virtual std::vector<@TAP_TYPE@> taps() const = 0;
};
} /* namespace filter */
diff --git a/gr-filter/include/filter/interp_fir_filter_XXX.h.t b/gr-filter/include/filter/interp_fir_filter_XXX.h.t
new file mode 100644
index 000000000..eaf215200
--- /dev/null
+++ b/gr-filter/include/filter/interp_fir_filter_XXX.h.t
@@ -0,0 +1,81 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/* @WARNING@ */
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <filter/api.h>
+#include <gr_sync_interpolator.h>
+
+namespace gr {
+ namespace filter {
+
+ /*!
+ * \brief Interpolating 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 up-samplers
+ * (or interpolators) by specifying an integer value for \p
+ * interpolation.
+ *
+ */
+ class FILTER_API @BASE_NAME@ : virtual public gr_sync_interpolator
+ {
+ public:
+ // gr::filter::@BASE_NAME@::sptr
+ typedef boost::shared_ptr<@BASE_NAME@> sptr;
+
+ /*!
+ * \brief Interpolating FIR filter with @I_TYPE@ input, @O_TYPE@ output, and @TAP_TYPE@ taps
+ * \ingroup filter_blk
+ *
+ * \param interpolation set the integer interpolation rate
+ * \param taps a vector/list of taps of type @TAP_TYPE@
+ */
+ static FILTER_API sptr make(unsigned interpolation,
+ const std::vector<@TAP_TYPE@> &taps);
+
+ virtual void set_taps(const std::vector<@TAP_TYPE@> &taps) = 0;
+ virtual std::vector<@TAP_TYPE@> taps() const = 0;
+ };
+
+ } /* namespace filter */
+} /* namespace gr */
+
+#endif /* @GUARD_NAME@ */