



#ifndef _MANU_STR_H_
#define _MANU_STR_H_

#define  SYS_PARSET_NUM       15
#define MENU_MANU_NUM         8
#define MENU_SRATIC_NUM       4
#define MENU_REPORT_NUM       5
#define MENU_SYSMIANTEN_NUM   2
#define MENU_RealTimeData_NUM 4
#define MENU_CTRLPROTE_NUM    30
#define MENU_PARAM_DEVICE_NUM 3  // 设备参数
#define MENU_PARAM_FIXVAL_NUM 14 // 定值参数
#define MENU_STUINFO_NUM      9
#define MENU_MAINTENSET_NUM   7
#define MENU_DATETIME_NUM     6


#define SUBMENU_SYSTEM_NUM      5
#define SUBMENU_COMMUN_NUM      12
#define SUBMENU_DEVPAR_NUM      28
#define SUBMENU_PROVAL_NUM      46
#define SUBMENU_PROVALL_PAGE    16//保护页总数
#define SUBMENU_PROI_NUM        5
#define SUBMENU_PROI0_NUM       4
#define SUBMENU_RECLOSE_NUM     3
#define SUBMENU_AFOVI_NUM       7
#define SUBMENU_NONINTERR       3
#define SUBMENU_SURAGE_NUM      4
#define SUBMENU_OVLOAD_NUM      4
#define SUBMENU_LOWVOLT_NUM     4
#define SUBMENU_OVVOLT_NUM      4
#define SUBMENU_VOLT0_NUM       4
#define SUBMENU_INVI_NUM        5
#define SUBMENU_INVI0_NUM       5

#define SUBMENU_DRISTRI_NUM        18
#define SUBMENU_CENTRA_PAGE        10
#define SUBMENU_CENTRAPROI_NUM     4
#define SUBMENU_CENTRAPROI0_NUM    4
#define SUBMENU_CENTRAOVLOAD_NUM   4
#define SUBMENU_CENTRALOWVOL_NUM   4
#define SUBMENU_CENTRAOVVOL_NUM    4
#define SUBMENU_CENTRAZEROVOL_NUM  4

#define SUBMENU_NONELE_NUM         12
#define SUBMENU_PROPRE_NUM         14
#define SUBMENU_SYNCHC_NUM          4
#define SUBMENU_AUTOSP_NUM          23
#define SUBMENU_AUTORECLOSE_NUM     13
#define SUBMENU_TELEMET_ALARM_NUM   22
#define SUBMENU_WIRE_ALARM_NUN      7

#define SUBMENU_LITCURR_GROIND_NUM  8
#define SUBMENU_CTRL_LOOPBROKEN_NUM 2
#define SUBMENU_SW_NOACT_NUM        2
#define SUBMENU_AUTO_RESET_NUM      2
#define SUBMENU_FAULT_RECODE_NUM    13
#define SUBMENU_SWCTRL_NUM          4

#define SUBMENU_TELEMET_NUM         58
#define SUBMENU_TELESIGMAL_NUM      31
#define SUBMENU_REMOTCRTL_NUM       9
#define SUBMENU_SERIAL_NUM          18

#define MAINPAGE_TELEMET_NUM     23
#define SUBMENU_COMSTATUTE_NUM   21
#define SUBMENU_IP_NUM           4

#define PASSWORD_PARSET    1
#define PASSWORD_CTRL      0
#define PASSWORD_SETSYS    1

typedef struct
{
    unsigned char num;
     char name[60];
}Para_OPTTypname;

typedef struct
{
    unsigned char name;
    const char *opt;
    const char *Company;
    unsigned int value;
    unsigned int max;
    unsigned int min;
    unsigned char point;
    unsigned char numeric_opt;
}Para_OPTTypeDef; 

typedef struct
{
    unsigned char name;
    const char *opt;
    const char *Company;
    unsigned char point;
    float  valu;
}REAL_OPTTypeDef;

typedef struct
{
    unsigned char num;
    //signed char name[50];
    const char *name;
    const char *sta;
    unsigned char valu;
    unsigned char optnum;
}YX_OPTTypeDef;


