// Sample1Dlg.h : header file // #if !defined(AFX_SAMPLE1DLG_H__9D7284E3_969F_410A_BBCB_C5147BE158FD__INCLUDED_) #define AFX_SAMPLE1DLG_H__9D7284E3_969F_410A_BBCB_C5147BE158FD__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 ///////////////////////////////////////////////////////////////////////////// // CSample1Dlg dialog class CSample1Dlg : public CDialog { // Construction public: CSample1Dlg(CWnd* pParent = NULL); // standard constructor CString *m_InputChannels[ 2 ]; // Dialog Data //{{AFX_DATA(CSample1Dlg) enum { IDD = IDD_SAMPLE1_DIALOG }; CStatic m_Status; CString m_InputChannel0; CString m_InputChannel1; //}}AFX_DATA // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CSample1Dlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: HICON m_hIcon; // Generated message map functions //{{AFX_MSG(CSample1Dlg) virtual BOOL OnInitDialog(); afx_msg void OnSysCommand(UINT nID, LPARAM lParam); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); afx_msg void OnTimer(UINT nIDEvent); virtual void OnOK(); //}}AFX_MSG DECLARE_MESSAGE_MAP() private: unsigned long m_DeviceIndex; // set to TRUE by DetectDevice function when USB-AO16-16A card is detected // FALSE if card is not present or wrong card is plugged in bool m_DeviceDetected; private: void UpdateRange( int range ); void InitData( void ); // check if the card is connected and if yes // set m_DeviceDetected variableaccordingly // returns: true if USB-AO16-16A card is connected, // false otherwise bool DetectDevice( void ); // reads both channels by sending ADC_GetScanV commands // to the card and updates counters data base // if the driver reports an error, set m_DeviceDetected to false void ReadAll( void ); }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_SAMPLE1DLG_H__9D7284E3_969F_410A_BBCB_C5147BE158FD__INCLUDED_)