GNU Radio 3.6.5 C++ API
|
00001 /* -*- c++ -*- */ 00002 /* 00003 * Copyright 2002,2004 Free Software Foundation, Inc. 00004 * 00005 * This file is part of GNU Radio 00006 * 00007 * GNU Radio is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 3, or (at your option) 00010 * any later version. 00011 * 00012 * GNU Radio is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with GNU Radio; see the file COPYING. If not, write to 00019 * the Free Software Foundation, Inc., 51 Franklin Street, 00020 * Boston, MA 02110-1301, USA. 00021 */ 00022 00023 /* 00024 * WARNING: This file is automatically generated by 00025 * generate_gr_freq_xlating_fir_filter_XXX.py Any changes made to this file 00026 * will be overwritten. 00027 */ 00028 00029 #ifndef INCLUDED_GR_GR_FREQ_XLATING_FIR_FILTER_FCC_H 00030 #define INCLUDED_GR_GR_FREQ_XLATING_FIR_FILTER_FCC_H 00031 00032 #include <gr_core_api.h> 00033 #include <gr_sync_decimator.h> 00034 #include <gr_rotator.h> 00035 00036 class gr_freq_xlating_fir_filter_fcc; 00037 typedef boost::shared_ptr<gr_freq_xlating_fir_filter_fcc> gr_freq_xlating_fir_filter_fcc_sptr; 00038 00039 /*! 00040 * Construct a FIR filter with the given taps and a composite frequency 00041 * translation that shifts center_freq down to zero Hz. The frequency 00042 * translation logically comes before the filtering operation. 00043 */ 00044 GR_CORE_API gr_freq_xlating_fir_filter_fcc_sptr 00045 gr_make_freq_xlating_fir_filter_fcc (int decimation, const std::vector<gr_complex> &taps, 00046 double center_freq, double sampling_freq); 00047 00048 00049 class gr_fir_fcc; 00050 00051 /*! 00052 * \brief FIR filter combined with frequency translation with float input, gr_complex output and gr_complex taps 00053 * 00054 * This class efficiently combines a frequency translation 00055 * (typically "down conversion") with a FIR filter (typically low-pass) 00056 * and decimation. It is ideally suited for a "channel selection filter" 00057 * and can be efficiently used to select and decimate a narrow band signal 00058 * out of wide bandwidth input. 00059 * 00060 * Uses a single input array to produce a single output array. 00061 * Additional inputs and/or outputs are ignored. 00062 */ 00063 class GR_CORE_API gr_freq_xlating_fir_filter_fcc : public gr_sync_decimator 00064 { 00065 public: 00066 virtual ~gr_freq_xlating_fir_filter_fcc (); 00067 00068 void set_center_freq (double center_freq); 00069 void set_taps (const std::vector<gr_complex> &taps); 00070 00071 int work (int noutput_items, 00072 gr_vector_const_void_star &input_items, 00073 gr_vector_void_star &output_items); 00074 00075 private: 00076 friend GR_CORE_API gr_freq_xlating_fir_filter_fcc_sptr 00077 gr_make_freq_xlating_fir_filter_fcc (int decimation, const std::vector<gr_complex> &taps, 00078 double center_freq, double sampling_freq); 00079 00080 protected: 00081 std::vector<gr_complex> d_proto_taps; 00082 gr_fir_fcc *d_composite_fir; 00083 gr_rotator d_r; 00084 double d_center_freq; 00085 double d_sampling_freq; 00086 bool d_updated; 00087 00088 virtual void build_composite_fir (); 00089 00090 /*! 00091 * Construct a FIR filter with the given taps and a composite frequency 00092 * translation that shifts center_freq down to zero Hz. The frequency 00093 * translation logically comes before the filtering operation. 00094 */ 00095 gr_freq_xlating_fir_filter_fcc (int decimation, 00096 const std::vector<gr_complex> &taps, 00097 double center_freq, double sampling_freq); 00098 }; 00099 00100 #endif /* _gr_freq_xlating_fir_filter_fcc_H_ */