📄 hl_od_defs.h
字号:
#ifndef HL_OD_DEFS_H
#define HL_OD_DEFS_H
#include "HL_Type.h"
#define HL_MAX_DESC_LEN 20
#define HL_MAX_ELEMENT 18
#define HL_OD_DESCRIPTION 1
#define HL_PRIMARY_OD 2
#define HL_PRIMARY_STRUCT_OD 3
#define HL_SIMPLE_OD 4
#define HL_ARRAY_OD 5
#define HL_STRUCT_OD 6
#define HL_RO_ACCESS 1
#define HL_RW_ACCESS 2
#define HL_WO_ACCESS 3
#define HL_DT_BOOL 1
#define HL_DT_BCD 2
#define HL_DT_INTEGER_8 3
#define HL_DT_INTEGER_16 4
#define HL_DT_BIT_STRING 16
#define HL_DT_VIS_STRING 17
#define HL_UT_VOLTAGE 32
#define HL_UT_KILOVOLT 33
#define HL_UT_AMPERE 34
#define HL_UT_KILOWATT 35
#define HL_UT_KW_HOUR 36
#define HL_UT_KILOVAR 37
#define HL_UT_KVAR_HOUR 38
#define HL_UT_P_KWH 39
#define HL_UT_P_KVARH 40
#define HL_UT_YEAR 41
#define HL_UT_MONTH 42
#define HL_UT_DAY 43
#define HL_UT_WEEK 44
#define HL_UT_HOUR 45
#define HL_UT_MINUTE 46
#define HL_UT_SECOND 47
#define HL_UT_MILLI_SCND 48
#define HL_DT_TIME_SHORT 128
#define HL_DT_TIME_VALUE 129
#define HL_DT_TIME_LONG 130
#define LENGTH_OF_PRIMARY_OD 26
#define OD_DIRECTRY_INDEX 256
#define NUMBER_OF_OD_LIST 1
#define FIRST_OD_INDEX 1000
#define FIRST_OD_LENGTH 2
typedef struct
{
USIGN16 uiIndex;
VisString cOD_Version[4];
VisString cManufacture_Name[6];
VisString cModule_Number[11]; /* 模块手机号码 */
BOOL bEncrypt_Enable;
USIGN16 uiPrimary_OD_Length;
USIGN16 uiOD_Directry_Index;
} OD_Description;
typedef struct
{
USIGN16 uiIndex;
// USIGN8 ucOD_Type;
USIGN8 ucDesc_Length;
VisString cDescription[HL_MAX_DESC_LEN];
} Primary_OD;
typedef struct
{
USIGN8 ucElement_Type;
USIGN8 ucElement_Unit;
USIGN8 ucElement_Length;
USIGN8 ucDecimal_Point;
USIGN8 ucAccess;
} Element_OD;
typedef struct
{
USIGN16 uiIndex;
// USIGN8 ucOD_Type;
USIGN8 ucElement_Number;
Element_OD sElement_Desc[HL_MAX_ELEMENT];
} Primary_Struct_OD;
typedef struct
{
USIGN16 uiIndex;
USIGN16 uiCode_ID;
// USIGN8 ucOD_Type;
USIGN8 ucData_Type;
USIGN8 ucUnit;
USIGN8 ucLength;
USIGN8 ucDecimal_Point;
USIGN8 ucAccess;
void * pvLocal_Address;
} Simple_OD;
typedef struct
{
USIGN16 uiIndex;
USIGN16 uiCode_ID;
// USIGN8 ucOD_Type;
USIGN8 ucElement_Type;
USIGN8 ucElement_Unit;
USIGN8 ucElement_Number;
USIGN8 ucElement_Length;
USIGN8 ucDecimal_Point;
USIGN8 ucAccess;
void * pvLocal_Address;
} Array_OD;
typedef struct
{
USIGN16 uiIndex;
USIGN16 uiCode_ID;
// USIGN8 ucOD_Type;
USIGN8 ucElement_Number;
void * pvLocal_Address;
Element_OD sElement_Desc[HL_MAX_ELEMENT];
} Struct_OD;
typedef struct
{
USIGN8 ucOD_Type;
USIGN16 uiOD_Index;
void rom * pvLocal_Address;
} OD_Entry;
typedef struct
{
USIGN8 ucOD_Type;
union
{
OD_Description sOD_Description;
Primary_OD sPrimary_OD;
Primary_Struct_OD sPrimary_Struct_OD;
Simple_OD sSimple_OD;
Array_OD sArray_OD;
Struct_OD sStruct_OD;
} sOD_Entry;
} OD_Info;
typedef struct
{
USIGN8 ucGet_OD_Type;
union
{
USIGN16 uiOD_Index;
USIGN16 uiCode_ID;
} sOD_Class;
} Get_OD_Type;
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -