GNU Radio Manual and C++ API Reference 3.10.9.1
The Free & Open Software Radio Ecosystem
 
Loading...
Searching...
No Matches
freq_xlating_fir_filter.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2002,2004,2012,2018 Free Software Foundation, Inc.
4 *
5 * This file is part of GNU Radio
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 *
9 */
10
11#ifndef FREQ_XLATING_FIR_FILTER_H
12#define FREQ_XLATING_FIR_FILTER_H
13
14#include <gnuradio/filter/api.h>
16
17namespace gr {
18namespace filter {
19
20
21/*!
22 * \brief FIR filter combined with frequency translation with
23 * IN_T input, OUT_T output and TAP_T taps
24 *
25 * \ingroup channelizers_blk
26 *
27 * This class efficiently combines a frequency translation
28 * (typically "down conversion") with a FIR filter (typically
29 * low-pass) and decimation. It is ideally suited for a "channel
30 * selection filter" and can be efficiently used to select and
31 * decimate a narrow band signal out of wide bandwidth input.
32 *
33 * Uses a single input array to produce a single output array.
34 * Additional inputs and/or outputs are ignored.
35 *
36 * - freq (input):
37 * Receives a PMT pair: (intern("freq"), double(frequency).
38 * The block then sets its frequency translation value to
39 * the new frequency provided by the message. A tag is then
40 * produced when the new frequency is applied to let
41 * downstream blocks know when this has taken affect.
42 * Use the filter's group delay to determine when the
43 * transients after the change have settled down.
44 */
45template <class IN_T, class OUT_T, class TAP_T>
47{
48public:
49 typedef std::shared_ptr<freq_xlating_fir_filter<IN_T, OUT_T, TAP_T>> sptr;
50
51 /*!
52 * \brief FIR filter with IN_T input, OUT_T output, and
53 * TAP_T taps that also frequency translates a signal from
54 * \p center_freq.
55 *
56 * Construct a FIR filter with the given taps and a composite
57 * frequency translation that shifts center_freq down to zero
58 * Hz. The frequency translation logically comes before the
59 * filtering operation.
60 *
61 * \param decimation set the integer decimation rate
62 * \param taps a vector/list of taps of type TAP_T
63 * \param center_freq Center frequency of signal to down convert from (Hz)
64 * \param sampling_freq Sampling rate of signal (in Hz)
65 */
66 static sptr make(int decimation,
67 const std::vector<TAP_T>& taps,
68 double center_freq,
69 double sampling_freq);
70
71 virtual void set_center_freq(double center_freq) = 0;
72 virtual double center_freq() const = 0;
73
74 virtual void set_taps(const std::vector<TAP_T>& taps) = 0;
75 virtual std::vector<TAP_T> taps() const = 0;
76};
88
89
90} /* namespace filter */
91} /* namespace gr */
92
93#endif /* FREQ_XLATING_FIR_FILTER_H */
FIR filter combined with frequency translation with IN_T input, OUT_T output and TAP_T taps.
Definition freq_xlating_fir_filter.h:47
virtual void set_taps(const std::vector< TAP_T > &taps)=0
virtual std::vector< TAP_T > taps() const =0
static sptr make(int decimation, const std::vector< TAP_T > &taps, double center_freq, double sampling_freq)
FIR filter with IN_T input, OUT_T output, and TAP_T taps that also frequency translates a signal from...
virtual double center_freq() const =0
std::shared_ptr< freq_xlating_fir_filter< IN_T, OUT_T, TAP_T > > sptr
Definition freq_xlating_fir_filter.h:49
virtual void set_center_freq(double center_freq)=0
synchronous N:1 input to output with history
Definition sync_decimator.h:26
#define FILTER_API
Definition gr-filter/include/gnuradio/filter/api.h:18
static constexpr float taps[NSTEPS+1][NTAPS]
Definition interpolator_taps.h:9
freq_xlating_fir_filter< gr_complex, gr_complex, gr_complex > freq_xlating_fir_filter_ccc
Definition freq_xlating_fir_filter.h:78
freq_xlating_fir_filter< gr_complex, gr_complex, float > freq_xlating_fir_filter_ccf
Definition freq_xlating_fir_filter.h:80
freq_xlating_fir_filter< std::int16_t, gr_complex, float > freq_xlating_fir_filter_scf
Definition freq_xlating_fir_filter.h:85
freq_xlating_fir_filter< std::int16_t, gr_complex, gr_complex > freq_xlating_fir_filter_scc
Definition freq_xlating_fir_filter.h:87
freq_xlating_fir_filter< float, gr_complex, float > freq_xlating_fir_filter_fcf
Definition freq_xlating_fir_filter.h:83
freq_xlating_fir_filter< float, gr_complex, gr_complex > freq_xlating_fir_filter_fcc
Definition freq_xlating_fir_filter.h:82
GNU Radio logging wrapper.
Definition basic_block.h:29