This is Unofficial EPICS BASE Doxygen Site
devSup.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 \*************************************************************************/
14 /*
15  * Author: Marty Kraimer
16  * Date: 6-1-90
17  */
18 
19 #ifndef INCdevSuph
20 #define INCdevSuph 1
21 
22 #include "errMdef.h"
23 #include "shareLib.h"
24 
25 /* structures defined elsewhere */
26 struct dbCommon;
27 struct devSup;
28 typedef struct ioscan_head *IOSCANPVT;
29 struct link; /* aka DBLINK */
30 
64 typedef struct typed_dset {
67  long number;
69  long (*report)(int lvl);
74  long (*init)(int after);
76  long (*init_record)(struct dbCommon *prec);
107  long (*get_ioint_info)(int detach, struct dbCommon *prec, IOSCANPVT* pscan);
108  /* Any further functions are specified by the record type. */
109 } typed_dset;
110 
117 typedef struct dsxt {
122  long (*add_record)(struct dbCommon *precord);
127  long (*del_record)(struct dbCommon *precord);
128  /* Only future Base releases may extend this table. */
129 } dsxt;
130 
131 #ifdef __cplusplus
132 extern "C" {
133  typedef long (*DEVSUPFUN)(void *); /* ptr to device support function*/
134 #else
135  typedef long (*DEVSUPFUN)(); /* ptr to device support function*/
136 #endif
137 
138 #ifndef USE_TYPED_DSET
139 
140 typedef struct dset { /* device support entry table */
141  long number; /*number of support routines*/
142  DEVSUPFUN report; /*print report*/
143  DEVSUPFUN init; /*init support layer*/
144  DEVSUPFUN init_record; /*init device for particular record*/
145  DEVSUPFUN get_ioint_info; /* get io interrupt information*/
146  /*other functions are record dependent*/
147 } dset;
148 
149 #else
150 typedef typed_dset dset;
151 #endif /* USE_TYPED_DSET */
152 
153 /* exists only to disambiguate dset dbCommon::dset */
154 typedef dset unambiguous_dset;
155 
160 epicsShareFunc struct link* dbGetDevLink(struct dbCommon* prec);
161 
162 epicsShareExtern dsxt devSoft_DSXT; /* Allow anything table */
163 
164 epicsShareFunc void devExtend(dsxt *pdsxt);
165 epicsShareFunc void dbInitDevSup(struct devSup *pdevSup, dset *pdset);
166 
167 
168 #define S_dev_noDevSup (M_devSup| 1) /*SDR_DEVSUP: Device support missing*/
169 #define S_dev_noDSET (M_devSup| 3) /*Missing device support entry table*/
170 #define S_dev_missingSup (M_devSup| 5) /*Missing device support routine*/
171 #define S_dev_badInpType (M_devSup| 7) /*Bad INP link type*/
172 #define S_dev_badOutType (M_devSup| 9) /*Bad OUT link type*/
173 #define S_dev_badInitRet (M_devSup|11) /*Bad init_rec return value */
174 #define S_dev_badBus (M_devSup|13) /*Illegal bus type*/
175 #define S_dev_badCard (M_devSup|15) /*Illegal or nonexistant module*/
176 #define S_dev_badSignal (M_devSup|17) /*Illegal signal*/
177 #define S_dev_NoInit (M_devSup|19) /*No init*/
178 #define S_dev_Conflict (M_devSup|21) /*Multiple records accessing same signal*/
179 #define S_dev_noDeviceFound (M_devSup|23) /*No device found at specified address*/
180 
181 #ifdef __cplusplus
182 } /* extern "C" */
183 #endif
184 
185 #endif
Definition: devSup.h:117
long number
Definition: devSup.h:67
long(* report)(int lvl)
Definition: devSup.h:69
long(* init)(int after)
Definition: devSup.h:74
DEVSUPFUN init_record
Definition: devSup.h:144
epicsShareFunc void devExtend(dsxt *pdsxt)
Definition: dbStaticRun.c:60
epicsShareFunc void dbInitDevSup(struct devSup *pdevSup, dset *pdset)
Definition: dbStaticRun.c:47
#define epicsShareFunc
Definition: shareLib.h:209
DEVSUPFUN get_ioint_info
Definition: devSup.h:145
Mark external symbols and entry points for shared libraries.
DEVSUPFUN init
Definition: devSup.h:143
struct dset dset
long number
Definition: devSup.h:141
long(* init_record)(struct dbCommon *prec)
Definition: devSup.h:76
struct ioscan_head * IOSCANPVT
Definition: devSup.h:28
#define epicsShareExtern
Definition: shareLib.h:204
epicsShareFunc struct link * dbGetDevLink(struct dbCommon *prec)
Definition: devSup.h:140
struct typed_dset typed_dset
Definition: dbBase.h:38
long(* get_ioint_info)(int detach, struct dbCommon *prec, IOSCANPVT *pscan)
Definition: devSup.h:107
DEVSUPFUN report
Definition: devSup.h:142
dset unambiguous_dset
Definition: devSup.h:154
struct dsxt dsxt
long(* DEVSUPFUN)()
Definition: devSup.h:135
int prec
Definition: reader.c:29
epicsShareExtern dsxt devSoft_DSXT
Definition: devSup.h:162