#ifndef _CModbus_TcpS_ #define _CModbus_TcpS_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "daq/daq_protocol.h" #if !defined(FALSE) #define FALSE 0 #endif class CModbus_TcpS : public CProtocol { protected: public: virtual sint32 TxProc(); virtual sint32 RxProc(); virtual sint32 GetZfFlag( ){return 1;}; virtual void Init( S_PROTOCOLCFG * pcfg ); virtual ~CModbus_TcpS(); protected: virtual uint8 ProcCmd(); void ProcYKCmd(uint16 YaoKongNo,uint16 YkStatus); void ProcYTCmd(uint16 YaoKongNo,uint16 YkStatus);//WYF 20190110 sint32 SendDiOne(uint16 startAddr,uint16 Num); sint32 SendSwitch(uint16 startAddr, uint16 Num); sint32 SendMeasure(uint16 RegOffset,uint16 RegNum); sint32 SendMeasureOne(uint16 RegOffset, uint16 RegNum); void ReturnException(uint8 func,uint8 expCode); sint32 GetNowSecond(); private: uint8 TransIdHi; uint8 TransIdLo; sint32 m_RcvTimeOuts; //³¬Ê±Ê±¼ä sint32 m_LastRecvTime; }; #endif // !defined(_CModbus_TcpS_)