#ifndef YC_DATA_H
#define YC_DATA_H

#include "types.h"



/* -------------------------------------------------------------------------
 * 宏定义：相名长度常量
 * ------------------------------------------------------------------------- */
#ifndef CN_PHASE_NAME_LEN
#define CN_PHASE_NAME_LEN (4)         /* 相名字符串最大长度 */
#endif

/* -------------------------------------------------------------------------
 * 枚举定义：单元和电压通道索引（兼容旧代码）
 * ------------------------------------------------------------------------- */
enum
{
    EN_UNIT01_A = 1, EN_UNIT01_B, EN_UNIT01_C,   /* 第一组单元 A/B/C相标识 */
    EN_UNIT02_A, EN_UNIT02_B, EN_UNIT02_C,       /* 第二组单元 A/B/C相标识 */
    EN_UNIT01_0, EN_VOL1_A, EN_VOL1_B, EN_VOL1_C,/* 第一组电压通道标识 */
    EN_VOL2_A, EN_VOL2_B, EN_VOL2_C, EN_VOL1_0, /* 第二组及零序电压标识 */
    EN_VOL2_0, EN_VOL1_FR, EN_UNIT01_DC          /* 剩余电压/频率/直流标识 */
};

/* -------------------------------------------------------------------------
 * 枚举定义：单位类型常量表
 * ------------------------------------------------------------------------- */
enum _UNIT_TYPE_
{
   EN_UNIT_NULL=0,           /* 0x00 - 无单位（空格） */
   EN_UNIT_A,                /* 0x01 - 安培 A */
   EN_UNIT_V,                /* 0x02 - 伏特 V */
   EN_UNIT_S,                /* 0x03 - 秒 S */
   EN_UNIT_HZ,               /* 0x04 - 赫兹 Hz */
   EN_UNIT_HZPS,             /* 0x05 - 赫兹每秒 Hz/s */
   EN_UNIT_DGREE,            /* 0x06 - 度 ° */
   EN_UNIT_OHM,              /* 0x07 - 欧姆 Ω */
   EN_UNIT_KM,               /* 0x08 - 千欧 kΩ */
   EN_UNIT_M,                /* 0x09 - 兆 M */
   EN_UNIT_VPS,              /* 0x0A - 伏每秒 V/S */
   EN_UNIT_KV,               /* 0x0B - 千伏 kV */
   EN_UNIT_W,                /* 0x0C - 瓦 W */
   EN_UNIT_VAR,              /* 0x0D - 乏 VAR */
   EN_UNIT_MVA,              /* 0x0E - 兆伏安 MVA */
   EN_UNIT_0F,               /* 0x0F - 无单位（空格） */
   EN_UNIT_PERCENT,          /* 0x10 - 百分比％ */
   EN_UNIT_MW,               /* 0x11 - 兆瓦 MW */
   EN_UNIT_MV,               /* 0x12 - 毫伏 mV */
   EN_UNIT_MA,               /* 0x13 - 毫安 mA */
   EN_UNIT_KOHM,             /* 0x14 - 千欧 kΩ */
   EN_UNIT_VA,               /* 0x15 - 伏安 VA */
   EN_UNIT_AKA,              /* 0x16 - 千安 A(kA) */
   EN_UNIT_KA,               /* 0x17 - 千安 kA */
   EN_UNIT_KVPS,             /* 0x18 - 千伏每秒 KV/S */
   EN_UNIT_MVAR,             /* 0x19 - 兆乏 MVAR */
   EN_UNIT_KW,				/* 0x1A - 千瓦 KW */	
   EN_UNIT_KVAR,             /* 0x1B - 千乏 KVAR */
   EN_UNIT_KVA,              /* 0x1C - 千伏安 KVA */
   EN_UNIT_KWH,              /* 0x1D - 千瓦时 kWh */
   EN_UNIT_KVARH,            /* 0x1E - 千乏时 kVarh */
   EN_UNIT_IE,				/* 0x1A - 额定电流 Ie */	
   EN_UNIT_1B,               /* 0x1B - 无单位 */
   EN_UNIT_1C,               /* 0x1C - 无单位 */
   EN_UNIT_1D,               /* 0x1D - 无单位 */
   EN_UNIT_1E,               /* 0x1E - 无单位 */
   EN_UNIT_1F,               /* 0x1F - 无单位 */
   EN_UNIT_20,               /* 0x20 - 无单位 */
   EN_UNIT_PERUN             /* 0x21 - 标幺值％Un */
};

/* -------------------------------------------------------------------------
 * 枚举定义：遥测通道索引类型（交流模拟量）
 * ------------------------------------------------------------------------- */
enum _YCMEA_INDEX_TYPE_
{
    EN_YCMEA_ORI_START = 0,           /* 遥测量起始偏移 */
    EN_YCMEA_I_START = EN_YCMEA_ORI_START,   /* 电流通道起始标记 */
    EN_YCMEA_IA01,                    /* 遥测 A 相电流 01 */          
    EN_YCMEA_IB01,                    /* 遥测 B 相电流 01 */          
    EN_YCMEA_IC01,                    /* 遥测 C 相电流 01 */
    EN_YCMEA_IA02,                    /* 遥测 A 相电流 02 */          
    EN_YCMEA_IB02,                    /* 遥测 B 相电流 02 */          
    EN_YCMEA_IC02,                    /* 遥测 C 相电流 02 */
	EN_YCMEA_I_END,                   /* 电流模拟量通道 END（不可修改）*/

    /* === 电压通道区域开始 === */
    EN_YCMEA_U_START = EN_YCMEA_I_END-1,       /* 电压通道起始标记（不可修改）*/
    EN_YCMEA_UA1,                             /* 遥测 A 相电压 1 */           
    EN_YCMEA_UB1,                             /* 遥测 B 相电压 1 */           
    EN_YCMEA_UC1,                             /* 遥测 C 相电压 1 */
    EN_YCMEA_UA2,                             /* 遥测 A 相电压 2 */           
    EN_YCMEA_UB2,                             /* 遥测 B 相电压 2 */           
    EN_YCMEA_UC2,                             /* 遥测 C 相电压 2 */ 
    EN_YCMEA_UAB1,                            /* 线电压 AB1 */ 
    EN_YCMEA_UBC1,                            /* 线电压 BC1 */ 
    EN_YCMEA_UCA1,                            /* 线电压 CA1 */ 
    EN_YCMEA_UAB2,                            /* 线电压 AB2 */ 
    EN_YCMEA_UBC2,                            /* 线电压 BC2 */ 
    EN_YCMEA_UCA2,                            /* 线电压 CA2 */ 
	EN_YCMEA_U_END,                           /* 电压模拟量通道 END（不可修改）*/

    /* === 零序通道区域开始 === */
    EN_YCMEA_3I0_START = EN_YCMEA_U_END-1,    /* 零序电流通道起始标记 */
    EN_YCMEA_3I01,                            /* 零序电流 3I01 */ 
    EN_YCMEA_3I0_END,                         /* 零序电流通道路 END */
    EN_YCMEA_3U0_START = EN_YCMEA_3I0_END-1,  /* 零序电压通道起始标记 */
    EN_YCMEA_3U01,                            /* 零序电压 3U01 */
    EN_YCMEA_3U02,                            /* 零序电压 3U02 */
    EN_YCMEA_3U0_END,                         /* 零序电压通道 END */

    /* === 频率测量通道区域开始 === */
    EN_YCMEA_FR_START = EN_YCMEA_3U0_END-1,   /* 频率通道起始标记 */
    EN_YCMEA_FR1,                             /* 频率测量 FR1 */
    EN_YCMEA_ANA_END,                         /* 交流模拟量通道 END（不可修改）*/

    /* === 直流通道区域开始 === */
    EN_YCMEA_DC_START = EN_YCMEA_ANA_END-1,   /* 直流通道起始标记 */
    EN_YCMEA_DC_01,                           /* 直流电压 01 */
    EN_YCMEA_DC_02,                           /* 直流电压 02 */
    EN_YCMEA_DC_END,                          /* 直流通道 END（不可修改）*/

    /* === 电度通道区域开始 === */
    EN_YCMEA_P_START = EN_YCMEA_DC_END-1,     /* 电度通道起始标记 */
    EN_YCMEA_PA_1,                            /* A 相有功功率 1 */
    EN_YCMEA_PB_1,                            /* B 相有功功率 1 */
    EN_YCMEA_PC_1,                            /* C 相有功功率 1 */
    EN_YCMEA_P_1,                             /* 总有功功率 1 */
    EN_YCMEA_Q_1,                             /* 总无功功率 1 */
    EN_YCMEA_S_1,                             /* 总视在功率 1 */
    EN_YCMEA_COS_1,                           /* 功率因数 1 */ 
    EN_YCMEA_P_END,                           /* 电度通道 END（不可修改）*/

