#pragma once #include "pch.h" #include "Driver_app.h" #include "ZZ_Math.h" typedef struct tagATPDataFrame { USHORT usExposureTime; int iData[4096]; float fTemperature; double dTimes = 0; //float fWaveLength[2048]; ////////////////////////////////////////////////////////////////////////// }ATPDataFrame; class CATPControl_General { public: CATPControl_General(); virtual ~CATPControl_General(); public: spectrum_device_info m_stuDeviceInfo_ATP; float *m_pfWaveLength; int m_iAttribute; int m_iPixels; UINT m_uiStartPixel, m_uiEndPixel; int m_iExposureTimeInMS; public: int ATPInitialize(USHORT usIndex); int ATPClose(); int SingleShot(ATPDataFrame &dfData); int SingleShotDark(ATPDataFrame &dfData); int SingleShotDeducted(ATPDataFrame &dfData); int SetPixels(int iPixels); int SetExposureTime(int iExposureTimeInMS); int GetWaveLength(float *pfWaveLength); int GetAttribute(); int GetDeviceListInfo(CComboBox *pcboDeviceList, CString &cstrSN); //use type name to enum int GetDeviceTemperature(float &fTemperature); int WavelengthToPixelIndex(float fStartWavelength,float fEndWavelength,UINT &uiStartPixel,UINT &uiEndPixel); int Test();//do not call ////////////////////////////////////////////////////////////////////////// public: int SetDownwellingSunlightIndexRange(UINT uiStartPixel, UINT uiEndPixel); int GetDownwellingSunlightIndex(UINT uiIndex); ////////////////////////////////////////////////////////////////////////// int PerformAutoExposure(float fMinScaleFactor,float fMaxScaleFactor, float &fPredictedExposureTime); public: int CheckRange(float fFactor, ATPDataFrame &dfData); void SubATPDataFrame(ATPDataFrame& dfLeft, ATPDataFrame const dfRight); void SubATPDataFrame(ATPDataFrame const dfLeft, ATPDataFrame const dfRight, ATPDataFrame& dfResult); };