// tstmodemDlg.h : header file // #if !defined(AFX_TSTMODEMDLG_H__8BE5D6D5_7FC1_4E48_903C_999276BEE957__INCLUDED_) #define AFX_TSTMODEMDLG_H__8BE5D6D5_7FC1_4E48_903C_999276BEE957__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 #include "resource.h" #include "menuresources.h" #include "debug.h" #include "boost_lite.h" #include "ModemListbox.h" #define WM_RECEIVEDATA WM_USER+1 class SerialPort; class KernelState; class RILState; class BitController; // for vs2005 #define CCeCommandBar CCommandBar ///////////////////////////////////////////////////////////////////////////// // CTstmodemDlg dialog class CTstmodemDlg : public CDialog, public CDebugWindow { // Construction public: CTstmodemDlg(CWnd* pParent = NULL); // standard constructor void SetModels(SerialPort& port, KernelState& kernel, RILState& ril); void CommEventBreak(bool state); void CommEventCTS(bool state); void CommEventDSR(bool state); void CommEventRing(bool state); void CommEventRLSD(bool state); void CommEventERR(bool state); void CommEventReceive(); void CommEventTransmit(); void CommEventInputOverFlow(); void CommEventOutputOverFlow(); void appendString(const TCHAR *str); // Dialog Data //{{AFX_DATA(CTstmodemDlg) enum { IDD = IDD_TSTMODEM_DIALOG }; CButton m_cCheckRtsCtsFlowControl; CButton m_cCheckDoBits; CButton m_cCheckOpenDevice; CButton m_cCheckComIoctl; CButton m_cCheckDebugInOutput; CButton m_cCheckKernel03c8; CButton m_cStatusTransmit; CButton m_cStatusReceive; CStatic m_cCounterTransmit; CStatic m_cCounterRLSD; CStatic m_cCounterERR; CStatic m_cCounterRing; CStatic m_cCounterReceive; CStatic m_cCounterDSR; CStatic m_cCounterCTS; CStatic m_cCounterBreak; CButton m_cCheckGsmReset; CButton m_cCheckClearScreen; CButton m_cCheckGsmMode; CModemListBox m_cListReceiveData; CButton m_cCheckEnableRil; CButton m_cCheckIR; CEdit m_cEditTransmitData; CButton m_cCheckHexData; CButton m_cCheckAddCR; CButton m_cCheckAddLF; CButton m_cStatusRLSD; CButton m_cStatusERR; CButton m_cStatusRing; CButton m_cStatusBreak; CButton m_cStatusDSR; CButton m_cStatusCTS; CButton m_cCheckRTS; CButton m_cCheckDTR; CButton m_cCheckBreak; //}}AFX_DATA // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CTstmodemDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CTstmodemDlg) virtual BOOL OnInitDialog(); afx_msg void OnCheckDtr(); afx_msg void OnCheckRts(); afx_msg void OnCheckBrk(); afx_msg void OnButtonTransmit(); afx_msg void OnCheckIr(); afx_msg void OnCheckHex(); afx_msg void OnClose(); afx_msg void OnCheckEnableRil(); afx_msg void OnCheckGsmreset(); afx_msg void OnCheckClearScreen(); afx_msg void OnCheckGsmMode(); afx_msg void OnCheckKernel03c8(); afx_msg void OnCheckDebugInOutput(); afx_msg void OnCheckComIoctl(); afx_msg void OnCheckOpendevice(); afx_msg void OnTimer(UINT nIDEvent); afx_msg void OnCheckDobits(); afx_msg void OnCheckRtsctsFlowctl(); //}}AFX_MSG DECLARE_MESSAGE_MAP() afx_msg void OnBitsMenu(UINT nId); afx_msg void OnPortMenu(UINT nId); afx_msg void OnSpeedMenu(UINT nId); afx_msg LRESULT OnReceiveData(WPARAM wParam, LPARAM lParam); static DWORD staticthreadproc(CTstmodemDlg* self); DWORD sendcommandlist(); private: CCeCommandBar m_wndCommandBar; SerialPort *m_port; KernelState *m_kernel; RILState *m_ril; BitController *m_gpio_bits; BitController *m_a400_bits; bool m_bUpdateBits; // for waiting for 'OK' bool m_ok; bool m_okstop; boost::condition m_okcond; boost::mutex m_okmtx; void CreateBitsControl(); void InitializeMenu(); }; //{{AFX_INSERT_LOCATION}} // Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_TSTMODEMDLG_H__8BE5D6D5_7FC1_4E48_903C_999276BEE957__INCLUDED_)