typedef struct
{
  unsigned char num;
  const char *opt[15];
}Non_NumericType;

typedef struct
{
  unsigned char num;
  const char *opt[15];
}Event_StuType;



typedef struct
{

   Para_OPTTypeDef *opt;
   unsigned char len;

}Provel_Page;
extern Provel_Page Edit_Provel_Page[SUBMENU_PROVALL_PAGE];
extern Provel_Page Edit_Centra_Page[SUBMENU_PROVALL_PAGE];

typedef enum
{
    OPT_SUBNON=0,
    OPT_LOGICAL    =1,// 逻辑于或
    OPT_OUTSTATE   =2,// 输出状态
    OPT_SWITCH     =3,
    OPT_INVEST     =4,//投入
    OPT_STARTUP    =5,
    OPT_RUNSTATE   =6,
    OPT_ERRSTATE   =7,
    OPT_SUBSECTION =8,
    OPT_CHECK      =9,
    OPT_WIRING     =10,
    OPT_BROKENWIRE =11,
    OPT_OUTRYPE    =12,
    OPT_CURVETYPE  =13,
    OPT_VOLTTYPE   =14,
    OPT_BAUDRATE   =15,
    OPT_PCALCU     =16,
    OPT_FATYPE     =17,
    OPT_LIAISON   =18,
    OPT_INVESTII  =19,
    OPT_YXSTA     =20,
    OPT_COMSTATUTE=21,//通信规约
    OPT_COMBUAD   =22,
    OPT_COMCHECKBIT=23,
    OPT_COMTYPE    =24,
    OPT_COMYCTYPE  =25,
    OPT_WORD       =26,
    OPT_MEASURE    =27,
    OPT_UINT       =28,
    OPT_TIME_HM    =29, // 时间格式：XhYm
    OPT_NUM,
}Numeric;

typedef enum   /* 1常规 2FA 3智能分布式 4集中式 */
{
    NO_CONFIG_mode,
    ROUTINE_Pro,//常规保护
    ROUTINE_Fa ,//常规FA

    DISTRIB_Pro,//智能分布式
    CENTRA_Pro, //集中式
    Pro_num
}SUBparnum;

typedef enum
{
    SUB_DEV_OPT = 0,      // 设备参数
    SUB_COM_OPT,          // 通信参数
    SUB_COMSTATUTE_OPT,   // 规约参数
} SUBSYSPARNUM_DEV;


typedef enum
{
    SUB_RTD_YX = 0,         // 遥信
    SUB_RTD_OYC,            // 一次遥测 
    SUB_RTD_SYC,            // 二次遥测
    SUB_RTD_YK              // 遥控
}SUB_RealTime_Data;

typedef enum
{
    SUB_prot_opt = 0,     // 常规FA
    SUB_recolse_opt,      // 重合闸
    SUB_notele_opt,       // 非电量参数
    SUB_SynchClose_opt,   // 同期合闸
    SUB_autospli_opt,     // 自动解列
    SUB_telemetalarm_opt, // 遥测越限
    SUB_wire_alarm_opt,   // 线路告警
    SUB_lcurrgrand_opt,   // 小电流接地
    SUB_ctrlloop_opt,     // 控制回路
    SUB_swaction_opt,     // 开关拒动
    SUB_autoreset_opt,    // 自动复归
    SUB_faultrecord_opt,  // 故障录波
    SUB_swctrl_opt,       // 传动开关
    SUB_softpress_opt,    // 软压板
} SUBSYSPARNUM_FIX;

typedef enum
{
    SUB_REPORTSOE=0,
    SUB_REPORTFALUT,
    SUB_REPORTREMOT,
    SUB_REPORTYT,
    SUB_REPORTSWA,
}SUBeventnum;



