This is Unofficial EPICS BASE Doxygen Site
dbBase.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2009 UChicago Argonne LLC, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * EPICS BASE is distributed subject to a Software License Agreement found
7 * in file LICENSE that is included with this distribution.
8 \*************************************************************************/
9 /*
10  * Current Author: Marty Kraimer
11  * Date: 03-19-92
12  */
13 
14 #ifndef INCdbBaseh
15 #define INCdbBaseh 1
16 
17 #include "epicsTypes.h"
18 #include "dbFldTypes.h"
19 #include "ellLib.h"
20 #include "dbDefs.h"
21 #include "recSup.h"
22 #include "devSup.h"
23 
24 typedef struct dbMenu {
26  char *name;
27  int nChoice;
28  char **papChoiceName;
30 }dbMenu;
31 
32 typedef struct drvSup {
34  char *name;
35  struct drvet *pdrvet;
36 }drvSup;
37 
38 typedef struct devSup {
40  char *name;
41  char *choice;
42  int link_type;
43  /*Following only available on run time system*/
45  struct dsxt *pdsxt; /* Extended device support */
46 }devSup;
47 
48 typedef struct linkSup {
50  char *name;
51  char *jlif_name;
52  struct jlif *pjlif;
53 } linkSup;
54 
55 typedef struct dbDeviceMenu {
56  int nChoice;
57  char **papChoice;
59 
60 /* conversion types*/
61 typedef enum {CT_DECIMAL,CT_HEX} ctType;
62 /* access level types */
63 typedef enum {ASL0,ASL1} asLevel;
64 
65 /*Breakpoint Tables */
66 typedef struct brkInt{ /* breakpoint interval */
67  double raw; /*raw value for beginning of interval */
68  double slope; /*slope for interval */
69  double eng; /*converted value for beginning of interval*/
70 }brkInt;
71 
72 typedef struct brkTable { /* breakpoint table */
74  char *name; /*breakpoint table name */
75  long number; /*number of brkInt in this table */
76  struct brkInt *paBrkInt; /* ptr to array of brkInts */
77 }brkTable;
78 
79 typedef struct dbFldDes{ /* field description */
80  char *prompt; /*Prompt string for DCT */
81  char *name; /*Field name */
82  char *extra; /*C def for DBF_NOACCESS */
84  short indRecordType; /*within dbRecordType.papFldDes */
85  short special; /*Special processing requirements */
86  dbfType field_type; /*Field type as defined in dbFldTypes.h */
87  unsigned int process_passive:1;/*should dbPutField process passive */
88  unsigned int prop:1; /*field is a metadata, post DBE_PROPERTY on change*/
89  unsigned int isDevLink:1; /* true for INP/OUT fields */
90  ctType base; /*base for integer to string conversions*/
91  short promptgroup; /*prompt, i.e. gui group */
92  short interest; /*interest level */
93  asLevel as_level; /*access security level */
94  char *initial; /*initial value */
95  /*If (DBF_MENU,DBF_DEVICE) ftPvt is (pdbMenu,pdbDeviceMenu) */
96  void *ftPvt;
97  /*On no runtime following only set for STRING */
98  short size; /*length in bytes of a field element */
99  /*The following are only available on run time system*/
100  unsigned short offset; /*Offset in bytes from beginning of record*/
101 }dbFldDes;
102 
103 typedef struct dbInfoNode { /*non-field per-record information*/
105  char *name;
106  char *string;
107  void *pointer;
108 }dbInfoNode;
109 
110 #define DBRN_FLAGS_VISIBLE 1
111 #define DBRN_FLAGS_ISALIAS 2
112 #define DBRN_FLAGS_HASALIAS 4
113 
114 typedef struct dbRecordNode {
116  void *precord;
117  char *recordname;
118  ELLLIST infoList; /*LIST head of info nodes*/
119  int flags;
120  struct dbRecordNode *aliasedRecnode; /* NULL unless flags|DBRN_FLAGS_ISALIAS */
121 }dbRecordNode;
122 
123 /*dbRecordAttribute is for "psuedo" fields */
124 /*pdbFldDes is so that other access routines work correctly*/
125 /*Until base supports char * value MUST be fixed length string*/
126 typedef struct dbRecordAttribute {
128  char *name;
132 
133 typedef struct dbText {
135  char *text;
136 }dbText;
137 
138 typedef struct dbVariableDef {
140  char *name;
141  char *type;
142 
144 
145 typedef struct dbRecordType {
147  ELLLIST attributeList; /*LIST head of attributes*/
148  ELLLIST recList; /*LIST head of sorted dbRecordNodes*/
149  ELLLIST devList; /*List of associated device support*/
150  ELLLIST cdefList; /*LIST of Cdef text items*/
151  char *name;
152  short no_fields; /* number of fields defined */
153  short no_prompt; /* number of fields to configure*/
154  short no_links; /* number of links */
155  short no_aliases; /* number of aliases in recList */
156  short *link_ind; /* addr of array of ind in papFldDes*/
157  char **papsortFldName;/* ptr to array of ptr to fld names*/
158  short *sortFldInd; /* addr of array of ind in papFldDes*/
159  dbFldDes *pvalFldDes; /*pointer dbFldDes for VAL field*/
160  short indvalFlddes; /*ind in papFldDes*/
161  dbFldDes **papFldDes; /* ptr to array of ptr to fldDes*/
162  /*The following are only available on run time system*/
164  int rec_size; /*record size in bytes */
165 }dbRecordType;
166 
167 struct dbPvd; /* Contents private to dbPvdLib code */
168 struct gphPvt; /* Contents private to gpHashLib code */
169 
170 typedef struct dbBase {
181  void *pathPvt;
182  struct dbPvd *ppvd;
183  struct gphPvt *pgpHash;
185  short loadCdefs;
186 }dbBase;
187 #endif
Definition: devSup.h:117
ELLLIST cdefList
Definition: dbBase.h:150
char ** papChoiceName
Definition: dbBase.h:28
struct drvSup drvSup
char ** papChoice
Definition: dbBase.h:57
char * name
Definition: dbBase.h:140
ELLNODE node
Definition: dbBase.h:134
Definition: link.h:174
short promptgroup
Definition: dbBase.h:91
ELLLIST drvList
Definition: dbBase.h:173
rset * prset
Definition: dbBase.h:163
char * choice
Definition: dbBase.h:41
void * pathPvt
Definition: dbBase.h:181
char * jlif_name
Definition: dbBase.h:51
Definition: dbBase.h:32
short special
Definition: dbBase.h:85
struct drvet * pdrvet
Definition: dbBase.h:35
ELLLIST linkList
Definition: dbBase.h:174
asLevel
Definition: dbBase.h:63
void * precord
Definition: dbBase.h:116
ELLLIST infoList
Definition: dbBase.h:118
Definition: dbBase.h:63
ELLLIST recordTypeList
Definition: dbBase.h:172
short loadCdefs
Definition: dbBase.h:185
short * link_ind
Definition: dbBase.h:156
ELLNODE node
Definition: dbBase.h:104
struct dbVariableDef dbVariableDef
long number
Definition: dbBase.h:75
dbFldDes * pdbFldDes
Definition: dbBase.h:129
ELLLIST functionList
Definition: dbBase.h:176
dbfType
Definition: dbFldTypes.h:24
struct brkInt brkInt
ELLNODE node
Definition: dbBase.h:127
ELLLIST bptList
Definition: dbBase.h:178
char * name
Definition: dbBase.h:26
Miscellaneous macro definitions.
Definition: drvSup.h:45
char * name
Definition: dbBase.h:40
short no_aliases
Definition: dbBase.h:155
ELLNODE node
Definition: dbBase.h:146
ELLNODE node
Definition: dbBase.h:39
struct devSup devSup
struct dsxt * pdsxt
Definition: dbBase.h:45
struct dbPvd * ppvd
Definition: dbBase.h:182
A doubly-linked list library.
struct dbRecordNode dbRecordNode
short interest
Definition: dbBase.h:92
struct dbRecordType * pdbRecordType
Definition: dbBase.h:83
ELLNODE node
Definition: dbBase.h:73
ELLNODE node
Definition: dbBase.h:139
Device support routines.
Definition: devSup.h:140
short size
Definition: dbBase.h:98
struct dbRecordNode * aliasedRecnode
Definition: dbBase.h:120
int flags
Definition: dbBase.h:119
short indvalFlddes
Definition: dbBase.h:160
void * pointer
Definition: dbBase.h:107
char ** papsortFldName
Definition: dbBase.h:157
struct jlif * pjlif
Definition: dbBase.h:52
ctType base
Definition: dbBase.h:90
struct dbMenu dbMenu
char * text
Definition: dbBase.h:135
struct dbBase dbBase
Definition: dbBase.h:48
char ** papChoiceValue
Definition: dbBase.h:29
ELLNODE node
Definition: dbBase.h:49
ELLLIST devList
Definition: dbBase.h:149
short no_fields
Definition: dbBase.h:152
Definition: dbBase.h:38
ELLLIST guiGroupList
Definition: dbBase.h:180
ELLNODE node
Definition: dbBase.h:115
char * name
Definition: dbBase.h:151
List node type.
Definition: ellLib.h:45
char * string
Definition: dbBase.h:106
short * sortFldInd
Definition: dbBase.h:158
struct linkSup linkSup
ELLLIST menuList
Definition: dbBase.h:171
Definition: dbBase.h:24
asLevel as_level
Definition: dbBase.h:93
short no_links
Definition: dbBase.h:154
Definition: makeBpt.c:43
Definition: dbPvdLib.c:33
char * name
Definition: dbBase.h:105
Definition: dbBase.h:63
short no_prompt
Definition: dbBase.h:153
#define MAX_STRING_SIZE
Definition: epicsTypes.h:65
ELLNODE node
Definition: dbBase.h:33
int nChoice
Definition: dbBase.h:27
ELLLIST recList
Definition: dbBase.h:148
ctType
Definition: dbBase.h:61
void * ftPvt
Definition: dbBase.h:96
Definition: dbBase.h:170
dbFldDes * pvalFldDes
Definition: dbBase.h:159
dbFldDes ** papFldDes
Definition: dbBase.h:161
char * extra
Definition: dbBase.h:82
ELLLIST filterList
Definition: dbBase.h:179
struct brkInt * paBrkInt
Definition: dbBase.h:76
Definition: recSup.h:67
char * recordname
Definition: dbBase.h:117
char * initial
Definition: dbBase.h:94
short ignoreMissingMenus
Definition: dbBase.h:184
char * prompt
Definition: dbBase.h:80
char * name
Definition: dbBase.h:81
char * type
Definition: dbBase.h:141
List header type.
Definition: ellLib.h:56
ELLLIST registrarList
Definition: dbBase.h:175
int nChoice
Definition: dbBase.h:56
struct dbText dbText
ELLNODE node
Definition: dbBase.h:25
ELLLIST attributeList
Definition: dbBase.h:147
Definition: dbBase.h:133
unsigned short offset
Definition: dbBase.h:100
Definition: dbBase.h:61
struct gphPvt * pgpHash
Definition: dbBase.h:183
struct dbInfoNode dbInfoNode
struct brkTable brkTable
struct dbDeviceMenu dbDeviceMenu
dbfType field_type
Definition: dbBase.h:86
struct dbFldDes dbFldDes
char * name
Definition: dbBase.h:34
struct dbRecordType dbRecordType
char * name
Definition: dbBase.h:50
int rec_size
Definition: dbBase.h:164
ELLLIST variableList
Definition: dbBase.h:177
char * name
Definition: dbBase.h:74
short indRecordType
Definition: dbBase.h:84
int link_type
Definition: dbBase.h:42
struct dbRecordAttribute dbRecordAttribute
dset * pdset
Definition: dbBase.h:44