diff --git a/src/db/dbAccess.h b/src/db/dbAccess.h index 816283013..6ce12f1c6 100644 --- a/src/db/dbAccess.h +++ b/src/db/dbAccess.h @@ -241,7 +241,6 @@ epicsShareFunc long epicsShareAPI dbPutField( struct dbAddr *,short dbrType,const void *pbuffer,long nRequest); epicsShareFunc long epicsShareAPI dbPut( struct dbAddr *,short dbrType,const void *pbuffer,long nRequest); -epicsShareFunc long epicsShareAPI dbPutNotify(PUTNOTIFY *pputnotify); typedef void(*SPC_ASCALLBACK)(struct dbCommon *); /*dbSpcAsRegisterCallback called by access security */ epicsShareFunc void epicsShareAPI dbSpcAsRegisterCallback(SPC_ASCALLBACK func); diff --git a/src/db/dbAddr.h b/src/db/dbAddr.h index 0204f4167..e7696b274 100644 --- a/src/db/dbAddr.h +++ b/src/db/dbAddr.h @@ -7,7 +7,6 @@ // for brain dead C++ compilers // struct dbCommon; - struct putNotify; #endif typedef struct dbAddr{ @@ -23,35 +22,6 @@ typedef struct dbAddr{ /*DBR_STRING,...,DBR_ENUM,DBR_NOACCESS*/ }DBADDR; -typedef struct pnRestartNode { - ELLNODE node; - struct putNotify *ppn; - struct putNotify *ppnrestartList; /*ppn with restartList*/ -}PNRESTARTNODE; - - -typedef struct putNotify{ - /*The following members MUST be set by user*/ - void (*userCallback)(struct putNotify *); - struct dbAddr *paddr; /*dbAddr set by dbNameToAddr*/ - void *pbuffer; /*address of data*/ - long nRequest; /*number of elements to be written*/ - short dbrType; /*database request type*/ - void *usrPvt; /*for private use of user*/ - /*The following is status of request. Set by dbPutNotify*/ - long status; - /*The following are private to database access*/ - struct callbackPvt *callback; - ELLLIST waitList; /*list of records for which to wait*/ - ELLLIST restartList; /*list of PUTNOTIFYs to restart*/ - PNRESTARTNODE restartNode; - short restart; - short callbackState; - void *waitForCallback; -}PUTNOTIFY; - -int dbPutNotifyMapType (PUTNOTIFY *ppn, short oldtype); - /* * old db access API * (included here because these routines use dbAccess.h and their diff --git a/src/db/dbNotify.h b/src/db/dbNotify.h index 7547ad452..e3bac4bc8 100644 --- a/src/db/dbNotify.h +++ b/src/db/dbNotify.h @@ -16,6 +16,43 @@ of this distribution. #include "shareLib.h" +#ifdef __cplusplus + // + // for brain dead C++ compilers + // + struct dbCommon; + struct putNotify; +#endif + +typedef struct pnRestartNode { + ELLNODE node; + struct putNotify *ppn; + struct putNotify *ppnrestartList; /*ppn with restartList*/ +}PNRESTARTNODE; + + +typedef struct putNotify{ + /*The following members MUST be set by user*/ + void (*userCallback)(struct putNotify *); + struct dbAddr *paddr; /*dbAddr set by dbNameToAddr*/ + void *pbuffer; /*address of data*/ + long nRequest; /*number of elements to be written*/ + short dbrType; /*database request type*/ + void *usrPvt; /*for private use of user*/ + /*The following is status of request. Set by dbPutNotify*/ + long status; + /*The following are private to database access*/ + struct callbackPvt *callback; + ELLLIST waitList; /*list of records for which to wait*/ + ELLLIST restartList; /*list of PUTNOTIFYs to restart*/ + PNRESTARTNODE restartNode; + short restart; + short callbackState; + void *waitForCallback; +}PUTNOTIFY; + +int dbPutNotifyMapType (PUTNOTIFY *ppn, short oldtype); + /*dbNotifyAdd called by dbScanPassive and dbScanLink*/ epicsShareFunc void epicsShareAPI dbNotifyAdd( struct dbCommon *pfrom,struct dbCommon *pto); @@ -23,4 +60,6 @@ epicsShareFunc void epicsShareAPI dbNotifyCancel(PUTNOTIFY *pputnotify); /*dbNotifyCompletion called by recGblFwdLink */ epicsShareFunc void epicsShareAPI dbNotifyCompletion(struct dbCommon *precord); +epicsShareFunc long epicsShareAPI dbPutNotify(PUTNOTIFY *pputnotify); + #endif /*INCdbNotifyh*/ diff --git a/src/db/db_access.c b/src/db/db_access.c index 5087c1e7d..25f0fd376 100644 --- a/src/db/db_access.c +++ b/src/db/db_access.c @@ -57,6 +57,7 @@ #include "dbStaticLib.h" #include "dbBase.h" #include "dbAddr.h" +#include "dbNotify.h" #include "dbAccess.h" #include "dbCommon.h" #include "errMdef.h" diff --git a/src/db/db_test.c b/src/db/db_test.c index c76a24d03..e6069c2ac 100644 --- a/src/db/db_test.c +++ b/src/db/db_test.c @@ -41,6 +41,7 @@ #include "dbDefs.h" #include "errlog.h" #include "db_access.h" +#include "dbNotify.h" /* function declarations */