typedef struct
{
    unsigned char event_num;
    unsigned char stu;
    unsigned char year;
    unsigned char mon;
    unsigned char date;
    unsigned char hour;
    unsigned char min;
    unsigned char sec;
    unsigned short ms;
    const short  addr;
}EVENT_SOEType;
extern EVENT_SOEType Event_soe[10];
//=====================================================================
extern const char *sys_param_device[MENU_PARAM_DEVICE_NUM];
extern const char *sys_param_fixval[MENU_PARAM_FIXVAL_NUM];
extern REAL_OPTTypeDef Mainpage_opt[MAINPAGE_TELEMET_NUM];
extern Para_OPTTypeDef SYS_parset_opt[SUBMENU_SYSTEM_NUM];       //系统参数
extern Para_OPTTypeDef Device_parset_opt[SUBMENU_DEVPAR_NUM];    //设备参数
//=======================常规FA=================================================
extern Para_OPTTypeDef Routinefa_protset_opt[SUBMENU_PROVAL_NUM];

//======================常规保护===========================================
extern Para_OPTTypeDef Routine_protset_ovcurri1_opt[SUBMENU_PROI_NUM ];
extern Para_OPTTypeDef Routine_protset_ovcurri2_opt[SUBMENU_PROI_NUM ];
extern Para_OPTTypeDef Routine_protset_ovcurri3_opt[SUBMENU_PROI_NUM ];
extern Para_OPTTypeDef Routine_protset_ovcurri01_opt[SUBMENU_PROI0_NUM ];
extern Para_OPTTypeDef Routine_protset_ovcurri02_opt[SUBMENU_PROI0_NUM ];
extern Para_OPTTypeDef Routine_protset_ovcurri03_opt[SUBMENU_PROI0_NUM ];
extern Para_OPTTypeDef Routine_protset_reclosing_opt[SUBMENU_RECLOSE_NUM];
extern Para_OPTTypeDef Routine_protset_afovcurracce_opt[SUBMENU_AFOVI_NUM];
extern Para_OPTTypeDef Routine_protset_Noninterr_opt[SUBMENU_NONINTERR];
extern Para_OPTTypeDef Routine_protset_surge_opt[SUBMENU_SURAGE_NUM];
extern Para_OPTTypeDef Routine_protset_overload_opt[SUBMENU_OVLOAD_NUM];
extern Para_OPTTypeDef Routine_protset_lowvoltage_opt[SUBMENU_LOWVOLT_NUM];
extern Para_OPTTypeDef Routine_protset_ovvoltage_opt[SUBMENU_OVVOLT_NUM];
extern Para_OPTTypeDef Routine_protset_zero_seqvoltage_opt[SUBMENU_VOLT0_NUM];
extern Para_OPTTypeDef Routine_protset_invtvocurr_opt[SUBMENU_INVI_NUM];
extern Para_OPTTypeDef Routine_protset_invtzero_seqline_opt[SUBMENU_INVI0_NUM];
//===========================================================================
extern Para_OPTTypeDef  Intelligent_distri_opt[SUBMENU_DRISTRI_NUM];
//====================================================================
//========================集中式===============================================
extern Para_OPTTypeDef Centralized_ovcurri1_opt[SUBMENU_CENTRAPROI_NUM];
extern Para_OPTTypeDef Centralized_ovcurri2_opt[SUBMENU_CENTRAPROI_NUM];
extern Para_OPTTypeDef Centralized_ovcurri3_opt[SUBMENU_CENTRAPROI_NUM];
extern Para_OPTTypeDef Centralized_ovcurri01_opt[SUBMENU_CENTRAPROI0_NUM];
extern Para_OPTTypeDef Centralized_ovcurri02_opt[SUBMENU_CENTRAPROI0_NUM];
extern Para_OPTTypeDef Centralized_ovcurri03_opt[SUBMENU_CENTRAPROI0_NUM];
extern Para_OPTTypeDef Centralized_ovload_opt[SUBMENU_CENTRAOVLOAD_NUM];
extern Para_OPTTypeDef Centralized_lowvolt_opt[SUBMENU_CENTRALOWVOL_NUM];
extern Para_OPTTypeDef Centralized_ovvolt_opt[SUBMENU_CENTRAOVVOL_NUM];
extern Para_OPTTypeDef Centralized_zerovolt_opt[SUBMENU_CENTRAZEROVOL_NUM];
//===========================================================================
extern Para_OPTTypeDef Auto_reclose_opt[SUBMENU_AUTORECLOSE_NUM ];
extern Para_OPTTypeDef Non_electr_protset_opt[SUBMENU_NONELE_NUM];
extern Para_OPTTypname Non_electr_protset_opttemp[SUBMENU_NONELE_NUM];
extern Para_OPTTypeDef Synch_Closingset_opt[SUBMENU_SYNCHC_NUM];
extern Para_OPTTypeDef Automatic_splittingset_opt[SUBMENU_AUTOSP_NUM];
extern Para_OPTTypeDef Telemet_Alarm_opt[SUBMENU_TELEMET_ALARM_NUM];
extern Para_OPTTypeDef Wire_Alarm_opt[SUBMENU_WIRE_ALARM_NUN];
extern Para_OPTTypeDef LittleCurr_Grounding_opt[SUBMENU_LITCURR_GROIND_NUM ];
extern Para_OPTTypeDef Control_loop_broken_opt[SUBMENU_CTRL_LOOPBROKEN_NUM ];
extern Para_OPTTypeDef Switch_refused_act_opt[SUBMENU_SW_NOACT_NUM ];
extern Para_OPTTypeDef Auto_reset_opt[SUBMENU_AUTO_RESET_NUM];
extern Para_OPTTypeDef Fault_recorder_opt[SUBMENU_FAULT_RECODE_NUM];
extern Para_OPTTypeDef SW_ctrl_opt[SUBMENU_SWCTRL_NUM];
extern Para_OPTTypeDef ProtSoftset_opt[SUBMENU_PROPRE_NUM];
extern Para_OPTTypeDef  Serial_Statute_opt[SUBMENU_SERIAL_NUM];
extern Para_OPTTypeDef Statute_par_opt[SUBMENU_COMSTATUTE_NUM];
extern Para_OPTTypeDef iec_ip_port_1[SUBMENU_IP_NUM];
extern Para_OPTTypeDef iec_ip_gate_1[SUBMENU_IP_NUM];
extern Para_OPTTypeDef iec_ip_netmask_1[SUBMENU_IP_NUM];
extern Para_OPTTypeDef iec_ip_port_2[SUBMENU_IP_NUM];
extern Para_OPTTypeDef iec_ip_gate_2[SUBMENU_IP_NUM];
extern Para_OPTTypeDef iec_ip_netmask_2[SUBMENU_IP_NUM];

// extern Para_OPTTypeDef Remote_ctrl_opt[SUBMENU_REMOTCRTL_NUM];
extern Para_OPTTypeDef  Remote_RemoteParset_opt[1];

extern Para_OPTTypeDef Sys_stuinfo_opt[MENU_STUINFO_NUM];
extern Para_OPTTypeDef Password_opt[3];
extern Para_OPTTypeDef Sys_set_opt[MENU_MAINTENSET_NUM];
extern Para_OPTTypeDef DateAndTime_opt[MENU_DATETIME_NUM];
// 遥测遥信数组已移至data_real_time.h中声明

extern Para_OPTTypeDef DateCalibration_opt[1];
extern const  char *Report_disp[MENU_REPORT_NUM];
extern const  char *Sys_RealTimeData_disp[MENU_RealTimeData_NUM];
extern const  char *SYS_Subparset_manu[5];
extern const  char *Sys_maintian_disp[2];
extern const  char *AboutDevice_disp[6];

extern const  char *MainManu_dis[MENU_MANU_NUM];
extern const  char *Password_dis[][2];
extern const  char *Confirm_cancel_dis[][2];
extern const  char *SetVale_dis[][2];
extern Para_OPTTypeDef SYS_Parset_disp[2];
extern Non_NumericType  Non_Numeric[OPT_NUM];

//extern const char* Event_soe_opt[4];
extern const char* Event_scan_dis[2];
extern Event_StuType Event_Stu[5];
extern REAL_OPTTypeDef  Mainpage_optdev[3];
extern const char *Disp_path_opt[2];
extern  const  char *Confirmsave_cancel_dis[][2];

#endif

