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

43 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 IEC104_SRV_TA21_123_INCLUDED
#define IEC104_SRV_TA21_123_INCLUDED
//如果是发布程序,定义本宏
//#define IEC60870_RELEASE
#include "iec104_service_srv.h"
#ifdef __cplusplus
extern "C" {
#endif
/************************************************************************/
//104各量的起始地址
#define IEC104_TA21_START_SIGNAL 1
#define IEC104_TA21_START_METRY 0x701
#define IEC104_TA21_START_HARMONYC 0x761
#define IEC104_TA21_START_DEGREE 0xC01
#define IEC104_TA21_START_CONTROL 0xB01
ST_RET iec104_srv_ta21_init( IEC104_SERVICE_SRV_TCP *iec104_srv_ta21 );
ST_RET iec104_srv_ta21_release( IEC104_SERVICE_SRV_TCP *iec104_srv_ta21 );
ST_RET iec104_srv_ta21_handle( IEC104_SERVICE_SRV_TCP *iec104_srv_ta21 );
/*** 向服务器下的指定连接发送I帧发送的时候会自动填充链路层信息(ti以前)和校验码、结束符 ***/
/*** 如果linkIndex=-1先所有连接发送 ***/
/*** asduLen是包含校验符和结束符在内的报文总长度 ***/
ST_RET iec104_srv_ta21_asdu_send( int linkIndex, unsigned char *asdu, int asduLen, IEC104_I_ASDU_TYPE type );
/************************************************************************/
#ifdef __cplusplus
}
#endif
#endif