Experimental Physics and
| |||||||||||||||
|
As an example, say I read four bytes from a serial connection with an asyn record. I then want to grab the fourth read byte from the asyn record's BINP field with a subArray record. So I make the subArray record's INDX field have the value 3. Now say the asyn record has a read error and reads 0 bytes from the serial connection. When the subArray record processes, it sets its INDX field to 0. At this point, my database is broken because INDX has the wrong index for getting the fourth byte of the asyn record's BINP field. I've attached an example database that shows this problem. Run it on an IOC and run the following commands assuming a PV prefix of "xxx:": $ caget xxx:FourthByte.INDX $ caput xxx:ReadFourBytes.PROC 1 $ caget xxx:FourthByte.INDX In the first caget, INDX will be 3. In the second caget, INDX will be 0. I've attached a small patch against EPICS 3.14.8.2 base to fix this. But maybe I'm mistaken and the way it works is how it is supposed to work? My configuration is: * Processor: Intel Core Duo * OS: Mac OS X 10.4.10 * EPICS 3.14.8.2 * synApps 5.2 (with motor 6-2-2 + fixes, asyn 4-8 + fixes, sscan 2-5-6) Thanks, Lewis -- J. Lewis Muir Software Engineer CARS/IMCA-CAT # # Parameters: # $(P) PV name prefix (e.g. 17bm:) # record(asyn, "$(P)ReadFourBytes") { field(PORT, "noexistent") field(TMOT, "2.0") field(TMOD, "Read") field(NRRD, "4") field(IFMT, "Binary") field(FLNK, "$(P)FourthByte") } record(subArray, "$(P)FourthByte") { field(INP, "$(P)ReadFourBytes.BINP NPP MS") field(FTVL, "CHAR") field(MALM, "4") field(NELM, "1") field(INDX, "3") } *** src/rec/subArrayRecord.c.orig Tue Apr 1 16:02:03 2003 --- src/rec/subArrayRecord.c Thu Nov 8 16:52:46 2007 *************** *** 314,320 **** if (psa->nord <= 0) { status = -1; - psa->indx = 0; } return(status); } --- 314,319 ----
| ||||||||||||||
ANJ, 10 Nov 2011 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |