#if !defined(AFX_DPPGAIN_H__INCLUDED_) #define AFX_DPPGAIN_H__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // DppGain.h : header file // DP5/PX5/DP5G/MCA8000D/TB5 Analog Gain Tables #define SIZEOF_GAIN_ARRAY(gar) (sizeof(gar)/sizeof((gar)[0])) #define DP5_GAIN_COUNT 16 #define PX5_GAIN_COUNT 28 #define DP5G_GAIN_COUNT 4 #define MCA8000D_GAIN_COUNT 2 #define DP5_DX_GAIN_COUNT 24 #define DP5X_GAIN_COUNT 6 // Option in FW6.08.06 and above, also has option flag in status static double DP5X_Gain[DP5X_GAIN_COUNT] = { 4.008, 8.016, 13.987, 27.974, 55.948, 111.896}; static double DP5_DX_Gain[DP5_DX_GAIN_COUNT] = { 1.000, 1.250, 1.563, 1.952, 2.433, 3.040, 3.801, 4.749, 5.975, 7.466, 9.337, 11.666, 14.605, 18.250, 22.822, 28.515, 35.530, 44.395, 55.518, 69.368, 87.269, 109.043, 136.364, 170.383}; static double DP5_Gain[DP5_GAIN_COUNT] = { 1.122, 2.491, 3.778, 5.278, 6.556, 8.387, 10.091, 11.322, 14.554, 17.772, 22.402, 30.839, 38.124, 47.468, 66.157, 101.828}; static double PX5_Gain[PX5_GAIN_COUNT] = { 1.000, 1.250, 1.560, 1.950, // approx 1.25^n 2.433, 3.041, 3.797, 4.746, 5.975, 7.472, 9.340, 11.656, 14.570, 18.179, 22.724, 28.371, 35.464, 44.645, 55.831, 69.788, 87.096, 108.622, 135.836, 169.795, 211.989, 264.987, 330.704, 413.379}; static double DP5G_Gain[DP5G_GAIN_COUNT] = { 1.571, 2.556, 4.091, 6.769}; // approx 1.6^n static double MCA8000D_Gain[MCA8000D_GAIN_COUNT] = { 1, 10}; // DP5s have two gain tables all gain tables are // selected by the device type except dagtDP5Dx (the new DP5 gains) // this selection should always be LAST in this ENUM typedef enum _DppAGainTable { dagtDP5, dagtPX5, dagtDP5G, dagtMCA8000D, dagtTB5, dagtDP5X, dagtDP5Dx } DppAGainTable; #define MinGainTable dagtDP5 //#define MaxGainTable dagtMCA8000D //#define MaxGainTable dagtTB5 #define MaxGainTable dagtDP5Dx //#define MaxGainTable dagtDP5X class CDppGain { public: CDppGain(void); ~CDppGain(void); DppAGainTable GainTable; double * ptrGainTable; double MinGain; double MaxGain; int GainTableCount; int GetGainCount(DppAGainTable GainTable); CString GetTotalGainLimitsLabel(DppAGainTable GainTable); double GetTotalGainLimitsMin(DppAGainTable GainTable); double GetTotalGainLimitsMax(DppAGainTable GainTable); BOOL isInTotalGainRange(CString strTotalGain, DppAGainTable GainTable); CString FixTotalGainRange(CString strTotalGain, DppAGainTable GainTable); double * GetGainTablePtr(DppAGainTable GainTable); void LoadGainTableValues(CComboBox *m_CoarseGain, DppAGainTable GainTable); void LoadGainTableIndexes(CComboBox *m_CoarseGain, DppAGainTable GainTable); double FixTotalGainRangeDbl(double dblTotalGain, DppAGainTable GainTable); }; ///////////////////////////////////////////////////////////////////////////// // CDPPGAIN definitions //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_DPPGAIN_H__INCLUDED_)