// CommAsyn.h: interface for the CCommAsyn class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_COMMASYN_H__GREE__INCLUDED_) #define AFX_COMMASYN_H__GREE__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #define STATUS_NORMAL 0 #define STATUS_FAULT 1 #define STATUS_NOUSE 2 #define STATUS_TYPEERROR 3 #define COMM_CORRECT 0 #define COMM_ERROR 1 #define MAX_DATA_NUM128 128 #define MAX_YXNO 2048 #define MAX_YCNO 2048 class CProtocol; class CCommAsyn { public: CProtocol* m_pProtocol; virtual int Write(BYTE * pBuf, int len) =0; virtual int Read(BYTE * pBuf, int len) =0; virtual int WorkMain(int nAddr, int nDataLen, int nReadPos, char chMsg[80]); virtual int WriteCommand( int nAddr, int nWorkStatus, int nWorkMode, int nFanSpeed, int nPutWind, int nAirTrade, int nSleep, int nLight, int nTempSetPoint ); virtual BOOL InitParam(PPORTPARAM pPortParam); virtual BOOL CloseComm(); CCommAsyn(); virtual ~CCommAsyn(); }; #endif // !defined(AFX_COMMASYN_H__8351010D_0DD3_4F8C_8F3B_959BA59019E7__INCLUDED_)