📄 pro_defs.h
字号:
/************************************************************************/
/* */
/* FILE NAME VERSION */
/* */
/* PRO_defs.h PLUS 1.0 */
/* */
/* COMPONENT */
/* */
/* PRO - protect structure */
/* */
/* DESCRIPTION */
/* */
/* This file contains data structure definitions and constants for */
/* the protect structure ,setting structure value structure */
/* SOE structure. */
/* */
/* AUTHOR */
/* */
/* xianganzh */
/* */
/* DATA STRUCTURES */
/* */
/* None */
/* */
/* FUNCTIONS */
/* */
/* None */
/* */
/* DEPENDENCIES */
/* */
/* None */
/* */
/* HISTORY */
/* */
/* NAME DATE REMARKS */
/* */
/* zxa 04-20-2001 Created initial version 1.0 */
/* */
/************************************************************************/
#include "nucleus.h"
#ifndef PRO_DEFS
#define PRO_DEFS
#define PRO_SETS_MAX_NUMBER 64
#define PRO_STARTUP_MAX_NUMBER 32
#define PRO_PICKUP_MAX_NUMBER 32
#define PRO_RESET_MAX_NUMBER 32
#define PRO_ANALOG_MAX_NUMBER 32
#define PRO_RUNDATA_MAX_NUMBER 32
#define SET_MAX_NAME 32
#define SET_MAX_DIMENSION 8
#define SET_MAX_ZONE 64
#define VALUE_MAX_NAME 32
#define VALUE_MAX_NUMBER 64
#define SOE_MAX_NAME 32
#define SOE_MAX_NUMBER 7
#define maxnum 10
/* Define setting block data structure. */
typedef struct SETTING_STRUCT
{
/* Standard protect struct information. Changes made
to this area of the structure can have undesirable side effects. */
UNSIGNED pro_id; /* Protect ID */
UNSIGNED set_id; /* setting ID */
CHAR *pset_name; /* setting name */
char *pset_dimension; /* setting dimension */
float set_lower_limit; /* setting lower limit */
float set_high_limit; /* setting high limit */
INT protect_address; /* setting subscript of protect */
INT setting_address; /* setting subscript */
UNSIGNED set_zone_number; /* setting zone number */
UNSIGNED set_reserve0; /* setting receive word1 */
UNSIGNED set_reserve1; /* setting receive word2 */
UNSIGNED set_reserve2; /* setting receive word3 */
UNSIGNED set_reserve3; /* setting receive word4 */
}SETTING;
/*Define setting zone point*/
/*INT * setting_zone_num[10]; */
/* a value block standard data struct.(for setting value,run data ......) */
typedef struct VALUE_STRUCT
{
/* Standard protect struct information. Changes made
to this area of the structure can have undesirable side effects. */
CHAR value_name[VALUE_MAX_NAME]; /* value name */
UNSIGNED value_index_number; /* value index number (0--64) */
INT value_calculate_style; /* value calculate style */
CHAR value_dimension; /* valueg dimension */
float value_calculate_coefficient; /* value calculate coefficient */
float value_measure; /* value */
UNSIGNED value_reserve0; /* value receive word1 */
UNSIGNED value_reserve1; /* value receive word2 */
UNSIGNED value_reserve2; /* value receive word3 */
UNSIGNED value_reserve3; /* value receive word4 */
}VALUE;
/* Define the SOE(sequence of evet)structure. */
typedef struct SOE_STRUCT
{
/* Standard SOE struct information. Changes made
to this area of the structure can have undesirable side effects. */
CHAR *SOE_name; /* SOE name */
UNSIGNED SOE_number[SOE_MAX_NUMBER]; /* SOE number */
UNSIGNED SOE_reserve0; /* SOE receive word1 */
UNSIGNED SOE_reserve1; /* SOE receive word2 */
}SOE;
/* define the protect control block data structure. */
typedef struct PROTECT_STRUCT
{
/* Standard protect struct information. Changes made
to this area of the structure can have undesirable side effects. */
struct PROTECT_STRUCT
*pro_link_next, /* Protect linked list point next */
*pro_link_previous; /* Protect linked list point previous */
UNSIGNED pro_id; /* Protect ID */
CHAR *ppro_device_name; /* Pointer to protect device name */
CHAR *ppro_name; /* Pointer to Protect name */
INT protect_address; /* setting subscript of protect */
DATA_ELEMENT pro_config; /* Protect config(active or sleep) */
DATA_ELEMENT pro_signal_jumper; /* Protect status(puton or putoff) */
DATA_ELEMENT pro_trip_jumper; /* Protect jumper(connect or disconnect)*/
float pro_version; /* Protect version number */
UNSIGNED pro_analog_channel[PRO_ANALOG_MAX_NUMBER];/* protect analog channel */
UNSIGNED pro_trip; /* protect trip bits */
UNSIGNED pro_signal; /* protect signal bits */
UNSIGNED pro_setting_number; /* protect actual setting number */
UNSIGNED set_zone_number; /* setting zone number */
SETTING pro_setting[PRO_SETS_MAX_NUMBER];/* settings contents */
INT pro_startup_flag; /* protect startup flag */
SOE pro_startup_soe; /* protect startup head struct */
UNSIGNED pro_startup_data_number; /* protect startup data struct number */
VALUE pro_startup_data[PRO_STARTUP_MAX_NUMBER];/* protect startup data struct */
INT pro_pickup_flag; /* protect pickup flag */
SOE pro_pickup_soe; /* protect pickup head struct */
UNSIGNED pro_pickup_data_number; /* protect pickup data struct number */
VALUE pro_pickup_data[PRO_PICKUP_MAX_NUMBER];/* protect pickup data struct */
INT pro_reset_flag; /* protect reset flag */
SOE pro_reset_soe; /* protect reset head struct */
UNSIGNED pro_reset_data_number; /* protect reset data struct number */
VALUE pro_reset_data[PRO_RESET_MAX_NUMBER];/* protect reset data struct */
UNSIGNED pro_run_data_number; /* protect run data struct number */
VALUE pro_run_data[PRO_RUNDATA_MAX_NUMBER];/* protect run data struct */
VOID (*pro_routine_handler)(struct PROTECT_STRUCT *);/* protect routine function */
UNSIGNED pro_reserve0; /* protect receive word1 */
UNSIGNED pro_reserve1; /* protect receive word2 */
UNSIGNED pro_reserve2; /* protect receive word3 */
UNSIGNED pro_reserve3; /* protect receive word4 */
UNSIGNED pro_reserve4; /* protect receive word5 */
UNSIGNED pro_reserve5; /* protect receive word6 */
UNSIGNED pro_reserve6; /* protect receive word7 */
UNSIGNED pro_reserve7; /* protect receive word8 */
} PROTECT;
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -