ioc/dbStatic: add dbGetDevLink()
This commit is contained in:
@@ -709,6 +709,18 @@ void dbInitEntryFromRecord(struct dbCommon *prec, DBENTRY *pdbentry)
|
||||
pdbentry->precnode = ppvt->recnode;
|
||||
}
|
||||
|
||||
struct link* dbGetDevLink(struct dbCommon* prec)
|
||||
{
|
||||
DBLINK *plink = 0;
|
||||
DBENTRY entry;
|
||||
dbInitEntryFromRecord(prec, &entry);
|
||||
if(dbFindField(&entry, "INP")==0 || dbFindField(&entry, "OUT")==0) {
|
||||
plink = (DBLINK*)entry.pfield;
|
||||
}
|
||||
dbFinishEntry(&entry);
|
||||
return plink;
|
||||
}
|
||||
|
||||
long dbValueSize(short dbr_type)
|
||||
{
|
||||
/* sizes for value associated with each DBR request type */
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
struct dbCommon;
|
||||
struct devSup;
|
||||
struct ioscan_head; /* aka IOSCANPVT */
|
||||
struct link; /* aka DBLINK */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -112,6 +113,12 @@ typedef struct dsxt { /* device support extension table */
|
||||
/* Recordtypes are *not* allowed to extend this table */
|
||||
} dsxt;
|
||||
|
||||
/** Fetch INP or OUT link (or NULL if record type has neither).
|
||||
*
|
||||
* Recommended for use in device support init_record()
|
||||
*/
|
||||
epicsShareFunc struct link* dbGetDevLink(struct dbCommon* prec);
|
||||
|
||||
epicsShareExtern dsxt devSoft_DSXT; /* Allow anything table */
|
||||
|
||||
epicsShareFunc void devExtend(dsxt *pdsxt);
|
||||
|
||||
Reference in New Issue
Block a user