commCPU_SUPV/code/user/inc/iec103_cln_prot.h
2025-04-30 16:24:29 +08:00

42 lines
1.1 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef IEC103_CLN_PROT_123_INCLUDED
#define IEC103_CLN_PROT_123_INCLUDED
//如果是发布程序,定义本宏
//#define IEC60870_RELEASE
#include "iec103_service_cln.h"
#ifdef __cplusplus
extern "C" {
#endif
/************************************************************************/
ST_RET iec103_cln_prot_init( IEC103_SERVICE_CLN_TCP *iec103_cln_prot );
ST_RET iec103_cln_prot_release( IEC103_SERVICE_CLN_TCP *iec103_cln_prot );
ST_RET iec103_cln_prot_handle( IEC103_SERVICE_CLN_TCP *iec103_cln_prot );
/*** 向服务器下的指定连接发送I帧发送的时候会自动填充链路层信息(ti以前)和校验码、结束符 ***/
/*** 如果linkIndex=-1先所有连接发送 ***/
/*** asduLen是包含校验符和结束符在内的报文总长度 ***/
ST_RET iec103_cln_prot_asdu_send( int linkIndex, unsigned char *asdu, int asduLen, IEC103_I_CMD_TYPE type );
ST_RET iec103_cln_prot_asdu_send_ver_call( int linkIndex );
ST_RET iec103_cln_prot_get_verinfo( const ST_UCHAR **verInfo, ST_UCHAR *devAddr );
/************************************************************************/
#ifdef __cplusplus
}
#endif
#endif