|
|
Experimental Physics and
| ||||||||||||||||
|
|
#define epicsTimeEventBestTime -1 #define epicsTimeEventDeviceTime -2 #define epicsTimeEventLinkPropagate -3 If it is then I suggest a slight change from what you recommended. The rules would be. 1) Transfering time stamps only works across database links. 2) dbScanPassive transfers the time stamp ONLY if the scanned record is passive. This replaces your suggestion to modify recGblFwdLink and dbScanFwdLink 3) dbPutLinkValue ??? What to do. Output to asynchronous records are a problem (but always have been!!). The code is
status=dbPut(paddr,dbrType,pbuffer,nRequest);
if(ppv_link->pvlMask&pvlOptMS)
recGblSetSevr(pdest,LINK_ALARM,psource->nsev);
if(status) return(status);
if((paddr->pfield==(void *)&pdest->proc)
|| (ppv_link->pvlMask&pvlOptPP && pdest->scan==0)) {
/*if dbPutField caused asyn record to process */
/* ask for reprocessing*/
if(pdest->putf) pdest->rpro = TRUE;
/* otherwise ask for the record to be processed*/
else status=dbScanLink(psource,pdest);
}When should the time stamp be transfered? I will say only when if((paddr->pfield==(void *)&pdest->proc)
|| (ppv_link->pvlMask&pvlOptPP && pdest->scan==0)) {Is successful. If this is not successfull then the put does not cause the record to process. In this case I see no reason to modify the time stamp. Thus the problem comes down to the statements /*if dbPutField caused asyn record to process */
/* ask for reprocessing*/
if(pdest->putf) pdest->rpro = TRUE;
/* otherwise ask for the record to be processed*/
else status=dbScanLink(psource,pdest);In this case the put will cause the record to process but it may be delayed because an asyn record has not completed. If the time stamp is transfered before the above code then the asyn completion will have the new time stamp not the timestamp for the original request. If the timestamp is not transfered at this point there is no place to keep it. Also is it worse to replace the time stamp than to replace the VAL field? I don't think so. Thus perhaps the above code should be
Marty Kraimer Carl Lionberger wrote: The diagnostic people here at SNS (where I'll be for the next couple of years, right down the hall from David Thompson) have been asking for even more- They want time stamps to be able to propagate over forward links and, I assume for more generality, dbPutLinks. I start with the assumption of the code Marty gave(in my working code I've been calling it "SPECIAL_TIME_EVENT" and making it -2) and then have had several routines in dbAccess.c and recGbl.c propagate the time if its set. I've been working on a copy of 3.14.beta0.
| ||||||||||||||||
| ANJ, 10 Aug 2010 |
·
Home
·
News
·
About
·
Talk
·
Base
·
Modules
·
Extensions
·
· Distributions · Download · Documents · Links · Licensing · |