GNU Radio Manual and C++ API Reference 3.7.14.0
The Free & Open Software Radio Ecosystem
rational_resampler_base_scc.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2005,2012 Free Software Foundation, Inc.
4 *
5 * This file is part of GNU Radio
6 *
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)
10 * any later version.
11 *
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.
16 *
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.
21 */
22
23/* WARNING: this file is machine generated. Edits will be overwritten */
24
25#ifndef INCLUDED_FILTER_RATIONAL_RESAMPLER_BASE_SCC_H
26#define INCLUDED_FILTER_RATIONAL_RESAMPLER_BASE_SCC_H
27
28#include <gnuradio/filter/api.h>
29#include <gnuradio/block.h>
30
31
32namespace gr {
33 namespace filter {
34
35 /*!
36 * \brief Rational Resampling Polyphase FIR filter with short
37 * input, gr_complex output and gr_complex taps.
38 * \ingroup resamplers_blk
39 *
40 * Make a rational resampling FIR filter. If the input signal is
41 * at rate fs, then the output signal will be at a rate of \p
42 * interpolation * fs / \p decimation.
43 *
44 * The interpolation and decimation rates should be kept as
45 * small as possible, and generally should be relatively prime
46 * to help reduce complexity in memory and computation.
47 *
48 * The set of \p taps supplied to this filterbank should be
49 * designed around the resampling amount and must avoid aliasing
50 * (when interpolation/decimation < 1) and images (when
51 * interpolation/decimation > 1).
52 *
53 * As with any filter, the behavior of the filter taps (or
54 * coefficients) is determined by the highest sampling rate that
55 * the filter will ever see. In the case of a resampler that
56 * increases the sampling rate, the highest sampling rate observed
57 * is \p interpolation since in the filterbank, the number of
58 * filter arms is equal to \p interpolation. When the resampler
59 * decreases the sampling rate (decimation > interpolation), then
60 * the highest rate is the input sample rate of the original
61 * signal. We must create a filter based around this value to
62 * reduce any aliasing that may occur from out-of-band signals.
63 *
64 * Another way to think about how to create the filter taps is
65 * that the filter is effectively applied after interpolation and
66 * before decimation. And yet another way to think of it is that
67 * the taps should be a LPF that is at least as narrow as the
68 * narrower of the required anti-image postfilter or anti-alias
69 * prefilter.
70 */
72 {
73 public:
74 // gr::filter::rational_resampler_base_scc::sptr
75 typedef boost::shared_ptr<rational_resampler_base_scc> sptr;
76
77 /*!
78 * Make a rational resampling FIR filter.
79 *
80 * \param interpolation The integer interpolation rate of the filter
81 * \param decimation The integer decimation rate of the filter
82 * \param taps The filter taps to control images and aliases
83 */
84 static sptr make(unsigned interpolation,
85 unsigned decimation,
86 const std::vector<gr_complex> &taps);
87
88 virtual unsigned interpolation() const = 0;
89 virtual unsigned decimation() const = 0;
90
91 virtual void set_taps(const std::vector<gr_complex> &taps) = 0;
92 virtual std::vector<gr_complex> taps() const = 0;
93 };
94
95 } /* namespace filter */
96} /* namespace gr */
97
98#endif /* INCLUDED_FILTER_RATIONAL_RESAMPLER_BASE_SCC_H */
The abstract base class for all 'terminal' processing blocks.
Definition: block.h:66
Rational Resampling Polyphase FIR filter with short input, gr_complex output and gr_complex taps.
Definition: rational_resampler_base_scc.h:72
static sptr make(unsigned interpolation, unsigned decimation, const std::vector< gr_complex > &taps)
virtual unsigned interpolation() const =0
virtual void set_taps(const std::vector< gr_complex > &taps)=0
virtual unsigned decimation() const =0
boost::shared_ptr< rational_resampler_base_scc > sptr
Definition: rational_resampler_base_scc.h:75
virtual std::vector< gr_complex > taps() const =0
#define FILTER_API
Definition: gr-filter/include/gnuradio/filter/api.h:30
static const float taps[NSTEPS+1][NTAPS]
Definition: interpolator_taps.h:9
Include this header to use the message passing features.
Definition: basic_block.h:45