Master104.h
上传用户:tengfei
上传日期:2014-02-20
资源大小:423k
文件大小:1k
- #ifndef _MASTER104_
- #define _MASTER104_
- #include "IEC104link.h"
- class AFX_EXT_CLASS CMaster104:public CIEC104ASDU
- {
- public:
- CMaster104();
- ~CMaster104();
-
- void Init_Linkpara(int t0=30,int t1=15,int t2=10,int t3=20,int k=12,int w=8);
- void Init_SockServerIP(char *serverIP,int port=2404);
- void Send_ASDU_Msg(BYTE *msgbuf,int len);
- //#define CMD_CONN 0
- //#define CMD_DISCONN 1
- //#define CMD_USTOP 2
- //#define CMD_USTART 3
- void Send_ASDU_Ucommand(int command);
- virtual void On_Recv_ASDU_Msg(BYTE *recvbuf,int len ){};//显示接收报文
- virtual void On_SendMsg(BYTE *msgbuf,int len){};
- virtual void On_RecvMsg(BYTE *msgbuf,int len){};
- virtual void On_ErrorMsg(char *msgbuf){};
- void master_start();
- void master_close();//
- bool GetSockConnectStatus();
- bool GetUstartStatus();
- };
- #endif