GNU Radio 3.6.4.2 C++ API
gr_freq_xlating_fir_filter_fcf.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2002,2004 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 /*
24  * WARNING: This file is automatically generated by
25  * generate_gr_freq_xlating_fir_filter_XXX.py Any changes made to this file
26  * will be overwritten.
27  */
28 
29 #ifndef INCLUDED_GR_GR_FREQ_XLATING_FIR_FILTER_FCF_H
30 #define INCLUDED_GR_GR_FREQ_XLATING_FIR_FILTER_FCF_H
31 
32 #include <gr_core_api.h>
33 #include <gr_sync_decimator.h>
34 #include <gr_rotator.h>
35 
38 
39 /*!
40  * Construct a FIR filter with the given taps and a composite frequency
41  * translation that shifts center_freq down to zero Hz. The frequency
42  * translation logically comes before the filtering operation.
43  */
45 gr_make_freq_xlating_fir_filter_fcf (int decimation, const std::vector<float> &taps,
46  double center_freq, double sampling_freq);
47 
48 
49 class gr_fir_fcc;
50 
51 /*!
52  * \brief FIR filter combined with frequency translation with float input, gr_complex output and float taps
53  * \ingroup filter_blk
54  *
55  * This class efficiently combines a frequency translation
56  * (typically "down conversion") with a FIR filter (typically low-pass)
57  * and decimation. It is ideally suited for a "channel selection filter"
58  * and can be efficiently used to select and decimate a narrow band signal
59  * out of wide bandwidth input.
60  *
61  * Uses a single input array to produce a single output array.
62  * Additional inputs and/or outputs are ignored.
63  */
65 {
66  public:
68 
69  void set_center_freq (double center_freq);
70  void set_taps (const std::vector<float> &taps);
71 
72  int work (int noutput_items,
73  gr_vector_const_void_star &input_items,
74  gr_vector_void_star &output_items);
75 
76  private:
78  gr_make_freq_xlating_fir_filter_fcf (int decimation, const std::vector<float> &taps,
79  double center_freq, double sampling_freq);
80 
81  protected:
82  std::vector<float> d_proto_taps;
85  double d_center_freq;
87  bool d_updated;
88 
89  virtual void build_composite_fir ();
90 
91  /*!
92  * Construct a FIR filter with the given taps and a composite frequency
93  * translation that shifts center_freq down to zero Hz. The frequency
94  * translation logically comes before the filtering operation.
95  */
96  gr_freq_xlating_fir_filter_fcf (int decimation,
97  const std::vector<float> &taps,
98  double center_freq, double sampling_freq);
99 };
100 
101 #endif /* _gr_freq_xlating_fir_filter_fcf_H_ */
size_t decimation(void) const
Definition: gr_block.h:424
std::vector< float > d_proto_taps
Definition: gr_freq_xlating_fir_filter_fcf.h:82
FIR filter combined with frequency translation with float input, gr_complex output and float tapsThis...
Definition: gr_freq_xlating_fir_filter_fcf.h:64
double d_sampling_freq
Definition: gr_freq_xlating_fir_filter_fcf.h:86
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
#define GR_CORE_API
Definition: gr_core_api.h:30
Definition: gr_rotator.h:29
bool d_updated
Definition: gr_freq_xlating_fir_filter_fcf.h:87
GR_CORE_API gr_freq_xlating_fir_filter_fcf_sptr gr_make_freq_xlating_fir_filter_fcf(int decimation, const std::vector< float > &taps, double center_freq, double sampling_freq)
gr_fir_fcc * d_composite_fir
Definition: gr_freq_xlating_fir_filter_fcf.h:83
gr_rotator d_r
Definition: gr_freq_xlating_fir_filter_fcf.h:84
Abstract class for FIR with float input, gr_complex output and gr_complex tapsThis is the abstract cl...
Definition: gr_fir_fcc.h:48
double d_center_freq
Definition: gr_freq_xlating_fir_filter_fcf.h:85
Definition: gr_sync_decimator.h:27
virtual int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
just like gr_block::general_work, only this arranges to call consume_each for you ...
static const float taps[NSTEPS+1][NTAPS]
Definition: gnuradio-core/src/lib/filter/interpolator_taps.h:9