12 #ifndef INCdbAccessDefsh
13 #define INCdbAccessDefsh
18 #include "dbCoreAPI.h"
29 DBCORE_API
extern struct dbBase *pdbbase;
30 DBCORE_API
extern volatile int interruptAccept;
31 DBCORE_API
extern int dbAccessDebugPUTF;
35 #define DBR_STATUS 0x00000001
36 #define DBR_AMSG 0x00000002
37 #define DBR_UNITS 0x00000004
38 #define DBR_PRECISION 0x00000008
39 #define DBR_TIME 0x00000010
40 #define DBR_UTAG 0x00000020
41 #define DBR_ENUM_STRS 0x00000040
42 #define DBR_GR_LONG 0x00000080
43 #define DBR_GR_DOUBLE 0x00000100
44 #define DBR_CTRL_LONG 0x00000200
45 #define DBR_CTRL_DOUBLE 0x00000400
46 #define DBR_AL_LONG 0x00000800
47 #define DBR_AL_DOUBLE 0x00001000
101 epicsUInt16 status; \
102 epicsUInt16 severity; \
105 #define DB_AMSG_SIZE 40
107 char amsg[DB_AMSG_SIZE];
108 #define DB_UNITS_SIZE 16
110 char units[DB_UNITS_SIZE];
111 #define DBRprecision union { \
123 #define DBRenumStrs \
124 epicsUInt32 no_str; \
125 epicsInt32 padenumStrs; \
126 char strs[DB_MAX_CHOICES][MAX_STRING_SIZE];
128 epicsInt32 upper_disp_limit; \
129 epicsInt32 lower_disp_limit;
130 #define DBRgrDouble \
131 epicsFloat64 upper_disp_limit; \
132 epicsFloat64 lower_disp_limit;
133 #define DBRctrlLong \
134 epicsInt32 upper_ctrl_limit; \
135 epicsInt32 lower_ctrl_limit;
136 #define DBRctrlDouble \
137 epicsFloat64 upper_ctrl_limit; \
138 epicsFloat64 lower_ctrl_limit;
140 epicsInt32 upper_alarm_limit;\
141 epicsInt32 upper_warning_limit;\
142 epicsInt32 lower_warning_limit;\
143 epicsInt32 lower_alarm_limit;
144 #define DBRalDouble \
145 epicsFloat64 upper_alarm_limit;\
146 epicsFloat64 upper_warning_limit;\
147 epicsFloat64 lower_warning_limit;\
148 epicsFloat64 lower_alarm_limit;
163 #define dbr_status_size sizeof(struct dbr_status)
164 #define dbr_units_size sizeof(struct dbr_units)
165 #define dbr_precision_size sizeof(struct dbr_precision)
166 #define dbr_time_size sizeof(struct dbr_time)
167 #define dbr_enumStrs_size sizeof(struct dbr_enumStrs)
168 #define dbr_grLong_size sizeof(struct dbr_grLong)
169 #define dbr_grDouble_size sizeof(struct dbr_grDouble)
170 #define dbr_ctrlLong_size sizeof(struct dbr_ctrlLong)
171 #define dbr_ctrlDouble_size sizeof(struct dbr_ctrlDouble)
172 #define dbr_alLong_size sizeof(struct dbr_alLong)
173 #define dbr_alDouble_size sizeof(struct dbr_alDouble)
177 #define S_db_notFound (M_dbAccess| 1)
178 #define S_db_badDbrtype (M_dbAccess| 3)
179 #define S_db_noMod (M_dbAccess| 5)
180 #define S_db_badLset (M_dbAccess| 7)
181 #define S_db_precision (M_dbAccess| 9)
182 #define S_db_onlyOne (M_dbAccess|11)
183 #define S_db_badChoice (M_dbAccess|13)
184 #define S_db_badField (M_dbAccess|15)
185 #define S_db_lsetLogic (M_dbAccess|17)
186 #define S_db_noLSET (M_dbAccess|21)
187 #define S_db_noRSET (M_dbAccess|31)
188 #define S_db_noSupport (M_dbAccess|33)
189 #define S_db_BadSub (M_dbAccess|35)
191 #define S_db_Pending (M_dbAccess|37)
193 #define S_db_Blocked (M_dbAccess|39)
194 #define S_db_putDisabled (M_dbAccess|41)
195 #define S_db_badHWaddr (M_dbAccess|43)
196 #define S_db_bkptSet (M_dbAccess|53)
197 #define S_db_bkptNotSet (M_dbAccess|55)
198 #define S_db_notStopped (M_dbAccess|57)
199 #define S_db_errArg (M_dbAccess|59)
200 #define S_db_bkptLogic (M_dbAccess|61)
201 #define S_db_cntSpwn (M_dbAccess|63)
202 #define S_db_cntCont (M_dbAccess|65)
203 #define S_db_noMemory (M_dbAccess|66)
204 #define S_db_notInit (M_dbAccess|67)
205 #define S_db_bufFull (M_dbAccess|68)
209 DBCORE_API
long dbPutSpecial(
struct dbAddr *paddr,
int pass);
210 DBCORE_API
rset * dbGetRset(
const struct dbAddr *paddr);
211 DBCORE_API
long dbPutAttribute(
212 const char *recordTypename,
const char *name,
const char*
value);
213 DBCORE_API
int dbIsValueField(
const struct dbFldDes *pdbFldDes);
214 DBCORE_API
int dbGetFieldIndex(
const struct dbAddr *paddr);
215 DBCORE_API
long dbScanPassive(
217 DBCORE_API
long dbProcess(
struct dbCommon *precord);
218 DBCORE_API
long dbNameToAddr(
const char *pname,
struct dbAddr *paddr);
224 DBCORE_API
long dbEntryToAddr(
const struct dbEntry *pdbentry,
231 DBCORE_API
void dbInitEntryFromAddr(
struct dbAddr *paddr,
232 struct dbEntry *pdbentry);
238 DBCORE_API
void dbInitEntryFromRecord(
struct dbCommon *prec,
239 struct dbEntry *pdbentry);
243 DBCORE_API
long dbGetField(
244 struct dbAddr *,
short dbrType,
void *pbuffer,
long *options,
245 long *nRequest,
void *pfl);
246 DBCORE_API
long dbGet(
247 struct dbAddr *,
short dbrType,
void *pbuffer,
long *options,
248 long *nRequest,
void *pfl);
249 DBCORE_API
long dbPutField(
250 struct dbAddr *,
short dbrType,
const void *pbuffer,
long nRequest);
251 DBCORE_API
long dbPut(
252 struct dbAddr *,
short dbrType,
const void *pbuffer,
long nRequest);
254 typedef void(*SPC_ASCALLBACK)(
struct dbCommon *);
256 DBCORE_API
void dbSpcAsRegisterCallback(SPC_ASCALLBACK func);
257 DBCORE_API
long dbBufferSize(
258 short dbrType,
long options,
long nRequest);
259 DBCORE_API
long dbValueSize(
short dbrType);
263 typedef void (*DB_LOAD_RECORDS_HOOK_ROUTINE)(
const char* filename,
264 const char* substitutions);
265 DBCORE_API
extern DB_LOAD_RECORDS_HOOK_ROUTINE dbLoadRecordsHook;
267 DBCORE_API
int dbLoadDatabase(
268 const char *filename,
const char *path,
const char *substitutions);
269 DBCORE_API
int dbLoadRecords(
270 const char* filename,
const char* substitutions);
The core data types used by epics.
EPICS time-stamps (epicsTimeStamp), epicsTime C++ class and C functions for handling wall-clock times...