// CommInterface.h: interface for the CCommProcess class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_COMMINTERFACE_H__MOSTDEVICE__INCLUDED_) #define AFX_COMMINTERFACE_H__MOSTDEVICE__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "CommProcess.h" typedef struct __COM_STRUCT { int nCommPort; CCommProcess* pComm; }COM_STRUCT, *PCOM_STRUCT; class CCommInterface { private: public: list m_listComm; public: CCommInterface(); virtual ~CCommInterface(); private: protected: // 打开串口 BOOL OpenComm(int nCommPort, int nAddr, int nRate, int nDataBit, int nStopBit, int nParity, int nInterval); // 关闭串口 BOOL CloseComm(); // 查找串口,没找到返回NULL CCommProcess* FindComm(int nCommPort); }; #endif