123456789101112131415161718192021222324252627282930313233 |
- // Protocol.h: interface for the CProtocol class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_PROTOCOL_H__B54C8930_9411_4B11_B750_261140346F76__INCLUDED_)
- #define AFX_PROTOCOL_H__B54C8930_9411_4B11_B750_261140346F76__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(SETBASEPARAM SetBasePara, int nDataLen, int iCmdPos, int iCmdLen, char chMsg[10]) =0;
- virtual int WriteCommand(char DataBuffer[80], char ResDataBuffer[2]) = 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;
- REQUESTWRPARAM m_RequestWrParam;
- };
- #endif // !defined(AFX_PROTOCOL_H__B54C8930_9411_4B11_B750_261140346F76__INCLUDED_)
|