    /* === 档位通道区域开始 === */
    EN_YCMEA_DW_START = EN_YCMEA_P_END-1,     /* 档位通道起始标记 */
    EN_YCMEA_DW_END,                          /* 档位通道 END（不可修改）*/
    EN_YCMEA_END=EN_YCMEA_DW_END              /* 所有遥测通道 END */
};

/* -------------------------------------------------------------------------
 * 宏定义：位掩码常量（BIT0-BIT31）
 * ------------------------------------------------------------------------- */
#define DB0                 (0x01)          /* BIT0 - 第 0 位掩码 */
#define DB1                 (0x02)          /* BIT1 - 第 1 位掩码 */
#define DB2                 (0x04)          /* BIT2 - 第 2 位掩码 */
#define DB3                 (0x08)          /* BIT3 - 第 3 位掩码（显示上送标志）*/
#define DB4                 (0x10)          /* BIT4 - 第 4 位掩码 */
#define DB5                 (0x20)          /* BIT5 - 第 5 位掩码（CPU0 标志）*/
#define DB6                 (0x40)          /* BIT6 - 第 6 位掩码 */
#define DB7                 (0x80)          /* BIT7 - 第 7 位掩码 */
#define DB8                 (0x100)         /* BIT8 - 第 8 位掩码 */
#define DB9                 (0x200)         /* BIT9 - 第 9 位掩码 */
#define DB10                (0x400)         /* BIT10 - 第 10 位掩码 */
#define DB11                (0x800)         /* BIT11 - 第 11 位掩码 */
#define DB12                (0x1000)        /* BIT12 - 第 12 位掩码 */
#define DB13                (0x2000)        /* BIT13 - 第 13 位掩码 */
#define DB14                (0x4000)        /* BIT14 - 第 14 位掩码 */
#define DB15                (0x8000)        /* BIT15 - 第 15 位掩码 */
#define DB16                (0x10000)       /* BIT16 - 第 16 位掩码 */
#define DB17                (0x20000)       /* BIT17 - 第 17 位掩码 */
#define DB18                (0x40000)       /* BIT18 - 第 18 位掩码 */
#define DB19                (0x80000)       /* BIT19 - 第 19 位掩码 */
#define DB20                (0x100000)      /* BIT20 - 第 20 位掩码 */
#define DB21                (0x200000)      /* BIT21 - 第 21 位掩码 */
#define DB22                (0x400000)      /* BIT22 - 第 22 位掩码 */
#define DB23                (0x800000)      /* BIT23 - 第 23 位掩码 */
#define DB24                (0x1000000)     /* BIT24 - 第 24 位掩码 */
#define DB25                (0x2000000)     /* BIT25 - 第 25 位掩码 */
#define DB26                (0x4000000)     /* BIT26 - 第 26 位掩码 */
#define DB27                (0x8000000)     /* BIT27 - 第 27 位掩码 */
#define DB28                (0x10000000)    /* BIT28 - 第 28 位掩码 */
#define DB29                (0x20000000)    /* BIT29 - 第 29 位掩码 */
#define DB30                (0x40000000)    /* BIT30 - 第 30 位掩码 */
#define DB31                (0x80000000)    /* BIT31 - 第 31 位掩码 */

/* -------------------------------------------------------------------------
 * 宏定义：CPU 上送标识（字节高三位）
 * ------------------------------------------------------------------------- */
enum _ANA_CPU_  
{                   
    EN_CPU0 = 32,                   /* BIT5 - CPU0 上送标志 */
    EN_CPU1 = 64,                   /* BIT6 - CPU1 上送标志 */
    EN_CPU2 = 128                   /* BIT7 - CPU2 上送标志 */
};

/* -------------------------------------------------------------------------
 * 宏定义：模拟量类型（用于 wChanType 字段）
 * ------------------------------------------------------------------------- */
enum    _ANA_TYP_  
{                
    EN_ANA_TYP_NULL = 0,            /* 未定义类型 */
    EN_ANA_TYP_I,                   /* 交流电流 */
    EN_ANA_TYP_I0,                  /* 零序电流 */
    EN_ANA_TYP_U,                   /* 相电压 */
    EN_ANA_TYP_Ux,                  /* 线电压 */
    EN_ANA_TYP_U0,                  /* 零序电压 */
    EN_ANA_TYP_U_S,                 /* 站用变电压 */

    EN_ANA_TYP_P,                   /* 有功功率 */
    EN_ANA_TYP_Q,                   /* 无功功率 */
    EN_ANA_TYP_S,                   /* 视在功率 */
    EN_ANA_TYP_COS,                 /* 功率因数 */
    EN_ANA_TYP_DC_U,                /* 直流电压 */
    EN_ANA_TYP_DC_I,                /* 直流电流 */
    EN_ANA_TYP_GEAR,                /* 档位 */
    EN_ANA_TYP_FR,                  /* 频率 */
    EN_ANA_TYP_T,                   /* 温度 */
    EN_ANA_TYP_DU,                  /* 直流模拟量 */
    EN_ANA_TYP_MC,                  /* 脉冲计数 */
    EN_ANA_TYP_AMP,                 /* 幅值 */
    EN_ANA_TYP_ST,                  /* 设备状态 */
    EN_ANA_TYP_IMP                  /* 阻抗 */
};

/* -------------------------------------------------------------------------
 * 宏定义：通道系数常量
 * ------------------------------------------------------------------------- */
#define CN_COE_YCMEA_I1A            (1)         /* 电流通道系数：1A -> 原始值 */
#define CN_COE_YCMEA_VOL            (1)         /* 电压通道系数：1V -> 原始值 */

/* -------------------------------------------------------------------------
 * 宏定义：条件标志常量
 * ------------------------------------------------------------------------- */
#define CN_FLAG_TRUE        (0x5A)              /* 条件成立标志 */
#define CN_FLAG_FALSE       (0xA5)              /* 条件不成立标志 */
#define CN_REC_ACTION       (0x55)              /* 记录动作标志（保护动作）*/
#define CN_REC_RETURN       (0xAA)              /* 记录返回标志（动作返回）*/
#define CN_REC_RETURN_YX    (0x5500+CN_REC_RETURN) /* 记录返回标志（不清除保护遥信）*/

/* -------------------------------------------------------------------------
 * 结构体定义：遥测量常量信息表条目
 * ------------------------------------------------------------------------- */
typedef struct
{
    uint16_t        wIndex;                     /* 模拟量虚端子号，通道唯一标识符 */
    uint8_t         byPinName[32];              /* 模拟量虚端子名称字符串 */
    uint8_t         byUnit;                     /* 二次模拟量单位索引（常量表偏移）*/
    uint8_t         byKiloUnit;                 /* 一次模拟量单位索引（常量表偏移）*/
    uint8_t         byCpu;                      /* 数据源 CPU 编号，0-2 分别对应 DB5-DB7 */
    uint16_t        wChanType;                  /* 模拟量向量类型（电流/电压/功率等）*/
    uint8_t         byName[8];                  /* 模拟量简写描述字符串（如"Ia1"）*/
    uint8_t         byPhaseName[CN_PHASE_NAME_LEN]; /* 相别标识（A/B/C/0）*/
    uint8_t         byWidth;                    /* 数据显示总宽度（含小数点）*/
    uint8_t         byDotBit;                   /* 小数位数，用于数值格式化 */
    uint16_t        wCode;                      /* IEC 60870-5-103 规约测量值代码 */
    uint32_t        dwChanCoe;                  /* 通道系数，用于原始值转工程值计算 */
    uint16_t        wCapacity;                  /* 遥测量量程上限，用于越限判断 */
    uint32_t        dwXuYcDflt;                 /* 虚遥测默认值（无数据时显示）*/
    uint16_t        wSamPinNO;                  /* 采样通道序号（原始采样/测频通道有效）*/
    uint16_t        wYcAdjFlg;                  /* 遥测关联调节系数标志，非 0 表示应用系数 */
    uint16_t        wHarmFlg;                   /* 谐波计算标志，非 0 表示需计算谐波分量 */
    uint16_t        wParIndex1;                 /* 关联参数号 1（线电压关联相量虚端子）*/
    uint16_t        wParIndex2;                 /* 关联参数号 2（线电压关联相量虚端子）*/
    uint32_t        dwCommAttr;                 /* 通讯传输属性位图：
                                                   DB0-103 上送，DB1-调试规约，
                                                   DB2-打印规约，DB3-显示上送 */
    uint32_t        dwResePara;                 /* 保留参数（按位使用）*/

} tagYcIndexTab;

/* -------------------------------------------------------------------------
 * 全局变量：遥测量常量索引表
 * 功能:
 *   存储所有遥测点的配置信息，包括通道类型、单位、量程、颜色等。
 * 
 * 数据结构说明:
 *   - 交流模拟量通道（电流/电压/功率/频率）
 *   - 直流模拟量通道（直流电压/电流）
 *   - 电度量通道（有功/无功/视在功率及功率因数）
 *   - 档位通道（预留扩展）
 * 
 * 颜色规范:
 *   - CN_RGB_YELLOW (黄): A 相及相关量
 *   - CN_RGB_GREEN  (绿): B 相及相关量  
 *   - CN_RGB_RED    (红): C 相及相关量
 *   - CN_RGB_WHITE  (白): 零序/直流/通用量
 * 
 * 返回值:
 *   - 指向常量表的只读指针（const）
 * ------------------------------------------------------------------------- */
const tagYcIndexTab g_tYcIndexTab[] =
{
    //================================================================================
    // 遥测量交流通道配置表
    //================================================================================
    // 字段顺序：wIndex, byPinName, byUnit, byKiloUnit, byCpu, wChanType, 
    //           byName, byPhase, byWidth, byDotBit, wCode, wChanCoe,
    //           wCapacity, dwXuYcDflt, wSamPinNO, wYcAdjFlg, wHarmFlg,
    //           wParIndex1, wParIndex2, dwCommAttr, dwResePara
    {EN_YCMEA_IA01,    "EN_YCMEA_IA01",   EN_UNIT_A,     EN_UNIT_KA,     EN_CPU0, EN_ANA_TYP_I,   "Ia1",  "A",    7,      3,       92,   CN_COE_YCMEA_I1A,              6,        1000,     EN_UNIT01_A, CN_FLAG_TRUE, CN_FLAG_TRUE, 0xAAAA,    0xAAAA,    0xFFFF,    0},   // A 相测量电流 01
    {EN_YCMEA_IB01,    "EN_YCMEA_IB01",   EN_UNIT_A,     EN_UNIT_KA,     EN_CPU0, EN_ANA_TYP_I,   "Ib1",  "B",    7,      3,       93,   CN_COE_YCMEA_I1A,              6,        1000,     EN_UNIT01_B, CN_FLAG_TRUE, CN_FLAG_TRUE, 0xAAAA,    0xAAAA,    0xFFFF,    0},   // B 相测量电流 01
    {EN_YCMEA_IC01,    "EN_YCMEA_IC01",   EN_UNIT_A,     EN_UNIT_KA,     EN_CPU0, EN_ANA_TYP_I,   "Ic1",  "C",    7,      3,       94,   CN_COE_YCMEA_I1A,              6,        1000,     EN_UNIT01_C, CN_FLAG_TRUE, CN_FLAG_TRUE, 0xAAAA,    0xAAAA,    0xFFFF,    0},   // C 相测量电流 01
    {EN_YCMEA_IA02,    "EN_YCMEA_IA02",   EN_UNIT_A,     EN_UNIT_KA,     EN_CPU0, EN_ANA_TYP_I,   "Ia2",  "A",    7,      3,       95,   CN_COE_YCMEA_I1A,              6,        1000,     EN_UNIT02_A, CN_FLAG_TRUE, CN_FLAG_TRUE, 0xAAAA,    0xAAAA,    0xFFFF,    0},   // A 相测量电流 02
    {EN_YCMEA_IB02,    "EN_YCMEA_IB02",   EN_UNIT_A,     EN_UNIT_KA,     EN_CPU0, EN_ANA_TYP_I,   "Ib2",  "B",    7,      3,       96,   CN_COE_YCMEA_I1A,              6,        1000,     EN_UNIT02_B, CN_FLAG_TRUE, CN_FLAG_TRUE, 0xAAAA,    0xAAAA,    0xFFFF,    0},   // B 相测量电流 02
    {EN_YCMEA_IC02,    "EN_YCMEA_IC02",   EN_UNIT_A,     EN_UNIT_KA,     EN_CPU0, EN_ANA_TYP_I,   "Ic2",  "C",    7,      3,       97,   CN_COE_YCMEA_I1A,              6,        1000,     EN_UNIT02_C, CN_FLAG_TRUE, CN_FLAG_TRUE, 0xAAAA,    0xAAAA,    0xFFFF,    0},   // C 相测量电流 02
    {EN_YCMEA_UA1,     "EN_YCMEA_UA1",    EN_UNIT_V,     EN_UNIT_KV,     EN_CPU0, EN_ANA_TYP_U,   "Ua1",  "A",    6,      2,       98,   CN_COE_YCMEA_VOL,              120,      6000,     EN_VOL1_A,   CN_FLAG_TRUE, CN_FLAG_TRUE, 0xAAAA,    0xAAAA,    0xFFFF,    DB5}, // A 相电压 1
    {EN_YCMEA_UB1,     "EN_YCMEA_UB1",    EN_UNIT_V,     EN_UNIT_KV,     EN_CPU0, EN_ANA_TYP_U,   "Ub1",  "B",    6,      2,       99,   CN_COE_YCMEA_VOL,              120,      6000,     EN_VOL1_B,   CN_FLAG_TRUE, CN_FLAG_TRUE, 0xAAAA,    0xAAAA,    0xFFFF,    DB5}, // B 相电压 1
    {EN_YCMEA_UC1,     "EN_YCMEA_UC1",    EN_UNIT_V,     EN_UNIT_KV,     EN_CPU0, EN_ANA_TYP_U,   "Uc1",  "C",    6,      2,       100,  CN_COE_YCMEA_VOL,              120,      6000,     EN_VOL1_C,   CN_FLAG_TRUE, CN_FLAG_TRUE, 0xAAAA,    0xAAAA,    0xFFFF,    DB5}, // C 相电压 1
    {EN_YCMEA_UA2,     "EN_YCMEA_UA2",    EN_UNIT_V,     EN_UNIT_KV,     EN_CPU0, EN_ANA_TYP_U,   "Ua2",  "A",    6,      2,       101,  CN_COE_YCMEA_VOL,              120,      6000,     EN_VOL2_A,   CN_FLAG_TRUE, CN_FLAG_TRUE, 0xAAAA,    0xAAAA,    0xFFFF,    DB5}, // A 相电压 2
    {EN_YCMEA_UB2,     "EN_YCMEA_UB2",    EN_UNIT_V,     EN_UNIT_KV,     EN_CPU0, EN_ANA_TYP_U,   "Ub2",  "B",    6,      2,       102,  CN_COE_YCMEA_VOL,              120,      6000,     EN_VOL2_B,   CN_FLAG_TRUE, CN_FLAG_TRUE, 0xAAAA,    0xAAAA,    0xFFFF,    DB5}, // B 相电压 2
    {EN_YCMEA_UC2,     "EN_YCMEA_UC2",    EN_UNIT_V,     EN_UNIT_KV,     EN_CPU0, EN_ANA_TYP_U,   "Uc2",  "C",    6,      2,       103,  CN_COE_YCMEA_VOL,              120,      6000,     EN_VOL2_C,   CN_FLAG_TRUE, CN_FLAG_TRUE, 0xAAAA,    0xAAAA,    0xFFFF,    DB5}, // C 相电压 2
    {EN_YCMEA_UAB1,    "EN_YCMEA_UAB1",   EN_UNIT_V,     EN_UNIT_KV,     EN_CPU0, EN_ANA_TYP_U,   "Uab1", "A",    6,      2,       104,  CN_COE_YCMEA_VOL,              120,      10000,    0xAAAA,      0xAAAA,       CN_FLAG_TRUE, EN_VOL1_A,  EN_VOL1_B,  0xFFFF,    0},   // AB 相线电压 1
    {EN_YCMEA_UBC1,    "EN_YCMEA_UBC1",   EN_UNIT_V,     EN_UNIT_KV,     EN_CPU0, EN_ANA_TYP_U,   "Ubc1", "B",    6,      2,       105,  CN_COE_YCMEA_VOL,              120,      10000,    0xAAAA,      0xAAAA,       CN_FLAG_TRUE, EN_VOL1_B,  EN_VOL1_C,  0xFFFF,    0},   // BC 相线电压 1
    {EN_YCMEA_UCA1,    "EN_YCMEA_UCA1",   EN_UNIT_V,     EN_UNIT_KV,     EN_CPU0, EN_ANA_TYP_U,   "Uca1", "C",    6,      2,       106,  CN_COE_YCMEA_VOL,              120,      10000,    0xAAAA,      0xAAAA,       CN_FLAG_TRUE, EN_VOL1_C,  EN_VOL1_A,  0xFFFF,    0},   // CA 相线电压 1
    {EN_YCMEA_UAB2,    "EN_YCMEA_UAB2",   EN_UNIT_V,     EN_UNIT_KV,     EN_CPU0, EN_ANA_TYP_U,   "Uab2", "A",    6,      2,       107,  CN_COE_YCMEA_VOL,              120,      10000,    0xAAAA,      0xAAAA,       CN_FLAG_TRUE, EN_VOL2_A,  EN_VOL2_B,  0xFFFF,    0},   // AB 相线电压 2
    {EN_YCMEA_UBC2,    "EN_YCMEA_UBC2",   EN_UNIT_V,     EN_UNIT_KV,     EN_CPU0, EN_ANA_TYP_U,   "Ubc2", "B",    6,      2,       108,  CN_COE_YCMEA_VOL,              120,      10000,    0xAAAA,      0xAAAA,       CN_FLAG_TRUE, EN_VOL2_B,  EN_VOL2_C,  0xFFFF,    0},   // BC 相线电压 2
    {EN_YCMEA_UCA2,    "EN_YCMEA_UCA2",   EN_UNIT_V,     EN_UNIT_KV,     EN_CPU0, EN_ANA_TYP_U,   "Uca2", "C",    6,      2,       109,  CN_COE_YCMEA_VOL,              120,      10000,    0xAAAA,      0xAAAA,       CN_FLAG_TRUE, EN_VOL2_C,  EN_VOL2_A,  0xFFFF,    0},   // CA 相线电压 2
    {EN_YCMEA_3I01,    "EN_YCMEA_3I01",   EN_UNIT_A,     EN_UNIT_KA,     EN_CPU0, EN_ANA_TYP_I0,  "Io1",  "0",    7,      3,       110,  CN_COE_YCMEA_I1A,              6,        1000,     EN_UNIT01_0, CN_FLAG_TRUE, CN_FLAG_TRUE, 0xAAAA,    0xAAAA,    0xFFFF,    0},   // 零序电流 3I0
    {EN_YCMEA_3U01,    "EN_YCMEA_3U01",   EN_UNIT_V,     EN_UNIT_KV,     EN_CPU0, EN_ANA_TYP_U0,  "Uo1",  "0",    6,      2,       111,  CN_COE_YCMEA_VOL,              120,      10000,    EN_VOL1_0,   CN_FLAG_TRUE, CN_FLAG_TRUE, 0xAAAA,    0xAAAA,    0xFFFF,    0},   // 零序电压 3U0 1
    {EN_YCMEA_3U02,    "EN_YCMEA_3U02",   EN_UNIT_V,     EN_UNIT_KV,     EN_CPU0, EN_ANA_TYP_U,   "Uo2",  "0",    6,      2,       112,  CN_COE_YCMEA_VOL,              120,      10000,    EN_VOL2_0,   CN_FLAG_TRUE, CN_FLAG_TRUE, 0xAAAA,    0xAAAA,    0xFFFF,    0},   // 零序电压 3U0 2
    {EN_YCMEA_FR1,     "EN_YCMEA_FR1",    EN_UNIT_HZ,    EN_UNIT_HZ,     EN_CPU0, EN_ANA_TYP_FR,  "Fr1",  "0",    5,      2,       113,  1,                             20,       4999,     EN_VOL1_FR,  0xAAAA,       0xAAAA,      0xAAAA,    0xAAAA,    0xFFFF,    DB0}, // 频率测量 FR

    //================================================================================
    // 遥测量直流通道配置表
    //================================================================================
    {EN_YCMEA_DC_01,   "EN_YCMEA_DC_01",  EN_UNIT_NULL,  EN_UNIT_NULL,   EN_CPU0, EN_ANA_TYP_DU,  "ZL01", "0",    6,      2,       114,  1,                             512,      6000,     EN_UNIT01_DC, CN_FLAG_TRUE, 0xAAAA,      0xAAAA,    0xAAAA,    0xFFFF,    0},   // 直流电压 01
    {EN_YCMEA_DC_02,   "EN_YCMEA_DC_02",  EN_UNIT_NULL,  EN_UNIT_NULL,   EN_CPU0, EN_ANA_TYP_DU,  "ZL02", "0",    6,      2,       115,  2,                             512,      6000,     0xAAAA,      CN_FLAG_TRUE, 0xAAAA,      0xAAAA,    0xAAAA,    0xFFFF,    0},   // 直流电压 02

    //================================================================================
    // 遥测量电度通道配置表
    //================================================================================
    {EN_YCMEA_PA_1,    "EN_YCMEA_PA_1",   EN_UNIT_W,     EN_UNIT_W,      EN_CPU0, EN_ANA_TYP_P,   "Pa1",  "A",    8,      3,       116,  CN_COE_YCMEA_VOL * CN_COE_YCMEA_I1A, 866, 60000,  0xAAAA,      CN_FLAG_TRUE, 0xAAAA,      0xAAAA,    0xAAAA,    0xFFFF,    DB5},   // A 相有功功率 PA
    {EN_YCMEA_PB_1,    "EN_YCMEA_PB_1",   EN_UNIT_W,     EN_UNIT_W,      EN_CPU0, EN_ANA_TYP_P,   "Pb1",  "B",    8,      3,       117,  CN_COE_YCMEA_VOL * CN_COE_YCMEA_I1A, 866, 60000,  0xAAAA,      CN_FLAG_TRUE, 0xAAAA,      0xAAAA,    0xAAAA,    0xFFFF,    DB5},   // B 相有功功率 PB
    {EN_YCMEA_PC_1,    "EN_YCMEA_PC_1",   EN_UNIT_W,     EN_UNIT_W,      EN_CPU0, EN_ANA_TYP_P,   "Pc1",  "C",    8,      3,       118,  CN_COE_YCMEA_VOL * CN_COE_YCMEA_I1A, 866, 60000,  0xAAAA,      CN_FLAG_TRUE, 0xAAAA,      0xAAAA,    0xAAAA,    0xFFFF,    DB5},   // C 相有功功率 PC
    {EN_YCMEA_P_1,     "EN_YCMEA_P_1",    EN_UNIT_W,     EN_UNIT_W,      EN_CPU0, EN_ANA_TYP_P,   "P1",   "0",    8,      3,       119,  CN_COE_YCMEA_VOL * CN_COE_YCMEA_I1A, 866, 180000, 0xAAAA,      CN_FLAG_TRUE, 0xAAAA,      0xAAAA,    0xAAAA,    0xFFFF,    0},   // 总有功功率 P
    {EN_YCMEA_Q_1,     "EN_YCMEA_Q_1",    EN_UNIT_VAR,   EN_UNIT_VAR,    EN_CPU0, EN_ANA_TYP_Q,   "Q1",   "0",    8,      3,       120,  CN_COE_YCMEA_VOL * CN_COE_YCMEA_I1A, 866, 180000, 0xAAAA,      CN_FLAG_TRUE, 0xAAAA,      0xAAAA,    0xAAAA,    0xFFFF,    0},   // 总无功功率 Q
    {EN_YCMEA_S_1,     "EN_YCMEA_S_1",    EN_UNIT_VA,    EN_UNIT_VA,     EN_CPU0, EN_ANA_TYP_S,   "S1",   "0",    8,      3,       121,  CN_COE_YCMEA_VOL * CN_COE_YCMEA_I1A, 866, 180000, 0xAAAA,      CN_FLAG_TRUE, 0xAAAA,      0xAAAA,    0xAAAA,    0xFFFF,    0},   // 总视在功率 S
    {EN_YCMEA_COS_1,   "EN_YCMEA_COS_1",  EN_UNIT_NULL,  EN_UNIT_NULL,   EN_CPU0, EN_ANA_TYP_COS, "COS1", "0",    7,      3,       122,  1,                             1,        1000,     0xAAAA,      0xAAAA,       0xAAAA,      0xAAAA,    0xAAAA,    0xFFFF,    0},   // 功率因数 COS
};
enum _KI_USAGE_NUMBER
{
//================================================================================
    EN_KI_START,                        // 开入通道 START,本条不能修改
	EN_KI_YX_START = EN_KI_START,		// 将保护开入也计入保护遥信中，以便遥信组件处理  mod by   2012-08-14
//================================================================================

// SR1600板件开入start	
	EN_KI_HW1,			 
	EN_KI_TW1,			 
	EN_KI_CN,			   
	EN_KIA_04,			 
	EN_KIA_05,			 
	EN_KI_HardYBCH,  
	EN_KI_HardYB,	  
	EN_KI_HardYBJX,  
	EN_KI_YFJD,		   
	EN_KIA_10,			 
	EN_KIA_11,			 
	EN_KIA_12,			 
	EN_KI_FG,
	EN_KI_SDFZ,		  
	EN_KI_SDHZ,		  
	EN_KI_HardYBJL,			    	                 
	EN_KIA_17,			 
	EN_KIA_18,			 
	EN_KIA_19,			
	EN_KIA_20,			
	EN_KIA_14,			 
	EN_KIA_15,			 
	EN_KIA_16,	 
  EN_KIA_24,			


                                      
	
