#ifndef _TCP_PARSE_H_ #define _TCP_PARSE_H_ class CTcpParse { private: int OnCmdProcess(void *pSocketHandle, void *pData); void ProcessDevOnline(void *pSocketHandle, void *pData, int nLen); void ProcessSingleVarOnline(void *pSocketHandle, void *pData, int nLen); void ProcessMulVarOnline(void *pSocketHandle, void *pData, int nLen); void ProcessReadSingleVarData(void *pSocketHandle, void *pData, int nLen); void ProcessReadMulVarData(void *pSocketHandle, void *pData, int nLen); void ProcessReadSpecialMulVarData(void *pSocketHandle, void *pData, int nLen); void ProcessReadSpecialSingleVarData(void *pSocketHandle, void *pData, int nLen); void ProcessWriteSingleVarData(void *pSocketHandle, void *pData, int nLen); void ProcessWriteMulVarData(void *pSocketHandle, void *pData, int nLen); void ProcessDogData(void *pSocketHandle, void *pData, int nLen); void ProcessAlarmConfirm(void *pSocketHandle, void *pData, int nLen); void ProcessHeart(void *pSocketHandle, void *pData, int nLen); int GetVarstatus(float fParaValue, int iUpperLimit, int iLowerLimit, int iNormalState); public: CTcpParse(void); ~CTcpParse(void); void ProcessData(void *pSocketHandle, const BYTE* pData, DWORD nLen); unsigned int CalcCheckSum( void *pData, unsigned int nSize ); BOOL SendNoticeToServer( void *pSocketHandle, int iCmd,int iOperateType,CString sUserName,CString sUID,int iVarID ); BOOL GetServerVer( void *pSocketHandle );//得到狗信息 BOOL TestAlarm( void *pSocketHandle );//测试报警 BOOL ConfigAlarm( void *pSocketHandle,CString sUID,int iVarID,int iStatus,int iAlarmIndex );//确认报警 void ProcessAlarmData(void *pSocketHandle, void *pData, int nLen);//报警信息 void ProcessServerVer(void *pSocketHandle, void *pData, int nLen); void ProcessOtherInfo(void *pSocketHandle, void *pData, int nLen); }; #endif