12345678910111213141516171819202122232425262728293031323334353637383940 |
- // CommAsyn.h: interface for the CCommAsyn class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_COMMASYN_H__INCLUDED_)
- #define AFX_COMMASYN_H__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(SETBASEPARAM SetBasePara, int nDataLen, char chMsg[80]);
- virtual int WriteCommand(SETBASEPARAM SetBasePara, double dbData, int nDataLen);
- virtual BOOL InitParam(PPORTPARAM pPortParam);
- virtual BOOL CloseComm();
- CCommAsyn();
- virtual ~CCommAsyn();
- };
- #endif // !defined(AFX_COMMASYN_H__INCLUDED_)
|