    EN_KI_RLY_END,                          // 保护开入通道 END,本条不能修改
//================================================================================
// 单点遥信(需设防抖时间)
//================================================================================
    EN_KI_YX_TEMP = EN_KI_RLY_END-1,       // 单点遥信开入通道 START,本条不能修改( 遥信通道已经移至EN_KI_START)
//================================================================================
// 若DTU不带保护，则移出保护遥信队列dudw2013-12-18 19:07:51
// 未将开关位置枚举量修改为开入名称，因为省去了保护组件、I/O表等存在大量的多余预编译
//#if(CN_DTU_RLY_ON == FALSE)	//===========DTU保护投退==================
 

//----------------------------------------------
	EN_KI_TIME_YX_END,						// 单点遥信(需设防抖时间)通道 END,本条不能修改
//================================================================================
// 单点遥信(不需设防抖时间)
//================================================================================
	EN_KI_NOTIME_YX_START = EN_KI_TIME_YX_END-1,// 单点遥信(不需设防抖时间)开入通道 START,本条不能修改
	EN_KI_SOFTYX_DRQY,

  EN_KI_SOFTYX_BHON,  	
  EN_KI_SOFTYX_FAON,  	
  EN_KI_SOFTYX_DYFAON,  
  EN_KI_SOFTYX_DLFAON,  
  EN_KI_SOFTYX_ZSYFAON, 
  EN_KI_SOFTYX_YKFZ,  	
  EN_KI_SOFTYX_YKHZ,  	
    EN_KI_SOFTYX_WaveStart,
    EN_KI_SOFTYX_WaveEnd,
	EN_KI_SOFTYX_CHZON,
    EN_KI_SOFTYX_HBCK,//
    EN_KI_SOFTYX_FA_JZ,///--集中型软遥信
    EN_KI_SOFTYX_FA_UT,///--电压时间型投入软遥信
    EN_KI_SOFTYX_BSZ_01,//闭锁总软遥信
    EN_KI_SOFTYX_SGZ_01,                        // 线路01事故总软遥信
	EN_KI_SOFTYX_FZD_TZ,                   // 保护出口软遥信
    EN_KI_SOFTYX_Flt_A,
    EN_KI_SOFTYX_Flt_B,
    EN_KI_SOFTYX_Flt_C,
    EN_KI_SOFTYX_L1GL_ALARM_01,  
    EN_KI_SOFTYX_L1GL_TRIP_01,   
    EN_KI_SOFTYX_DDHZ,
    EN_KI_SOFTYX_SDFZ,
    EN_KI_SOFTYX_L2GLIC_ALARM_01,
    EN_KI_SOFTYX_L2GL_ALARM_01,  
    EN_KI_SOFTYX_L2GL_TRIP_01,   
    EN_KI_SOFTYX_L3GLIA_ALARM_01,
    EN_KI_SOFTYX_L3GLIB_ALARM_01,
    EN_KI_SOFTYX_L3GLIC_ALARM_01,
    EN_KI_SOFTYX_L3GL_ALARM_01,  
    EN_KI_SOFTYX_L3GL_TRIP_01,
     
    EN_KI_SOFTYX_KGJH,                        // 软遥信开关拒合
    EN_KI_SOFTYX_KGJF,                        // 软遥信开关拒分
    EN_KI_SOFTYX_AdjEnd,                       // 校准结束软遥信
    EN_KI_SOFTYX_UYSX,                        // 软遥信U越下限
    EN_KI_SOFTYX_UYXX,                        // 软遥信U越下限
    EN_KI_SOFTYX_IYSX,                        // 软遥信I越上限
    EN_KI_SOFTYX_LackFr_ALARM,//欠压告警
    EN_KI_SOFTYX_LackFr_TRIP, //欠压跳闸
    EN_KI_SOFTYX_OverFr_ALARM,//过压告警
    EN_KI_SOFTYX_OverFr_TRIP, //过压跳闸


    EN_KI_SOFTYX_OverI0_ALARM,
    EN_KI_SOFTYX_OverI0_TRIP,
    EN_KI_SOFTYX_GFH_ALARM_01, 
    EN_KI_SOFTYX_GFH_TRIP_01,  
    EN_KI_SOFTYX_GFH_ALARM_02, 
    EN_KI_SOFTYX_GFH_TRIP_02,  
    EN_KI_SOFTYX_GFH_ALARM_03, 
    EN_KI_SOFTYX_GFH_TRIP_03,  
    EN_KI_SOFTYX_Speed_TRIP,
    EN_KI_SOFTYX_I0Speed_TRIP,
    EN_KI_SOFTYX_CHZ_TRIP,
	EN_KI_SOFTYX_CchHVBS,                          //负荷侧有压闭锁重合
	EN_KI_SOFTYX_Bak05,
	EN_KI_SOFTYX_Bak06,
	EN_KI_SOFTYX_RCLS,    													// " 重合闸动作"
	EN_KI_SOFTYX_CHJS,    													// " 断路器重合闸后加速"
	EN_KI_SOFTYX_CHZChgOver,												// " 重合闸充电好"
	EN_KI_SOFTYX_CHZACT1,														// " 一次重合闸动作"
	EN_KI_SOFTYX_CHZACT2,														// " 二次重合闸动作"
	EN_KI_SOFTYX_CHZACT3,														// " 三次重合闸动作"
	EN_KI_SOFTYX_CHBS,    													// " 断路器二次重合闭锁"
	EN_KI_SOFTYX_SPED,															// " 大电流闭锁重合闸"
	EN_KI_SOFTYX_FDMS,
    EN_KI_SOFTYX_LLMS,
    EN_KI_SOFTYX_JDXH,
	EN_KI_SOFTYX_JDGZ,
	EN_KI_SOFTYX_DLGZ,
	EN_KI_SOFTYX_L1GLIA_TRIP_01,
	EN_KI_SOFTYX_L1GLIB_TRIP_01,
	EN_KI_SOFTYX_L1GLIC_TRIP_01,
	EN_KI_SOFTYX_L2GLIA_TRIP_01,
	EN_KI_SOFTYX_L2GLIB_TRIP_01,
	EN_KI_SOFTYX_L2GLIC_TRIP_01,
	EN_KI_SOFTYX_L3GLIA_TRIP_01,
	EN_KI_SOFTYX_L3GLIB_TRIP_01,
	EN_KI_SOFTYX_L3GLIC_TRIP_01,
	
	EN_KI_TWIN_YX_01_0,                     	// 双点遥信常开
	EN_KI_TWIN_YX_01_1,                     	// 双点遥信常闭
	
