Protocol.h 930 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // Protocol.h: interface for the CProtocol class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_PROTOCOL_H__GREE__INCLUDED_)
  5. #define AFX_PROTOCOL_H__GREE__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CCommAsyn;
  10. class CProtocol
  11. {
  12. public:
  13. virtual BOOL InitParam(PPORTPARAM pPortParam,CCommAsyn*pComm);
  14. virtual int WorkMain(int nAddr, int nDataLen,int nReadPos, char chMsg[80]) =0;
  15. virtual int WriteCommand(
  16. int nAddr,
  17. int nWorkStatus, int nWorkMode, int nFanSpeed,
  18. int nPutWind, int nAirTrade, int nSleep, int nLight,
  19. int nTempSetPoint ) = 0;
  20. CProtocol();
  21. virtual ~CProtocol();
  22. protected:
  23. CCommAsyn* m_pComm;
  24. int WriteMessage(BYTE* pBuf, int len);
  25. int ReadMessage(BYTE *pBuf, int len);
  26. public:
  27. RESPONSE_STRUCT m_structResponse;
  28. };
  29. #endif // !defined(AFX_PROTOCOL_H__B54C8930_9411_4B11_B750_261140346F76__INCLUDED_)