avoid 'struct dset'
doesn't work if -DUSE_TYPED_DSET
This commit is contained in:
@@ -1010,7 +1010,7 @@ devSup* dbDTYPtoDevSup(dbRecordType *prdes, int dtyp) {
|
||||
return (devSup *)ellNth(&prdes->devList, dtyp+1);
|
||||
}
|
||||
|
||||
devSup* dbDSETtoDevSup(dbRecordType *prdes, struct dset *pdset) {
|
||||
devSup* dbDSETtoDevSup(dbRecordType *prdes, dset *pdset) {
|
||||
devSup *pdevSup = (devSup *)ellFirst(&prdes->devList);
|
||||
while (pdevSup) {
|
||||
if (pdset == pdevSup->pdset) return pdevSup;
|
||||
@@ -1032,7 +1032,7 @@ static long dbPutFieldLink(DBADDR *paddr,
|
||||
struct link *plink = (struct link *)paddr->pfield;
|
||||
const char *pstring = (const char *)pbuffer;
|
||||
struct dsxt *old_dsxt = NULL;
|
||||
struct dset *new_dset = NULL;
|
||||
dset *new_dset = NULL;
|
||||
struct dsxt *new_dsxt = NULL;
|
||||
devSup *new_devsup = NULL;
|
||||
long status;
|
||||
|
||||
@@ -18,15 +18,16 @@
|
||||
|
||||
#include "epicsTypes.h"
|
||||
#include "epicsTime.h"
|
||||
#include "dbBase.h"
|
||||
#include "dbAddr.h"
|
||||
#include "recSup.h"
|
||||
|
||||
#ifdef INCLdb_accessh_epicsExportSharedSymbols
|
||||
# define epicsExportSharedSymbols
|
||||
# include "shareLib.h"
|
||||
#endif
|
||||
|
||||
#include "dbBase.h"
|
||||
#include "dbAddr.h"
|
||||
#include "recSup.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -239,7 +240,7 @@ epicsShareFunc void dbInitEntryFromRecord(struct dbCommon *prec,
|
||||
struct dbEntry *pdbentry);
|
||||
|
||||
epicsShareFunc devSup* dbDTYPtoDevSup(dbRecordType *prdes, int dtyp);
|
||||
epicsShareFunc devSup* dbDSETtoDevSup(dbRecordType *prdes, struct dset *pdset);
|
||||
epicsShareFunc devSup* dbDSETtoDevSup(dbRecordType *prdes, dset *pdset);
|
||||
epicsShareFunc long dbGetField(
|
||||
struct dbAddr *,short dbrType,void *pbuffer,long *options,
|
||||
long *nRequest,void *pfl);
|
||||
|
||||
@@ -199,11 +199,12 @@
|
||||
interest(4)
|
||||
extra("struct typed_rset *rset")
|
||||
}
|
||||
%#include "devSup.h"
|
||||
field(DSET,DBF_NOACCESS) {
|
||||
prompt("DSET address")
|
||||
special(SPC_NOMOD)
|
||||
interest(4)
|
||||
extra("struct dset *dset")
|
||||
extra("unambiguous_dset *dset")
|
||||
}
|
||||
field(DPVT,DBF_NOACCESS) {
|
||||
prompt("Device Private")
|
||||
|
||||
@@ -712,7 +712,7 @@ long dbior(const char *pdrvName,int interest_level)
|
||||
for (pdevSup = (devSup *)ellFirst(&pdbRecordType->devList);
|
||||
pdevSup;
|
||||
pdevSup = (devSup *)ellNext(&pdevSup->node)) {
|
||||
struct dset *pdset = pdevSup->pdset;
|
||||
dset *pdset = pdevSup->pdset;
|
||||
const char *pname = pdevSup->name;
|
||||
|
||||
if (!pdset || !pname)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "ellLib.h"
|
||||
#include "dbDefs.h"
|
||||
#include "recSup.h"
|
||||
#include "devSup.h"
|
||||
|
||||
typedef struct dbMenu {
|
||||
ELLNODE node;
|
||||
@@ -40,7 +41,7 @@ typedef struct devSup {
|
||||
char *choice;
|
||||
int link_type;
|
||||
/*Following only available on run time system*/
|
||||
struct dset *pdset;
|
||||
dset *pdset;
|
||||
struct dsxt *pdsxt; /* Extended device support */
|
||||
}devSup;
|
||||
|
||||
|
||||
@@ -153,6 +153,9 @@ typedef struct dset { /* device support entry table */
|
||||
typedef typed_dset dset;
|
||||
#endif /* USE_TYPED_DSET */
|
||||
|
||||
/* exists only to disambiguate dset dbCommon::dset */
|
||||
typedef dset unambiguous_dset;
|
||||
|
||||
/** Fetch INP or OUT link (or NULL if record type has neither).
|
||||
*
|
||||
* Recommended for use in device support init_record()
|
||||
|
||||
@@ -433,7 +433,7 @@ static void initDevSup(void)
|
||||
for (pdevSup = (devSup *)ellFirst(&pdbRecordType->devList);
|
||||
pdevSup;
|
||||
pdevSup = (devSup *)ellNext(&pdevSup->node)) {
|
||||
struct dset *pdset = registryDeviceSupportFind(pdevSup->name);
|
||||
dset *pdset = registryDeviceSupportFind(pdevSup->name);
|
||||
|
||||
if (!pdset) {
|
||||
errlogPrintf("device support %s not found\n",pdevSup->name);
|
||||
@@ -456,7 +456,7 @@ static void finishDevSup(void)
|
||||
for (pdevSup = (devSup *)ellFirst(&pdbRecordType->devList);
|
||||
pdevSup;
|
||||
pdevSup = (devSup *)ellNext(&pdevSup->node)) {
|
||||
struct dset *pdset = pdevSup->pdset;
|
||||
dset *pdset = pdevSup->pdset;
|
||||
|
||||
if (pdset && pdset->init)
|
||||
pdset->init(1);
|
||||
|
||||
@@ -18,12 +18,12 @@ static void *registryID = "device support";
|
||||
|
||||
|
||||
epicsShareFunc int registryDeviceSupportAdd(
|
||||
const char *name, const struct dset *pdset)
|
||||
const char *name, const dset *pdset)
|
||||
{
|
||||
return registryAdd(registryID, name, (void *)pdset);
|
||||
}
|
||||
|
||||
epicsShareFunc struct dset * registryDeviceSupportFind(
|
||||
epicsShareFunc dset * registryDeviceSupportFind(
|
||||
const char *name)
|
||||
{
|
||||
return registryFind(registryID, name);
|
||||
|
||||
@@ -18,8 +18,8 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
epicsShareFunc int registryDeviceSupportAdd(
|
||||
const char *name, const struct dset *pdset);
|
||||
epicsShareFunc struct dset * registryDeviceSupportFind(
|
||||
const char *name, const dset *pdset);
|
||||
epicsShareFunc dset * registryDeviceSupportFind(
|
||||
const char *name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user