📄 gconfig.h
字号:
/*#########################################################################
gconfig.h - definitions/declarations of gather configuation.
Copyright (c) 2005-2006, RICHISLAND All rights reserved.
Purpose :
Version :1.00
Author :
Complete Date :
Function List :
History :
_________________________________________________________________________
DATE AUTHOR VERSION DESCRIBE
-------------------------------------------------------------------------
2006-06-30 Ver1.00 Create
#########################################################################*/
#ifndef __F_GCONFIG_H__
#define __F_GCONFIG_H__
#include "stadx.h"
#include <stdio.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "gcontrol.h"
#include "fprint.h"
#ifdef __cplusplus
extern "C" {
#endif
#define MAX_OUTTAG_INDEX OUTTAG_MAX_NUM
#define MAX_TAG_INDEX TAG_MAX_NUM
#define MAX_GRP_INDEX GRP_MAX_NUM
#define MAX_EQUIP_INDEX EQUIP_MAX_NUM
typedef struct tag_GConfigFile
{
REGINT fd;
REGINT size;
}GConfigFile;
typedef struct tag_DIUCONFIG
{
/* bah */
UINT32 u32BAH;
/* dgc unit NO. */
UINT32 DIU_NO;
/* dgc unit Name */
BYTE DIU_NAME[20];
/* remote communication address */
BYTE bRemote_IP[4];
/* number of output tags */
UINT16 u16OutTagNum;
/* offset of output tag description table */
UINT32 u32OutTagTableOffset;
/* number of tags */
UINT16 u16TagNum;
/* offset of tag description table */
UINT32 u32TagTableOffset;
/* number of groups */
UINT16 u16GroupNum;
/* offset of group description table */
UINT32 u32GroupTableOffset;
/* number of equips */
UINT16 u16EquipNum;
/* offset of equip description table */
UINT32 u32EquipTableOffset;
/* output tags offsets index */
UINT32 u32OutTagIndex[MAX_OUTTAG_INDEX];
/* tags offsets index */
UINT32 u32TagIndex[MAX_TAG_INDEX];
/* equips offsets index */
UINT32 u32EquipIndex[MAX_EQUIP_INDEX];
/* groups offsets index */
UINT32 u32GrpIndex[MAX_GRP_INDEX];
/* configuation file instance */
GConfigFile configfile;
}DIUCONFIG;
/* init */
Boolean gconfig_Init(CHAR* cfgFileName, DIUCONFIG* pConfig);
/* get gather unit configuation */
Boolean gconfig_Config(DIUCONFIG* pConfig, FTagGroup grps[], UINT32 grpsize, FTag tags[], UINT32 tagsize, FOutputTag outtags[], UINT32 outtagsize);
/* free resources */
VOID gconfig_Free(DIUCONFIG* pConfig);
/* print gained configuation */
VOID gconfig_Print(DIUCONFIG* pConfig);
#ifdef __cplusplus
}
#endif
#endif // __F_GCONFIG_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -