⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pro_defs.h

📁 电力系统中的保护装置全部代码
💻 H
字号:

/************************************************************************/
/* Copyight (C) 2001-2003           保护及自动化事业部基础部            */
/*                                                                      */
/* All right reserved                                                   */
/*                                                                      */
/* FILE NAME                                                            */
/*                                                                      */
/*      PRO_defs.h                                                      */
/*                                                                      */
/* 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.                  < Xianganzh@371.net>                */
/*                                                                      */
/* DATA STRUCTURES                                                      */
/*                                                                      */
/*      None                                                            */
/*                                                                      */
/* FUNCTIONS                                                            */
/*                                                                      */
/*      None                                                            */
/*                                                                      */
/* DEPENDENCIES                                                         */
/*                                                                      */
/*      None                                                            */
/*                                                                      */
/* HISTORY                                                              */
/*                                                                      */
/*      NAME            DATE                    REMARKS                 */
/*                                                                      */
/*      Xianganzh.      04-20-2001      Created initial version 1.0     */
/*      Xianganzh.      03-20-2002      Created initial version 2.0     */
/*                                                                      */
/*                                                                      */
/************************************************************************/
#ifndef           PRO_DEFS
#define           PRO_DEFS
#define                 PRO_DEVICE_NAME         10                // device name length
#define         PRO_PRO_NAME            20                  // protect name length
#define                 PRO_ANALOG_NUMBER       32                // protect analog channel number

#define         SET_NAME                        20                // set name length
#define                 SET_ZONE                      8                 // set zone number
#define         VALUE_NAME                      20                // value name length
#define         SOE_NAME                        20                // soe name length
#define           JUMPER_NAME             20                // jumper name length
#define         RELEASE_VALUE             0.9         // release Value
#define         RESTRAIN_VALUE                  1.1               // restrain Value

#define         MMIPICKUP                       0x1
#define         MMIDISPLAY                      0x2
#define         MMISAVE                         0x4

extern UNSIGNED   TMD_System_Clock;
extern INT  Sample_Flag;
extern INT  MainSample_Flag;
extern UNSIGNED ChannelDataAddr[];
extern UNSIGNED BIOS_protect_pickup_bit;
extern INT  BIOS_protect_startup_flag;

/* 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;                                     // Pointer to setting name
    CHAR        set_name[SET_NAME];                         // setting name
      INT               set_calculate_style;                      // setting calculate style
      CHAR        *pset_dimension;                          // setting dimension
      CHAR        *pset_alias;                                    // setting alias
      CHAR        set_type;                                       // setting type
      float       set_calculate_coefficient;                // setting calculate coefficient
      float       set_lower_limit;                          // setting lower limit
      float       set_high_limit;                           // setting high limit
      float       set_value_zone[SET_ZONE];                 // setting value zone
}SETTING;

/* Define jumper block data structure. */

typedef struct JUMPER_STRUCT
{
/*    Standard protect struct information.   Changes made
      to this area of the structure can have undesirable side effects. */

      UNSIGNED    pro_id;                                   // Protect ID
      UNSIGNED    jum_id;                                   // jumper ID
      UNSIGNED    jum_inf;                                  // jumper inf
      UNSIGNED    jum_ctrl;
      CHAR        *pjum_name;                                     // Pointer to jumper name
    CHAR        jum_name[JUMPER_NAME];                      // jumper name
      CHAR        *pjum_alias;                                    // setting alias
      INT               jum_status;                                     // jumper status
}JUMPER;

/* 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        *pvalue_name;                                   // pointer to value name
      CHAR        value_name[VALUE_NAME];                   // value name
      CHAR        *pvalue_alias;                                  // value alias
      UNSIGNED    value_index_number;                             // value index number
      INT               value_calculate_style;                    // value calculate style
      CHAR        *pvalue_dimension;                              // pointer to value dimension
      float       value_calculate_coefficient;        // value calculate coefficient
      float       value_measure;                                  // value
      float       value_real;                                     // value real
      float       value_imaginary;                          // value imaginary
}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        *pSOE_name;                                     // pointer to SOE name
      CHAR        SOE_name[SOE_NAME];                       // SOE name
      UNSIGNED    SOE_Inf;                                        // SOE INF
      UNSIGNED    DPI;                                            // DIP = 1 return; 2 = operate
      UNSIGNED    Relative_Time;                            // fault hold Time (fault_start -- fault_end time)
      UNSIGNED    Fault_Number;                                   // fault count
    UNSIGNED    Year;                                       // year
    UNSIGNED    Month;                                      // month
    UNSIGNED    Day;                                              // day
      UNSIGNED    Hour;                                           // hour
    UNSIGNED    Minute;                                     // minute
    UNSIGNED    Millionsecond;                              // Millionsecond
      UNSIGNED    SIN;                                // return use(IEC103)
}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        init_flag;                                        // initial flag
      UNSIGNED        pro_id;                                           // Protect ID
    CHAR                *ppro_device_name;                                          // Pointer to protect device name
    CHAR          pro_device_name[PRO_DEVICE_NAME];               // protect device name
    CHAR                *ppro_name;                                                 // Pointer to Protect name
    CHAR                pro_name[PRO_PRO_NAME];                               // Protect name
    CHAR                pro_config;                                           // Protect config(active or sleep)
    UNSIGNED            pro_analog_channel[PRO_ANALOG_NUMBER];          // protect analog channel
    UNSIGNED            pro_signal;                                                 // protect signal bits
    UNSIGNED            pro_trip;                                                   // protect trip bits
    UNSIGNED      pro_setting_number;                                   // protect actual setting number
    SETTING             *pro_setting;                                               // protect settings contents address
      UNSIGNED          pro_jumper_number;                                          // protect actual jumper number
    JUMPER              *pro_jumper;                                                // protect jumper contents address
    UNSIGNED            pro_run_data_number;                                  // protect run data struct number
    VALUE               *pro_run_data;                                              // protect run data struct
      INT                     pro_startup_flag;                                     // protect startup flag
    INT                       pro_pickup_flag;                                      // protect pickup flag
    INT                       pro_reset_flag;                                             // protect reset flag
    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;





/* define the protect report control block data structure.  */
typedef struct PROTECT_REPORT
{
/*    Standard protect report struct information. Changes made
      to this area of the structure can have undesirable side effects. */
      INT         pro_report_flag;                                      // report fill flag      0 = empty; 1 = full
      SOE         pro_report_soe;                                             // report soe
      UNSIGNED    pro_report_data_number;                               // report data number
      VALUE       *pro_report_data;                                     // report data
      UNSIGNED    pro_channel_number;                                         // report channel number
      UNSIGNED    mmi_flag;
}REPORT;



/* time struct */

typedef struct TIME_STRUCT
{
      UNSIGNED    Year;                                                       // year
      UNSIGNED    Month;                                                        // month
      UNSIGNED    Day;                                                        // day
      UNSIGNED    Hour;                                                       // hour
      UNSIGNED    Minute;                                                     // minute
      UNSIGNED    Millionsecond;                                        // millionsecond
}TIME;
#endif






 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -