12345678910111213141516171819202122232425262728293031323334353637 |
- // Protocol.h: interface for the CProtocol class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_PROTOCOL_H__GREE__INCLUDED_)
- #define AFX_PROTOCOL_H__GREE__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- class CCommAsyn;
- class CProtocol
- {
- public:
- virtual BOOL InitParam(PPORTPARAM pPortParam,CCommAsyn*pComm);
- virtual int WorkMain(int nAddr, int nDataLen,int nReadPos, char chMsg[80]) =0;
- virtual int WriteCommand(
- int nAddr,
- int nWorkStatus, int nWorkMode, int nFanSpeed,
- int nPutWind, int nAirTrade, int nSleep, int nLight,
- int nTempSetPoint ) = 0;
- CProtocol();
- virtual ~CProtocol();
- protected:
- CCommAsyn* m_pComm;
- int WriteMessage(BYTE* pBuf, int len);
- int ReadMessage(BYTE *pBuf, int len);
- public:
- RESPONSE_STRUCT m_structResponse;
- };
- #endif // !defined(AFX_PROTOCOL_H__B54C8930_9411_4B11_B750_261140346F76__INCLUDED_)
|