    EN_KI_YX_END,                           // 单点遥信通道 END,本条不能修改
//================================================================================
// 双点遥信
//================================================================================
    EN_KI_TWIN_YX_START = EN_KI_YX_END-1,   // 双点遥信通道 START,本条不能修改
//----------------------------------------------
    EN_KI_TWIN_YX_01,                       // 双点遥信01
	EN_KI_TWIN_YX_02,                       // 双点遥信02
	EN_KI_TWIN_YX_03,                       // 双点遥信03
	EN_KI_TWIN_YX_04,                       // 双点遥信04
	


//------------------------------------------//
    EN_KI_TWIN_YX_END,                      // 双点遥信通道 END,本条不能修改
//================================================================================
// 整形遥信(INT8U)
//================================================================================
	EN_KI_INT8U_YX_START = EN_KI_TWIN_YX_END-1, // 整形遥信(INT8U)通道 START,本条不能修改
//----------------------------------------------
    EN_KI_INT8U_SBTYS_01,                   // 整形遥信(INT8U)01
//------------------------------------------//
	EN_KI_INT8U_YX_END,						// 整形遥信(INT8U)通道 END,本条不能修改
//================================================================================
	EN_KI_USER_END = EN_KI_INT8U_YX_END    // 可视化定义开入量枚举 END,本条以最后一个END赋值
};
// 开入量信息常量表数据结构
typedef struct
{
    uint16_t          wIndex;                                     // 开入量的偏移地址
    uint8_t           byPinName[32];                              // 开入量虚端子名称
    uint16_t          wIndexDPS;                                  // 关联的双点状态配对常闭虚端子，无关联为0xAAAA
    uint8_t           byCpu;                                      // 数据由哪一CPU上送
    uint16_t          wUnitNo;                                    // 间隔编号,暂定BP2C区分间隔专用,其他装置无效
    uint16_t          wIOType;                                    // KI:备用  KO:GOOSE跳闸经底层FPGA启动线闭锁
    uint16_t          wInf;                                       // 103规约信息码
    uint8_t           byName[40];                                 // 开入量描述字符串
    uint32_t          dwCommAttr;                                 // 通讯传输属性, DB0置位:103上送, DB1置位:调试规约上送, DB2置位:打印规约,DB3置位:显示上送, DB4~DB31:未定义
    uint32_t          dwAttrWave;                                 // 附加数据录波属性 =0本通道不录波；=其它(本通道录波)
    uint16_t          wGoSoft;                                    // 关联的GOOSE软压板号,投入时GOOSE开入开出才起作用,非关联为0xAAAA
    uint8_t           byEnName[8];                                // 英文简写标识(本通道录波时用)
}tagInputDefTab;
const tagInputDefTab  g_tInputModelTab[]=
{
//================================================================================
// 可视化生成开入量
//================================================================================
    //wIndex            		byPinName           		dwIndexDPS		byCpu	   wUnitNo wKIType wInf    		byName						dwCommAttr  		dwAttrWave  wGoSoft byEnName
//==============================================        	
    {EN_KI_START,       		"EN_KI_START",         		0xAAAA,		  	EN_CPU0,   0,      0,      2 ,      	"开入开始",					0, 					0,          0xAAAA, ""},
//==============================================

//==============================================
// 保护开入通道
//==============================================
   //wIndex            			byPinName              		dwIndexDPS      byCpu       wUnitNo wKIType wInf    	byName                     dwCommAttr  		dwAttrWave  wGoSoft 	byEnName
		{EN_KI_HW1,					"EN_KI_HW1",						0xAAAA,			EN_CPU0,    0,      0,      149,      	"开关合位",           0xFFFFFFFF, 		0,          0xAAAA, 	""},
    {EN_KI_TW1,					"EN_KI_TW1",						0xAAAA,			EN_CPU0,    0,      0,      150,      	"开关分位",           0xFFFFFFFF, 		0,          0xAAAA, 	""},       
    {EN_KI_CN,					"EN_KI_CN",							0xAAAA,			EN_CPU0,    0,      0,      151,      	"开关未储能",         0xFFFFFFFF, 		0,          0xAAAA, 	""},
    {EN_KIA_04,					"EN_KIA_04",		  			0xAAAA,			EN_CPU0,    0,      0,      152,      	"接地位置",           0xFFFFFFFF, 		0,          0xAAAA, 	""},
    {EN_KIA_05,					"EN_KI_05",		  				0xAAAA,			EN_CPU0,    0,      0,      153,      	"隔离位置",           0xFFFFFFFF, 		0,          0xAAAA, 	""},
	  {EN_KI_HardYBCH,		"EN_KI_HardYBCH",				0xAAAA,			EN_CPU0,    0,      0,      154,      	"停用重合闸",   			0xFFFFFFFF, 		0,          0xAAAA, 	""},
    {EN_KI_HardYB,			"EN_KI_HardYB",					0xAAAA,			EN_CPU0,    0,      0,      155,      	"保护投入",    				0xFFFFFFFF, 		0,          0xAAAA, 	""},
    {EN_KI_HardYBJX,		"EN_KI_HardYBJX",				0xAAAA,			EN_CPU0,    0,      0,      156,      	"检修压板",         	0xFFFFFFFF, 		0,          0xAAAA, 	""},
	  {EN_KI_YFJD,				"EN_KIA_05",						0xAAAA,			EN_CPU0,    0,      0,      157,      	"远方信号",           0xFFFFFFFF, 		0,          0xAAAA, 	""},
	{EN_KIA_10,					"EN_KIA_07",		  			0xAAAA,			EN_CPU0,    0,      0,      158,      	"备用1",       				0xFFFFFFFF, 		0,          0xAAAA, 	""},
    {EN_KIA_11,					"EN_KIA_08",						0xAAAA,			EN_CPU0,    0,      0,      159,      	"备用2",       				0xFFFFFFFF, 		0,          0xAAAA, 	""},
	{EN_KIA_12,					"EN_KIA_10",		  			0xAAAA,			EN_CPU0,    0,      0,      160,      	"备用3",           		0xFFFFFFFF, 	  0,          0xAAAA, 	""},
	{EN_KI_FG,					"EN_KI_FG",							0xAAAA,			EN_CPU0,    0,      0,      161,      	"复归",       				0xFFFFFFFF, 	  0,          0xAAAA, 	""},
	{EN_KI_SDFZ,				"EN_KI_SDFZ,",					0xAAAA,			EN_CPU0,    0,      0,      169,      	"手动分闸",           0xFFFFFFFF, 		0,          0xAAAA, 	""},
	{EN_KI_SDHZ,				"EN_KI_SDHZ",						0xAAAA,			EN_CPU0,    0,      0,      170,      	"手动合闸",           0xFFFFFFFF, 		0,          0xAAAA, 	""},
  	{EN_KI_HardYBJL,		"EN_KI_HardYBJL",				0xAAAA,			EN_CPU0,    0,      0,      171,      	"安全自动化",   			0xFFFFFFFF, 		0,          0xAAAA, 	""},

	{EN_KIA_17,					"EN_KIA_09",						0xAAAA,			EN_CPU0,    0,      0,      165,      	"备用8",       				0xFFFFFFFF, 	  0,          0xAAAA, 	""},
	{EN_KIA_18,					"EN_KIA_17",		  			0xAAAA,			EN_CPU0,    0,      0,      166,      	"故障信号",           0xFFFFFFFF, 		0,          0xAAAA, 	""},
    {EN_KIA_19,					"EN_KIA_18",						0xAAAA,			EN_CPU0,    0,      0,      167,      	"备用9",              0xFFFFFFFF, 		0,          0xAAAA, 	""},
	{EN_KIA_20,					"EN_KIA_19",						0xAAAA,			EN_CPU0,    0,      0,      168,      	"备用10",             0xFFFFFFFF, 		0,          0xAAAA, 	""},
	{EN_KIA_14,					"EN_KIA_12",		  			0xAAAA,			EN_CPU0,    0,      0,      162,      	"气压报警",           		0xFFFFFFFF, 		0,          0xAAAA, 	""},
	{EN_KIA_15,					"EN_KIA_13",						0xAAAA,			EN_CPU0,    0,      0,      163,      	"气压故障",           		0xFFFFFFFF, 		0,          0xAAAA, 	""},
    {EN_KIA_16,					"EN_KIA_14",						0xAAAA,			EN_CPU0,    0,      0,      164,      	"备用11",              0xFFFFFFFF, 	  0,          0xAAAA, 	""},
	{EN_KIA_24,					"EN_KIA_20",						0xAAAA,			EN_CPU0,    0,      0,      172,      	"备用12",							0xFFFFFFFF, 		0,          0xAAAA, 	""},
    {EN_KI_SOFTYX_DRQY,      "EN_KI_SOFTYX_DRQY",     0xAAAA,         EN_CPU0,    0,      0,      257,        "控回断线告警",           	DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
	{EN_KI_SOFTYX_BHON,  		"EN_KI_SOFTYX_Break_A",     			 0xAAAA,         EN_CPU0,	0,      0,   258,	"保护功能投入",								DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
	{EN_KI_SOFTYX_FAON,  		"EN_KI_SOFTYX_Break_B",     			 0xAAAA,         EN_CPU0,	0,      0,   259,	"就地型FA投入",								DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
	{EN_KI_SOFTYX_DYFAON,  		"EN_KI_SOFTYX_Break_C",     			 0xAAAA,         EN_CPU0,	0,      0,   260,	"电压时间型FA投入",								DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
	{EN_KI_SOFTYX_DLFAON,  		"EN_KI_SOFTYX_Break_AB",     			 0xAAAA,         EN_CPU0,	0,      0,   261,	"电压电流时间型FA投入",								DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
	{EN_KI_SOFTYX_ZSYFAON,  		"EN_KI_SOFTYX_Break_BC",     			 0xAAAA,         EN_CPU0,	0,      0,   262,	"自适应型FA投入",								DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
	{EN_KI_SOFTYX_YKFZ,  		"EN_KI_SOFTYX_Break_AC",     			 0xAAAA,         EN_CPU0,	0,      0,   263,	"遥控分闸",								DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
	{EN_KI_SOFTYX_YKHZ,  	"EN_KI_SOFTYX_Break_ABC",     		 0xAAAA,         EN_CPU0,	0,      0,   264,	"遥控合闸",							DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
	{EN_KI_SOFTYX_CHZON, 		"EN_KI_SOFTYX_CHZON",			  0xAAAA,	EN_CPU0,	0,		0,		273,		"重合闸投入", 				DB0+DB1+DB2+DB3,	0,	0xAAAA, 	"SYX099"},
	{EN_KI_SOFTYX_HBCK,			"EN_KI_SOFTYX_FAON",			  0xAAAA,	EN_CPU0,	0,		0,		274,		"开关保护出口",					DB0+DB1+DB2+DB3,	0,	0xAAAA, 	"SYX099"},
	{EN_KI_SOFTYX_FA_JZ, 		"EN_KI_SOFTYX_FA_JZ",			  0xAAAA,	EN_CPU0,	0,		0,		275,		"集中型投入",					DB0+DB1+DB2+DB3,	0,	0xAAAA, 	"SYX099"},
	{EN_KI_SOFTYX_FA_UT,		"EN_KI_SOFTYX_FA_UT",			  0xAAAA,	EN_CPU0,	0,		0,		276,		"装置故障告警",			DB0+DB1+DB2+DB3,	0,	0xAAAA, 	"SYX099"},
    {EN_KI_SOFTYX_BSZ_01,       "EN_KI_SOFTYX_BSZ_01",      0xAAAA,         EN_CPU0,    0,      0,      277,    	"闭锁总软遥信",       DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
    {EN_KI_SOFTYX_SGZ_01,       "EN_KI_SOFTYX_SGZ_01",      0xAAAA,         EN_CPU0,    0,      0,      278,    	"事故总软遥信",       DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},                                                                             	                        	                        	
    {EN_KI_SOFTYX_FZD_TZ,      	"EN_KI_SOFTYX_FZD_TZ",     	0xAAAA,         EN_CPU0,    0,      0,      279,      "非遮断停电跳闸",           	DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX095"},          

//预留保护软遥信 10个
    {EN_KI_SOFTYX_Flt_A,										"EN_KI_SOFTYX_Flt_A",0xAAAA,    EN_CPU0,    0,      0,      280,        "备用",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
    {EN_KI_SOFTYX_Flt_B,										"EN_KI_SOFTYX_Flt_B",0xAAAA,    EN_CPU0,    0,      0,      281,        "备用",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
    {EN_KI_SOFTYX_Flt_C,										"EN_KI_SOFTYX_Flt_C",0xAAAA,    EN_CPU0,    0,      0,      282,        "备用",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
    {EN_KI_SOFTYX_L1GL_ALARM_01,  "EN_KI_SOFTYX_L1GL_ALARM_01",  0xAAAA,    EN_CPU0,    0,      0,      283,        "过流Ⅰ段告警"    ,         DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
    {EN_KI_SOFTYX_L1GL_TRIP_01,   "EN_KI_SOFTYX_L1GL_TRIP_01",   0xAAAA,    EN_CPU0,    0,      0,      284,        "过流Ⅰ段跳闸",             DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
    {EN_KI_SOFTYX_DDHZ,						"EN_KI_SOFTYX_DDHZ",					 0xAAAA,    EN_CPU0,    0,      0,      285,        "得电合闸动作",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
    {EN_KI_SOFTYX_SDFZ,						"EN_KI_SOFTYX_SDFZ",					 0xAAAA,    EN_CPU0,    0,      0,      286,        "失电分闸动作",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
    {EN_KI_SOFTYX_L2GLIC_ALARM_01,"EN_KI_SOFTYX_L2GLIC_ALARM_01",0xAAAA,    EN_CPU0,    0,      0,      287,        "备用",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
    {EN_KI_SOFTYX_L2GL_ALARM_01,  "EN_KI_SOFTYX_L2GL_ALARM_01",  0xAAAA,    EN_CPU0,    0,      0,      288,        "过流Ⅱ段告警",             DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
    {EN_KI_SOFTYX_L2GL_TRIP_01,   "EN_KI_SOFTYX_L2GL_TRIP_01",   0xAAAA,    EN_CPU0,    0,      0,      289,        "过流Ⅱ段跳闸",             DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
    {EN_KI_SOFTYX_L3GLIA_ALARM_01,"EN_KI_SOFTYX_L3GLIA_ALARM_01",0xAAAA,    EN_CPU0,    0,      0,      290,        "备用",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
    {EN_KI_SOFTYX_L3GLIB_ALARM_01,"EN_KI_SOFTYX_L3GLIB_ALARM_01",0xAAAA,    EN_CPU0,    0,      0,      291,        "备用",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
    {EN_KI_SOFTYX_L3GLIC_ALARM_01,"EN_KI_SOFTYX_L3GLIC_ALARM_01",0xAAAA,    EN_CPU0,    0,      0,      292,        "备用",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
    {EN_KI_SOFTYX_L3GL_ALARM_01,  "EN_KI_SOFTYX_L3GL_ALARM_01",  0xAAAA,    EN_CPU0,    0,      0,      293,        "过流Ⅲ段告警",             DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
    {EN_KI_SOFTYX_L3GL_TRIP_01,   "EN_KI_SOFTYX_L3GL_TRIP_01",   0xAAAA,    EN_CPU0,    0,      0,      294,        "过流Ⅲ段跳闸",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
	//=============================================	
    {EN_KI_SOFTYX_KGJH,       "EN_KI_SOFTYX_KGJH",      0xAAAA,         EN_CPU0,	0,      0,      295,    	"开关拒合",			DB0+DB1+DB2,    0,          0xAAAA,     "SYX082"},
    {EN_KI_SOFTYX_KGJF,       "EN_KI_SOFTYX_KGJF",      0xAAAA,         EN_CPU0,	0,      0,      296,    	"开关拒分",			DB0+DB1+DB2,    0,          0xAAAA,     "SYX083"},                                                                                                                	
		{EN_KI_SOFTYX_AdjEnd,			"EN_KI_SOFTYX_AdjEnd",		0xAAAA, 				EN_CPU0,	0,			0,			297,			"校准结束软遥信",			DB0+DB1+DB2,	0,				0xAAAA, 	"SYX087"},														

    {EN_KI_SOFTYX_UYSX,       "EN_KI_SOFTYX_UYSX",      0xAAAA,         EN_CPU0,	0,      0,      298,    	"线路电压越上限",			DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX081"},
    {EN_KI_SOFTYX_UYXX,       "EN_KI_SOFTYX_UYXX",      0xAAAA,         EN_CPU0,	0,      0,      299,    	"线路电压越下限",			DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX084"},    
    {EN_KI_SOFTYX_IYSX,       "EN_KI_SOFTYX_IYSX",      0xAAAA,         EN_CPU0,	0,      0,      300,    	"线路负荷越上限",			DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX093"},
	{EN_KI_SOFTYX_LackFr_ALARM,"EN_KI_SOFTYX_LackFr_ALARM", 	0xAAAA,         EN_CPU0,	0,      0,      314,    	"低频告警",			DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},                                                                             	                        	                        	 
	{EN_KI_SOFTYX_LackFr_TRIP,"EN_KI_SOFTYX_LackFr_TRIP", 		0xAAAA,         EN_CPU0,	0,      0,      315,    	"低频跳闸",			DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},                                                                             	                        	                        	 
	{EN_KI_SOFTYX_OverFr_ALARM,"EN_KI_SOFTYX_OverFr_ALARM", 	0xAAAA,         EN_CPU0,	0,      0,      316,    	"高频告警",			DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},                                                                             	                        	                        	 
	{EN_KI_SOFTYX_OverFr_TRIP,"EN_KI_SOFTYX_OverFr_TRIP",	    0xAAAA, 		EN_CPU0,	0,		0,		317,		"高频跳闸", 		DB0+DB1+DB2+DB3,	0,			0xAAAA, 	"SYX099"},																																		 

	{EN_KI_SOFTYX_OverI0_ALARM, "EN_KI_SOFTYX_OverI0_ALARM",            0xAAAA,         EN_CPU0,	0,      0,   318,	"接地告警",							DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
  {EN_KI_SOFTYX_OverI0_TRIP,  "EN_KI_SOFTYX_OverI0_TRIP",            0xAAAA,         EN_CPU0,	0,      0,   319,	"接地跳闸",							DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},

	{EN_KI_SOFTYX_GFH_ALARM_01, "EN_KI_SOFTYX_GFH_ALARM_01",            0xAAAA,         EN_CPU0,	0,      0,   320,	"过负荷告警",							DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
  {EN_KI_SOFTYX_GFH_TRIP_01,  "EN_KI_SOFTYX_GFH_TRIP_01",            0xAAAA,         EN_CPU0,	0,      0,   321,	"过负荷跳闸",							DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
  {EN_KI_SOFTYX_GFH_ALARM_02, "EN_KI_SOFTYX_GFH_ALARM_02",            0xAAAA,         EN_CPU0,	0,      0,   322,	"重载告警",							DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
  {EN_KI_SOFTYX_GFH_TRIP_02,  "EN_KI_SOFTYX_GFH_TRIP_02",            0xAAAA,         EN_CPU0,	0,      0,   323,	"重载跳闸",							DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
	{EN_KI_SOFTYX_GFH_ALARM_03, "EN_KI_SOFTYX_GFH_ALARM_03",            0xAAAA,         EN_CPU0,	0,      0,   324,	"过载告警",							DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
  {EN_KI_SOFTYX_GFH_TRIP_03,  "EN_KI_SOFTYX_GFH_TRIP_03",            0xAAAA,         EN_CPU0,	0,      0,   325,	"过载跳闸",							DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
	
	{EN_KI_SOFTYX_Speed_TRIP,  "EN_KI_SOFTYX_Speed_TRIP",            0xAAAA,         EN_CPU0,	0,      0,   326,	"过流后加速跳闸",							DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
	{EN_KI_SOFTYX_I0Speed_TRIP,  "EN_KI_SOFTYX_I0Speed_TRIP",            0xAAAA,         EN_CPU0,	0,      0,   327,	"零序后加速跳闸",							DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},

	{EN_KI_SOFTYX_CHZ_TRIP,  "EN_KI_SOFTYX_CHZ_TRIP",            0xAAAA,         EN_CPU0,	0,      0,   328,	"重合闸出口动作",							DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
	{EN_KI_SOFTYX_CchHVBS,  		"EN_KI_SOFTYX_CchHVBS", 	0xAAAA,         EN_CPU0,	0,      0,      	331,    	"负荷侧有压闭锁重合",				DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},                                                                             	                        	                        	 
	{EN_KI_SOFTYX_Bak05,  		"EN_KI_SOFTYX_Bak05", 	0xAAAA,         EN_CPU0,	0,      0,      	332,    	"交流失电告警",				DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},                                                                             	                        	                        	 
	{EN_KI_SOFTYX_Bak06,  		"EN_KI_SOFTYX_Bak06", 	0xAAAA,         EN_CPU0,	0,      0,      	333,    	"开关遥控软压板",			DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},                                                                             	                        	                        	 
  // 重合闸
  {EN_KI_SOFTYX_RCLS,         "EN_KI_SOFTYX_RCLS",               0xAAAA,         EN_CPU0,	0,      0,   334,	"重合闸动作",			      			DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},   
  {EN_KI_SOFTYX_CHJS,         "EN_KI_SOFTYX_CHJS",               0xAAAA,         EN_CPU0,	0,      0,   335,	"重合闸后加速动作",						DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
  
	{EN_KI_SOFTYX_CHZChgOver,  	"EN_KI_SOFTYX_CHZChgOver", 	    	 0xAAAA,         EN_CPU0,	0,      0,   340, "重合闸充电好",								DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
  {EN_KI_SOFTYX_CHZACT1,  		"EN_KI_SOFTYX_CHZACT1", 	    		 0xAAAA,         EN_CPU0,	0,      0,   341, "一次重合闸动作",							DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
  {EN_KI_SOFTYX_CHZACT2,  		"EN_KI_SOFTYX_CHZACT2", 	    		 0xAAAA,         EN_CPU0,	0,      0,   342, "二次重合闸动作",							DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
	{EN_KI_SOFTYX_CHZACT3,  		"EN_KI_SOFTYX_CHZACT3", 	    		 0xAAAA,         EN_CPU0,	0,      0,   343, "三次重合闸动作",							DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
  {EN_KI_SOFTYX_CHBS,         "EN_KI_SOFTYX_CHBS",               0xAAAA,         EN_CPU0,	0,      0,   344,	"重合闸闭锁",									DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
  {EN_KI_SOFTYX_SPED,         "EN_KI_SOFTYX_SPED",               0xAAAA,         EN_CPU0,	0,      0,   345,	"大电流闭锁重合闸",			     	DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
  {EN_KI_SOFTYX_FDMS,         "EN_KI_SOFTYX_FDMS",               0xAAAA,         EN_CPU0,	0,      0,   346,	"常规馈线分段模式",						DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
  {EN_KI_SOFTYX_LLMS,         "EN_KI_SOFTYX_LLMS",               0xAAAA,         EN_CPU0,	0,      0,   347,	"常规馈线联络模式",						DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
	{EN_KI_SOFTYX_JDXH,  				"EN_KI_SOFTYX_JDXH", 	    		 		 0xAAAA,         EN_CPU0,	0,      0,   348, "就地信号软遥信",							DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
  {EN_KI_SOFTYX_JDGZ,         "EN_KI_SOFTYX_JDGZ",               0xAAAA,         EN_CPU0,	0,      0,   349,	"线路接地故障",			      		DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},
  {EN_KI_SOFTYX_DLGZ,         "EN_KI_SOFTYX_DLGZ",               0xAAAA,         EN_CPU0,	0,      0,   350,	"线路短路故障",			      		DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},

  {EN_KI_SOFTYX_L1GLIA_TRIP_01,"EN_KI_SOFTYX_L1GLIA_ALARM_01",0xAAAA,    EN_CPU0,    0,      0,      351,        "A相过流Ⅰ段",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
  {EN_KI_SOFTYX_L1GLIB_TRIP_01,"EN_KI_SOFTYX_L1GLIB_ALARM_01",0xAAAA,    EN_CPU0,    0,      0,      352,        "B相过流Ⅰ段",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
  {EN_KI_SOFTYX_L1GLIC_TRIP_01,"EN_KI_SOFTYX_L1GLIC_ALARM_01",0xAAAA,    EN_CPU0,    0,      0,      353,        "C相过流Ⅰ段",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
  {EN_KI_SOFTYX_L2GLIA_TRIP_01,"EN_KI_SOFTYX_L2GLIA_ALARM_01",0xAAAA,    EN_CPU0,    0,      0,      354,        "A相过流Ⅱ段",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
  {EN_KI_SOFTYX_L2GLIB_TRIP_01,"EN_KI_SOFTYX_L2GLIB_ALARM_01",0xAAAA,    EN_CPU0,    0,      0,      355,        "B相过流Ⅱ段",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
  {EN_KI_SOFTYX_L2GLIC_TRIP_01,"EN_KI_SOFTYX_L2GLIC_ALARM_01",0xAAAA,    EN_CPU0,    0,      0,      356,        "C相过流Ⅱ段",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
  {EN_KI_SOFTYX_L3GLIA_TRIP_01,"EN_KI_SOFTYX_L3GLIA_ALARM_01",0xAAAA,    EN_CPU0,    0,      0,      357,        "A相过流Ⅲ段",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
  {EN_KI_SOFTYX_L3GLIB_TRIP_01,"EN_KI_SOFTYX_L3GLIB_ALARM_01",0xAAAA,    EN_CPU0,    0,      0,      358,        "B相过流Ⅲ段",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          
  {EN_KI_SOFTYX_L3GLIC_TRIP_01,"EN_KI_SOFTYX_L3GLIC_ALARM_01",0xAAAA,    EN_CPU0,    0,      0,      359,        "C相过流Ⅲ段",           DB0+DB1+DB2+DB3,    0,          0xAAAA,     "SYX099"},          

//============================================   
//预留软遥信 5个                                  
//=============================================    
    {EN_KI_TWIN_YX_01_0,        "EN_KI_TWIN_YX_01_0",       0xAAAA,         EN_CPU0,	0,      0,      385,    	"双点遥信常开   ",			DB0+DB1+DB2,    0,          0xAAAA,     "SYX097"},
    {EN_KI_TWIN_YX_01_1,        "EN_KI_TWIN_YX_01_1",       0xAAAA,         EN_CPU0,	0,      0,      386,    	"双点遥信常闭   ",			DB0+DB1+DB2,    0,          0xAAAA,     "SYX098"},
    	
////==============================================                                  	                        	               				
//// 双点遥信开入通道                                                               	                        	               				
////==============================================                                  	                        	               				
    {EN_KI_TWIN_YX_01,      	"EN_KI_TWIN_YX_01",         0xAAAA,     	EN_CPU0,	0,      0,      387,    	"双点01",  				DB0+DB1+DB2+DB3,    0,          0xAAAA,     "TYX01" },
    {EN_KI_TWIN_YX_02,      	"EN_KI_TWIN_YX_02",         0xAAAA,     	EN_CPU0,	0,      0,      388,    	"双点02",  				DB0+DB1+DB2+DB3,    0,          0xAAAA,     "TYX02" },    	                                        	        	                        	               				
    {EN_KI_TWIN_YX_03,      	"EN_KI_TWIN_YX_03",         0xAAAA,     	EN_CPU0,	0,      0,      389,    	"双点03",  				DB0+DB1+DB2+DB3,    0,          0xAAAA,     "TYX03" },
    {EN_KI_TWIN_YX_04,      	"EN_KI_TWIN_YX_04",         0xAAAA,     	EN_CPU0,	0,      0,      390,    	"双点04",  				DB0+DB1+DB2+DB3,    0,          0xAAAA,     "TYX04" },


                                                                            	                        	                        	
////==============================================                                  	                        	                        	
//// 整形遥信(INT8U)通道                                                            	                        	                        	
////==============================================                                  	                        	                        	
    {EN_KI_INT8U_SBTYS_01,  	"EN_KI_INT8U_SBTYS_01",     0xAAAA,     	  EN_CPU0,	0,      0,        403,    	"设备态遥设01",				0,    				0,          0xAAAA,     "IYX01" },
    
};


#endif