GNU Radio 3.6.5 C++ API
|
00001 /* -*- c++ -*- */ 00002 /* 00003 * Copyright 2002 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 #ifndef INCLUDED_GR_GR_FIR_FCC_GENERIC_H 00023 #define INCLUDED_GR_GR_FIR_FCC_GENERIC_H 00024 00025 #include <gr_core_api.h> 00026 #include <gr_fir_fcc.h> 00027 00028 /*! 00029 * \brief Concrete class for generic implementation of FIR with float input, gr_complex output and gr_complex taps 00030 * 00031 * The trailing suffix has the form _IOT where I codes the input type, 00032 * O codes the output type, and T codes the tap type. 00033 * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), 'i' (int) 00034 */ 00035 00036 class GR_CORE_API gr_fir_fcc_generic : public gr_fir_fcc { 00037 00038 public: 00039 00040 // CREATORS 00041 00042 gr_fir_fcc_generic () {} 00043 gr_fir_fcc_generic (const std::vector<gr_complex> &taps) : gr_fir_fcc (taps) {} 00044 00045 // MANIPULATORS 00046 00047 /*! 00048 * \brief compute a single output value. 00049 * 00050 * \p input must have ntaps() valid entries. 00051 * input[0] .. input[ntaps() - 1] are referenced to compute the output value. 00052 * 00053 * \returns the filtered input value. 00054 */ 00055 virtual gr_complex filter (const float input[]); 00056 00057 /*! 00058 * \brief compute an array of N output values. 00059 * 00060 * \p input must have (n - 1 + ntaps()) valid entries. 00061 * input[0] .. input[n - 1 + ntaps() - 1] are referenced to compute the output values. 00062 */ 00063 virtual void filterN (gr_complex output[], const float input[], 00064 unsigned long n); 00065 00066 /*! 00067 * \brief compute an array of N output values, decimating the input 00068 * 00069 * \p input must have (decimate * (n - 1) + ntaps()) valid entries. 00070 * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to 00071 * compute the output values. 00072 */ 00073 virtual void filterNdec (gr_complex output[], const float input[], 00074 unsigned long n, unsigned decimate); 00075 00076 }; 00077 00078 #endif /* INCLUDED_GR_GR_FIR_FCC_GENERIC_H */