RTXI  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
fs_spec.h
Go to the documentation of this file.
1 //
2 // File = fs_spec.h
3 //
4 
5 #ifndef _FS_SPEC_H_
6 #define _FS_SPEC_H_
7 
8 #include "misdefs.h"
9 #include "typedefs.h"
10 #include <iostream>
11 #include <stdlib.h>
12 
13 using namespace std;
14 
16 {
17 public:
18  // constructors
19 
21  FreqSampFilterSpec(const FreqSampFilterSpec& filter_spec);
22  FreqSampFilterSpec(int band_config, int fir_type, int num_taps,
23  double* des_mag_resp);
24 
25  FreqSampFilterSpec(std::istream& uin, ostream& uout);
26 
27  logical IsOptimizeEnabled(void);
28  // methods to read specification parameters
29 
30  int GetNumTaps(void);
31  int GetBandConfig(void);
32  int GetN1(void);
33  int GetN2(void);
34  int GetN3(void);
35  int GetN4(void);
36  int GetFirType(void);
37  int GetNumTransSamps(void);
38  // int FreqSampFilterSpec::GetNumTransSamps(void);
39  double GetMagRespSamp(int);
40 
41  // methods to set specification parameters
42 
43  void SetNumTaps(int);
44  void SetBandConfig(int);
45  void SetN1(int);
46  void SetN2(int);
47  void SetN3(int);
48  void SetN4(int);
49  void SetFirType(int);
50  void SetDbScaleEnabled(int db_scale_enabled);
51  void SetTrans(double transition_value);
52  void SetTrans(double* origins, double* slopes, double rho);
53  void SetMagRespSamp(int samp_indx, double value);
54 
55  friend class FreqSampFilterDesign;
56  friend class LinearPhaseFirResponse;
57 
58 private:
59  //
60  // filter band configuration: 1 = lowpass, 2 = highpass,
61  // 3 = bandpass, 4 = bandstop
63 
64  // type of specified frequencies:
65  // 0 = discrete frequencies specified via indices
66  // 1 = normalized for folding frequency of PI
67  // 2 = actual frequencies
68  int Freq_Type;
70  double Samp_Freq;
72  double Lambda_Numer, Lambda_Denom;
73  double Lambda;
74 
75  int Num_Taps;
76  int Fold_Indx;
77 
78  int Fir_Type;
80 
82  int N1;
83  int N2;
84  int N3;
85  int N4;
86 
88  double* Des_Mag_Resp;
89 };
90 
91 #endif
int logical
Definition: typedefs.h:4
logical Freqs_Specif_In_Hz
Definition: fs_spec.h:69
logical Optimize_Enabled
Definition: fs_spec.h:79
double Lambda_Numer
Definition: fs_spec.h:72
int Db_Scale_Enabled
Definition: fs_spec.h:87
logical Cutoff_Is_Half_Amp
Definition: fs_spec.h:71
double * Des_Mag_Resp
Definition: fs_spec.h:88
double Samp_Freq
Definition: fs_spec.h:70