bess_filt_iir.cpp
上传用户:jtjnyq9001
上传日期:2014-11-21
资源大小:3974k
文件大小:2k
源码类别:

3G开发

开发平台:

Visual C++

  1. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. //
  3. //  File = bess_filt_iir.cpp
  4. //
  5. //  Bessel Filter by IIR model
  6. //
  7. //#include <math.h>
  8. //#include "misdefs.h"
  9. #include "parmfile.h"
  10. #include "bess_filt_iir.h"
  11. #include "bessel_proto.h"
  12. //#include "filter_types.h"
  13. extern ParmFile *ParmInput;
  14. #ifdef _DEBUG
  15.   extern ofstream *DebugFile;
  16. #endif
  17. //======================================================
  18. //  constructor
  19. template < class T>
  20. BesselFilterByIir<T>::BesselFilterByIir( char *instance_name,
  21.                                       PracSimModel *outer_model,
  22.                                       Signal<T> *in_sig,
  23.                                       Signal<T> *out_sig )
  24.                   :AnalogFilterByIir<T>( instance_name,
  25.                                outer_model,
  26.                                in_sig,
  27.                                out_sig )
  28. {
  29.   MODEL_NAME(BesselFilterByIir);
  30.   //OPEN_PARM_BLOCK;
  31.   // All of the parameters needed to specify a Butterworth filter
  32.   // are common to all the classic types: Chebyshev, Elliptical, Bessel.
  33.   // Since they will be needed by all types of filters they are
  34.   // read by the AnalogFilter base class.
  35.   
  36.   if( !Bypass_Enabled)
  37.     {
  38.     GET_BOOL_PARM(Delay_Norm_Enabled);
  39.     // construct a Bessel prototype
  40.     Lowpass_Proto_Filt = new BesselPrototype( Prototype_Order,
  41.                                               Delay_Norm_Enabled);
  42.     Lowpass_Proto_Filt->DumpBiquads(DebugFile);
  43.     Lowpass_Proto_Filt->GetDenomPoly(false);
  44.     }
  45.   return;
  46. };
  47. template <class T>
  48. BesselFilterByIir<T>::~BesselFilterByIir(){};
  49. template BesselFilterByIir<float>;
  50. template BesselFilterByIir<std::complex<float> >;