// Test_CE_DPPDlg.h : header file // #pragma once #define MAX_DPP_BUFFER_SIZE 8192 static int m_gain; // number of active channels //static double PlotBuffer[MAX_DPP_BUFFER_SIZE]; // plotbuffer for paint refreshes static long PlotBuffer[MAX_DPP_BUFFER_SIZE]; // plotbuffer for paint refreshes //static double DataBuffer[MAX_DPP_BUFFER_SIZE]; // active spectrum data buffer static long DataBuffer[MAX_DPP_BUFFER_SIZE]; // active spectrum data buffer //static double RawBuffer[MAX_DPP_BUFFER_SIZE]; // raw operation data buffer (read/write data) // CTest_CE_DPPDlg dialog class CTest_CE_DPPDlg : public CDialog { // Construction public: CTest_CE_DPPDlg(CWnd* pParent = NULL); // standard constructor CPen PenBLACK; CPen PenBLUE; CPen PenRED; CPen PenGREEN; CPen PenYELLOW; // change pen style, refer CPen in MSDN void UpdatePlot(CDC *dc); void PlotData(long *DataBuffer, int NumChan); long XPlotMAX; long YPlotMAX; bool OptScaleType; // scale type (log or linear) bool OptPlotType; // plot type (line or bar, not used) //DPPAPI Control void * objDppApi; // DppApi object handle //CString cstrStatus; //CString cstrConfig; // Dialog Data enum { IDD = IDD_TEST_CE_DPP_DIALOG }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support // Implementation protected: HICON m_hIcon; // Generated message map functions virtual BOOL OnInitDialog(); #if defined(_DEVICE_RESOLUTION_AWARE) && !defined(WIN32_PLATFORM_WFSP) afx_msg void OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/); #endif DECLARE_MESSAGE_MAP() public: //afx_msg void OnAcquisition(); afx_msg void OnAttachDPP(); afx_msg void OnStartAcquisition(); // start data acquisition afx_msg void OnStopAcquisition(); // stop data acquisition afx_msg void OnClearSpectrum(); //afx_msg void OnViewSetup(); afx_msg void OnShowDPPConfiguration(); afx_msg void OnShowDPPStatus(); afx_msg void OnLoadConfigurationFile(); afx_msg void OnSaveConfigurationFile(); afx_msg void OnTuneFastThreshold(); afx_msg void OnTuneInputOffset(); afx_msg void OnBnClickedGetData(); void RequestRedraw(); afx_msg void OnPaint(); afx_msg void OnClose(); afx_msg void OnDestroy(); int DlgOpenDppApi(); void DlgCloseDppApi(); void UpdateData(); void MCAEnable(BOOL EnableAcq); //Acquisition Timer UINT m_nElapse; // data acquisition elapsed time UINT_PTR m_nTimerId; // timer identifier (return value) UINT m_nEventId; // timer (event) identifier BOOL bAcqData; // acquiring data BOOL bApiHasCfg; // DppApi has config ////afx_msg void OnBnClickedStart(); ////afx_msg void OnBnClickedStop(); CString ConfigDoubleValCStr(LPCTSTR lpstrLabel, double dblValue); afx_msg void OnTimer(UINT nIDEvent); // data acquisition timer BOOL PromptCfgFileName(CString *m_csCurrentFile, BOOL bOpen); int GetDppDeviceType(double dppFirmware, int StatDevInd); };