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

61 lines
2.0 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 COMTRADE_BUILD_123_INCLUDED
#define COMTRADE_BUILD_123_INCLUDED
#include "glbtypes.h"
#ifdef __cplusplus
extern "C" {
#endif
/************************************************************************/
#define COMTRADE_METER_CHL_MAX (256+1) //cbt add 2019.6.13 for CRCC认证添加一个重合闸
#define COMTRADE_DEV_CHZ_ENUM_MAX 6
#define COMTRADE_DEV_TYPE_MAX 250
#define COMTRADE_DEV_ACT_BIT_MAX 32
//cbt add 2021.8.26 添加故障电量的枚举类型描述
#define COMTRADE_METER_ENUM_VALUE_MAX 8 //枚举值不超过8
#define COMTRADE_METER_ENUM_STR_MAX 10
#define COMTRADE_DEV_WAVE_ANALOG_MAX 36
#define COMTRADE_DEV_WAVE_DIGITAL_MAX 32
#define COMTRADE_DEV_WAVE_NULLSHIFT_MAX 36 //ghc 20231116 增加零飘通道的最大个数
//HDR文件的编码方式
#define HDR_ENCODING "UTF-8"
//COMTRADE文件目录如果不存在初始化的时候会创建
#ifdef linux
#define COMTRADE_PATH "../COMTRADE/"
#elif defined (_WIN32)
#define COMTRADE_PATH "../COMTRADE/"
#endif
//cbt modified 2021.5.17 新硬件4.0使用IEC61850 工程应用模型中的故障报告格式
//cbt modified 2020.10.20 由于新版故障报告格式目前仅用于测试或个别点的试用,暂时不入库也不发布,所以故障报告格式仍然使用旧版格式
#define HDR_VER 2 //HDR文件格式版本。0:旧版2020.8.17以前1配合许继修改故障报告格式2020.8.7仅测试用不发布2IEC61850 工程应用模型2021.3.10),暂时不发布
#define METER_CHL_TYPE_ACTIP 10000 //动作元件的模拟量类型码
#define METER_CHL_TYPE_PARAMODE 10001 //参数模式的模拟量类型码
#define METER_CHL_TYPE_CHZ 10003 //重合闸的模拟量类型码
#define METER_CHL_TYPE_EVENT_BH 10005 //保护事件的模拟量类型码
ST_RET comtrade_build_init( ST_VOID );
ST_RET comtrade_build_hdr( ST_UINT fltNum, ST_VOID *faultItemVoid );
ST_RET comtrade_build_cfg( ST_UINT fltNum, ST_VOID *faultItemVoid, ST_VOID *pstDigtypeVoid );
ST_RET comtrade_build_dat( ST_UINT fltNum, ST_VOID *faultItemVoid, ST_VOID *pstDigtypeVoid );
ST_RET comtrade_build_accord_hdr( ST_VOID *faultItemVoid );
/************************************************************************/
#ifdef __cplusplus
}
#endif
#endif