GNU Radio 3.5.3 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_FREQ_XLATING_FIR_FILTER_CCC_H 00030 #define INCLUDED_GR_FREQ_XLATING_FIR_FILTER_CCC_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_ccc; 00037 typedef boost::shared_ptr<gr_freq_xlating_fir_filter_ccc> gr_freq_xlating_fir_filter_ccc_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_ccc_sptr 00045 gr_make_freq_xlating_fir_filter_ccc (int decimation, const std::vector<gr_complex> &taps, 00046 double center_freq, double sampling_freq); 00047 00048 00049 class gr_fir_ccc; 00050 00051 /*! 00052 * \brief FIR filter combined with frequency translation with gr_complex input, gr_complex output and gr_complex taps 00053 * \ingroup filter_blk 00054 * 00055 * This class efficiently combines a frequency translation 00056 * (typically "down conversion") with a FIR filter (typically low-pass) 00057 * and decimation. It is ideally suited for a "channel selection filter" 00058 * and can be efficiently used to select and decimate a narrow band signal 00059 * out of wide bandwidth input. 00060 * 00061 * Uses a single input array to produce a single output array. 00062 * Additional inputs and/or outputs are ignored. 00063 */ 00064 class GR_CORE_API gr_freq_xlating_fir_filter_ccc : public gr_sync_decimator 00065 { 00066 public: 00067 virtual ~gr_freq_xlating_fir_filter_ccc (); 00068 00069 void set_center_freq (double center_freq); 00070 void set_taps (const std::vector<gr_complex> &taps); 00071 00072 int work (int noutput_items, 00073 gr_vector_const_void_star &input_items, 00074 gr_vector_void_star &output_items); 00075 00076 private: 00077 friend GR_CORE_API gr_freq_xlating_fir_filter_ccc_sptr 00078 gr_make_freq_xlating_fir_filter_ccc (int decimation, const std::vector<gr_complex> &taps, 00079 double center_freq, double sampling_freq); 00080 00081 protected: 00082 std::vector<gr_complex> d_proto_taps; 00083 gr_fir_ccc *d_composite_fir; 00084 gr_rotator d_r; 00085 double d_center_freq; 00086 double d_sampling_freq; 00087 bool d_updated; 00088 00089 virtual void build_composite_fir (); 00090 00091 /*! 00092 * Construct a FIR filter with the given taps and a composite frequency 00093 * translation that shifts center_freq down to zero Hz. The frequency 00094 * translation logically comes before the filtering operation. 00095 */ 00096 gr_freq_xlating_fir_filter_ccc (int decimation, 00097 const std::vector<gr_complex> &taps, 00098 double center_freq, double sampling_freq); 00099 }; 00100 00101 #endif /* _gr_freq_xlating_fir_filter_ccc_H_ */