EPICS Base  7.0.6.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dbCa.h
1 /*************************************************************************\
2 * Copyright (c) 2015 The University of Chicago, 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 * SPDX-License-Identifier: EPICS
7 * EPICS BASE is distributed subject to a Software License Agreement found
8 * in file LICENSE that is included with this distribution.
9 \*************************************************************************/
10 /* dbCa.h */
11 
12 #ifndef INCdbCah
13 #define INCdbCah
14 
15 #include "dbLink.h"
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 typedef void (*dbCaCallback)(void *userPvt);
22 DBCORE_API void dbCaCallbackProcess(void *usrPvt);
23 
24 DBCORE_API void dbCaLinkInit(void); /* internal initialization for iocBuild() */
25 DBCORE_API void dbCaLinkInitIsolated(void); /* internal initialization for iocBuildIsolated() */
26 DBCORE_API void dbCaRun(void);
27 DBCORE_API void dbCaPause(void);
28 DBCORE_API void dbCaShutdown(void);
29 
30 struct dbLocker;
31 DBCORE_API void dbCaAddLinkCallback(struct link *plink,
32  dbCaCallback connect, dbCaCallback monitor, void *userPvt);
33 DBCORE_API long dbCaAddLink(struct dbLocker *locker, struct link *plink, short dbfType);
34 DBCORE_API void dbCaRemoveLink(struct dbLocker *locker, struct link *plink);
35 
36 DBCORE_API long dbCaGetLink(struct link *plink,
37  short dbrType, void *pbuffer, long *nRequest);
38 
39 DBCORE_API long dbCaGetAttributes(const struct link *plink,
40  dbCaCallback callback, void *userPvt);
41 
42 DBCORE_API long dbCaPutLinkCallback(struct link *plink,
43  short dbrType, const void *pbuffer,long nRequest,
44  dbCaCallback callback, void *userPvt);
45 DBCORE_API long dbCaPutLink(struct link *plink,short dbrType,
46  const void *pbuffer,long nRequest);
47 
48 extern struct ca_client_context * dbCaClientContext;
49 
50 #ifdef EPICS_DBCA_PRIVATE_API
51 DBCORE_API void dbCaSync(void);
52 DBCORE_API unsigned long dbCaGetUpdateCount(struct link *plink);
53 #endif
54 
55 /* These macros are for backwards compatibility */
56 
57 #define dbCaIsLinkConnected(link) \
58  dbIsLinkConnected(link)
59 
60 #define dbCaGetLinkDBFtype(link) \
61  dbGetLinkDBFtype(link)
62 #define dbCaGetNelements(link, nelements) \
63  dbGetNelements(link, nelements)
64 #define dbCaGetSevr(link, sevr) \
65  dbGetAlarm(link, NULL, sevr)
66 #define dbCaGetAlarm(link, stat, sevr) \
67  dbGetAlarm(link, stat, sevr)
68 #define dbCaGetTimeStamp(link, pstamp) \
69  dbGetTimeStamp(link, pstamp)
70 #define dbCaGetControlLimits(link, low, high) \
71  dbGetControlLimits(link, low, high)
72 #define dbCaGetGraphicLimits(link, low, high) \
73  dbGetGraphicLimits(link, low, high)
74 #define dbCaGetAlarmLimits(link, lolo, low, high, hihi) \
75  dbGetAlarmLimits(link, lolo, low, high, hihi)
76 #define dbCaGetPrecision(link, prec) \
77  dbGetPrecision(link, prec)
78 #define dbCaGetUnits(link, units, unitSize) \
79  dbGetUnits(link, units, unitSize)
80 
81 #define dbCaScanFwdLink(link) \
82  dbScanFwdLink(link)
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
88 #endif /*INCdbCah*/