The GNU version of getopt.c that was being included in the Win32 version of libCom was replaced with a BSD version.
When a CA user asked for display or control limits as a float a 0 value was returned as -1.17549435E-38. This is now fixed.
The sequencer did not properly keep track of number of channels connected. It now checks if it is actually connected/disconnect before it increments/decrements the counts.
Several device support files have been removed that were not being built by default, some of which would not compile anyway. These are:
The access security configuration rules now accept quoted strings where just names were allowed previously.
A new shell command "ascar(int level)" is now available. It produces a report of the INP channel access connections. Level (0,1,2) produces (a summary report, summary plus unconnected channels, summary plus report of all channels)
The fields ZRST,...,FFST are now special(SPC_MOD). init_record now checks to see if state strings or values are defined during pass 0. Previously if another record had a DBR_STRING link to an mbboRecord it thought the field was a USHORT instead of an ENUM.
A syntax error in an xxInclude.dbd file is now noticed - make stops before creating the relevent output file.
Incorporated various changes to the vxStats device support by Andy Foster that have been in use at APS for over a year. This version adds the ability to see absolute memory use in addition to the percentage figures available before, and also gives information on the number of file desciptors in use. These new figures use the longin record type, thus a new device support entry is provided in base.dbd to enable it. See the comments in src/dev/vxStatsDev/devVXStats.c for more detail on the new facilities and an example database.
A new routine is available from dbScan.h that returns the scan period in seconds for a particular scan enumeration value.
Previously if a dbGetLink failed on one of the input links, dbGetLink was not called for the remaining links. Now it is.
put notify did not act properly if a record had disp=TRUE, i.e. if puts are disabled. It now returns S_db_putDisabled.
On POSIX systsems if a Channel Access application spawns off 3rd party software with an exec() call then all open file desriptors are inherited unless the close-on-exec flag is set for each file descriptor. A new wrapper function was created so that all sockets created in EPICS base will have the close-on-exec flag set on POSIX systems. The function which spawns the CA repeater with exec() used to close all open files except stdin/stdout/stderr. This step was no longer required and therefore was removed from the code.
The bug exists in probably in all previous versions of EPICS.
An IOC, low on network buffers, prints a message about an assert failure. The assert failure can cause the CA server or the CA client library to be compromised depending on where in the code it occurs.
All calls to getpeername() and getsockname() were checked and fixed as necessary to make certain that an assert() failure does not occur if failure status is returned, and that a proper response is made to this off-normal situation.
You must be running the logClient and logging to an iocLogServer and also temporarily run the IOC out of network buffers.
IP kernel locks up during a transient mbuf starvation situation. No network communication.
The fix was to not call logFdAdd for the log client's socket and instead create a specialized vxWorks device driver which calls errlogPrintf for each incoming message and then call logFdAdd for a file descriptor opened with that device driver. The desirable functional change being errlogPrintf's capability to discard messages when it gets behind (because of a transient mbuf starvation situation). The fix also means that any code that calls errlogAddListener, e.g. CMLOG, will now receive the logMsg messages.
The CA client library's disconnected channel search message minimum period now resets to a higher value if a channel disconnects or if a server beacon anomaly is seen. Up until this release the R3.13 behavior was to reset to the same search message interval used when a channel was created. The new behavior is closer to what is implemented in EPICS R3.14.
macParseDefns did not check for handle==NULL. The documentation for macParseDefns was not correct.
"event task" changed tp "event_task".
Remove some dead code. Clean up code for handling A24 DMA memory.
A bug in dbGetLink resulted in nRequest not being given the value 0 if the link is a constant link. This in turn caused the waveform record to always set NORD=NELEM. Thus if an application trys to write a waveform via the steps:
prset->get_array_info(paddr,&no_elements,&offset); write nNew elements into array >> prset->put_array_info(paddr,nNew);
This sets NORD = nNew. But because of the dbGetLink bug, the soft device support attached to the waveform record sets NORD to NELM.
This problem is fixed. The actual bug was in macros in dbAccess.h
The bug exists in EPICS 3.13.5, 3.13.6, 3.13.7
An IOC core CA server thread is found to be using excessive CPU possibly at elevated priority resulting from vxWorks priority inheritance scheduling. All attached CA clients will permanently disconnect from the IOC, and record processing may be disrupted if the threads priority is elevated. Elevated priority was observed in the one situation where the bug has been reproduced and identified so far.
This bug will occur only in circumstances where the CA client deletes a monitor subscription and the client's CA event queue in iocCore is 100% full. Since there is always space for each monitor subscription to place at least one update on the queue then the queue can only be full if *all* subscriptions for a particular client are sending subscription update events at a rate that is faster than the client is reading them. Therefore, specialized clients that have a small number of regularly updated subscriptions and that do not regularly call ca_poll() or ca_pend_event() are more likely to reproduce the problem.
IOC resident CA server
Symptom: IOCs produce unexpected "ca put callback timeout" messages, and may also crash.
Scope: The bug is present only in the IOC resident CA server. It was introduced in R3.13.6, and will be more likely to occur when there is a particularly heavy Channel Access put callback load.
dbCommon.dbd
UDF how has a promptgroup. This allows database configuration tools to mset UDF false.
mbboRecord
Field VAL now has a cvt_dbaddr method. If any state strings are defined the field type and dbr_field_type are declared ENUM. If no state strings are defined then the type is USHORT. Previously the types were always ENUM.
camacDev
ai and ao now support special_linconv. NOTE: NOT TESTED.
drvGpib.c
Add some cacheFlush statements
aiRecord and aoRecord: Setting eoff=egul
Instead of init_record executing code like
if ((pai->linr == menuConvertLINEAR) && pdset->special_linconv) { pai->eoff = pai->egul; }
It now executes:
if ((pai->eslo==1.0) && (pai->eoff==0.0)) { pai->eoff = pai->egul; }
aoRecord has a similar change
This was done so that old device support which does not implement special_linconv still works.
CA puts to disabled record
If a CA client issues a put to a disabled record then, when the record is enabled, database puts to the record will not make the record process until a CA put is again issued. This is fixed
dbb - database breakpoints
The database breakpoint facility was not working. This has probably been true for several releases. It is now fixed.
TPRO - trace processing
If dbProcess is called recursively by different tasks, it did not properly handle TPRO. Consider the following database:
record(ao,"mrkao") { field(OUT,"mrkai CA") field(TPRO,"1") } record(ai,"mrkai") { field(TPRO,"1") }
If a channel access put is sent to mrkao, no message is issued when mrkai is processed.
This is now fixed.
TSconfigure
If in your st.cmd file you issue the command.
TSconfigure(0,0,0,0,0,0,1)
And set the TSE field of any record to a non zero value, then a crash will occur when recGblGetTimeStamp is called.
This is now fixed.
calcoutRecord
nsev not sevr must be checked to decide if dbPutLink should be called.
This is now fixed
calcPerform
This now returns a non zero value if the result is nan (not a number).
dbCa
Improved diagnostic message.
CA server (rsrv)
Fixed race condition occuring when a put notify is canceled by a ca_clear_channel at the same instant that it completes. This problem was introduced in R3.13.5.
dbNotify
If a request was made to restart a putNotify but another putNotify started before it, then it was put on the restartList twice. This resulted in the cbLow task getting into an infinite loop.
dbConvert and dbFastLinkConv
When a double precision 0 is converted to a float, instead of 0 the float value becomes -FLT_MIN, which is a very small ,value, e.g. -1.175494e-38.
iocInit and initHooks
initialProcess is now called before interruptAccept. This means that initial processing will be done before periodically scanned and I/O Inter scanned record s start processing. This also changed the order of two of the steps in initHooks.h
drvBitBus
A check is made that Irqvector is a multiple of 4.
dbCa.c
dbCaGetLink must return -1 when settinf sevr to INVALID or a FPE may be rasied on a powerPC.
devMbboDirectCamac>/b>
The call to cfsa was passing val as an argument. It is changed to rval. See tech-talk message from Noboru Yamamoto Nov 2001.
mbbiRecord
All existing manipulations of UDF in process() are removed and one udf is set FALSE when the raw value is successfully read.
selRecord
In do_sel udf is not set false at the beginning. If selm has an invalid value recGblSetSevr(psel,SOFT_ALARM,MAJOR_ALARM) is called.
devMz8310
Changes were made so that this works on the powerPC. Improved IACK code.
CA Client Library
Symptom:
A database field contiguous to a database field in the with an unsigned integer type is mysteriously damaged.
Scope:
Almost all recent EPICS versions that promote the native type of unsigned database fields to the next larger integer or floating point type, because Channel Access clients use only signed types, are effected.
The problem is further restricted only to Channel Access clients that run within a vxWorks IOC communicating with local database fields stored in some unsigned integer type.
Furthermore, the CA client must enter a subscription with an external type that is identical to the CA "native" type only when the CA "native" type is promoted to some larger signed type from the fields unsigned integer field type.
The majority of EPICS users use only two CA client programs that attach to local in-memory process variables: The sequencer and the CA based database links. Both of these clients install monitor subscriptions that include timestamp and or alarm information. Therefore, they do not monitor in a native promoted type as described above, and are not involved.
IOC Resident CA Server
Symptom:
A Channel Access client, such as medm, does not receive its first monitor subscription update. An "events lost" message will show up on the IOC's console, and in the log server.
Scope:
EPICS R3.13.5 based IOCs only.
A client must issue a large number of monitor subscription install requests immediately after a large number of monitor subscription uninstall requests.
This problem was discovered during regression testing of EPICS R3.14.
Symptom:
The channel access server prints messages about a corrupt semaphore or a bad file descriptor when a client forces a disconnect before its put callback request completes.
Scope:
This bug has probably existed in every version of EPICS supporting put callback requests. The problem may have been benign until the client disconnect monitor cleanup code became more efficent in EPICS R3.13.5. The problem was detected only on power PC systems. A similar problem potentially occuring when a channel is deleted before its put callback request completes was also fixed.
convertRelease and checkRelease
New applications created with makeBaseApp.pl now have the functionality of the makeConfigAppInclude.pl and makeIocCdCommands.pl scripts combined into a single convertRelease.pl script.
The new script also provides consistency checking of the entries in the config/RELEASE file, so that gnumake will stop with an error report if a definition in any other <supporttop>/config/RELEASE file is different to the same definition in this application. This checking can be disabled by editing config/Makefile.Host.
Applications created using earlier versions of EPICS will continue to work as before and will not benefit from the consistency check functionality.
devAiSoftRaw and devAoSoftRaw
ai and ao records using DTYP="Raw Soft Channel" can have their EOFF and ESLO fields set manually at design or run-time, and these values will be used when LINR=LINEAR. The same applies to any device support that doesn't provide a special_linconv() routine; if special_linconv() is provided however, the original behaviour occurs (EOFF is set to EGUL and ESLO is calculated by that routine). The ESLO and EOFF fields now have CA monitors posted if their value is changed by the special_linconv() routine.
cac_recv_task
Increased stack size from 4096 to 819l.
drvTS
Now uses osiSock for to handle implementation diffences
Constant Links
Hex and octal constants are now accepted for constant links. recGblInitConstantLink uses %i instead of %u for unsigned types. This is so that hex constants are accepted. %u does not accept hex. dbPutString makes a link constant if either strtod or strtol eats entire string. Previously only strtod was used.
Breakpoint tables
A bug that caused an invalid conversion when the raw value is greater than the maximum table value is fixed. If the raw value is outside the table, the aiRecord and aoRecord now specify a severity of MAJOR_ALARM instead of INVALID_ALARM.
VAL field a promptgroup
The VAL field of the following recordtypes can now be given values by database configuration tools: aiRecord, aoRecord, biRecord, boRecord, calcoutRecord, longinRecord, longoutRecord, mbbiDirectRecord, mbbiRecord, mbboDirectRecord, mbboRecord.
Several of the changes have been made to help prevent exceptions on powerPcs when conversions are made from float to double.
CA Server Bug
Symptoms:
Clients disconnect unexpectedly when canceling event (monitor) subscriptions using ca_clear_event(), but this may not be noticed because the problem is probably rare under low or moderate load, and because CA clients automatically reconnect. The problem was only reproducible here under heavy load presented when the R3.14 client side regression tests were run on a fast Linux workstation. For example, when the tests were run on a 500 MHz NT host I was unable to reproduce the bug. On vxWorks you may see threads with the name "CA client" and also "CA event" even if there are no clients connected (the casr diagnostic will also incorrectly report that clients are connected). As the IOC stays in long term operation without a reboot, and depending on the frequency of occurrence at your site (if any), you may also notice that memory and file descriptors have been lost.
Background:
The problem was discovered when regression testing EPICS R3.14. The cause was a deadlock occurring when a CA event (monitor) subscription was canceled when the CA circuit was simultaneously in event (monitor) flow control mode and the event (monitor) subscription also had a corresponding update in the queue.
PPC float to double exceptions
Several of the changes have been made to help prevent exceptions on powerPcs when conversions are made from float to double.
aaiRecord aaoRecord aiRecord aoRecord boRecord calcRecord calcoutRecord compressRecord dfanoutRecord egeventRecord selRecord subArrayRecord subRecordwaveformRecord
All DBF_FLOAT fields have been replaced by DBF_DOUBLE
dbConvert dbFastLinkConv db_access
Conversion from double to float checks for exponent too large.
dfanoutRecord.c longoutRecord.c stringoutRecord.c
OMSL did not work correctly for constant links.
compressRecord
READ_ALARM changed to LINK_ALARM
Database Channel Access Links
A message was sent to errlog whenever the connection to the server was lost. This message is no longer generated.
drvEpvxi
National Instruments MXI-2 devices are now fully supported on both 68K and PowerPC (the PowerPC BSP must provide code for the vxWorks intVecGet() routine though). PowerPC CPUs that have a Universe VME interface chip will have problems driving MXI-1 boards, although they can be made to do so by setting the variable 'vxi_use_failed_mxi' to a non-zero value in the st.cmd file before iocInit() and ignoring any warnings about the MXI-1 board having failed its self-test.
If a VME-MXI-2 board will not be installed as the VME system controller read the NOTES: towards the top of the driver source for an essential warning.
There is special code for the National Instruments CPU030 board in this file, which is now only included when compiling for that particular CPU board (an entry in config/CONFIG.Vx.niCpu030 enables this).
Put Notify
A bug in dbNotifyCancel could cause a problem if a channel access client disconnects while put notifys are outstanding.
dbAccess
A bug was fixed that was related to dynamically changing lock sets.
The record support put_array_info is called after the a put only if the put is successful. Previosuly it was always called.
breakpoint tables
Breakpoint values are doubles rather than floats.
devVXStats
Improved algorithm for cpuUsage
Symptom: CA clients on all versions of EPICS with unresolved channels broadcast search messages too frequently if an EPICS R3.13.3 server is present. This bug does not occur if an R3.13.3 server is not present.
Changed: CA server now sends beacon messages which uniquely identify the server address. The CA repeater was also upgraded to detect, and fix, any problems of this nature.
Symptom: Undefined symbols show up when EPICS R3.13.3 was loaded into a PC IOC running Tornado II.
Changed: Conditionally compiled out references to architecture
inappropriate system calls.
dfanoutRecord
These did not properly set monitors when delta=0x80000000. This happened when the record was attached to a 32 bit digital device .
Access Security TrapWrite feature
Access security now provides the ability to trap write requests coming from a client. RULEs in the access configuration files accept an option argument NOTRAPWRITE or TRAPWRITE. For example:
RULE(1,WRITE,TRAPWRITE)If the additional argument is not specified the default is NOTRAPWRITE.
The purpose of this new facility is to allow things like logging Channel Access writes. Epics base itself does not provide this ability but only the hook needed by such a facility. DESY has developed a facility that logs CA puts. The trap writes feacure allows the DESY facility to be implemented without any changes to epics base. In addition it allows the user to decide what should be logged.
This new facility will be described in more detail in the 3.14 version of the Application Developer's Guide.
dbAccess
When obtaining graphic, control, and alarm limits, the destination values were not initialized. If record support did not set values then the unitialized values were returned. This caused exceptions to occut on powerPCs. The values are now initialized to 0.
drvTS.c
MAKE_INC_TARGET_FIRST=YES
NOTE: If your applications relies on header files being installed as the first step of building, you should reorganize the order of building. The 3.14 releases of base will no longer support the INC step.
Channel Access Changes
Fixed the RISC architecture specific problem in iocCore which results in an intermittent and infrequent assert failure with this message: "assert (ev_que->evUser->nDuplicates>=1u)". This was actually fixed in release 3.13.2.
All structure members with names "m_type" were changed to "m_dataType" to avoid a macro name compile time conflict present in the SENS IP kernel supplied with Tornado II and optionally in Tornado I.
The network interface query code used by Channel Access to auto-configure its address list was modified to be compatible with changed API's present in the SENS IP kernel supplied with Tornado II and optionally inTornado I.
DBR_PUT_ACKT and DBR_PUT_ACKS
This now works for ca_put_callback as well as ca_put.
Spaces in task names
Task names no longer have any blanks
tsLib.h
Made tsStampFromLocal and tsStampToLocal public rather than private.
dbAccess
The following new routines have been added.
dbGetControlLimitsmenuAlarmStat.dbd
dbGetGraphicLimits
dbGetAlarmLimits
dbGetPrecision
dbGetUnits
dbGetNelements
dbGetSevr
dbGetTimeStamp
choice(menuAlarmStat,"NO_ALARM")
is changed to
choice(menuAlarmStatNO_ALARM,"NO_ALARM")
recGblResetAlarms
a monitor for the STAT field is fired if either the STAT or SEVR changes. Previously a monotor was fired only if the STAT changes.
dbAccess.c
In dbPutLinkValue, if the (out)link has MS property, the old severity was propagated instead of the actual one. This is fixed by calling recGblSetSevr with NSEV instead of SEVR of the source record.
mbboDirectRecord
devVXStats.c
The stack size for cpuUsageTask was increased. The precious stack size was too small for mv172s, which do not have a separate interrupt stack like the mv167. The same problem may exist on other processors such as the powerPC.
dbel.c
It was incorrectly reporting VALUE, ALARM and LOG for all events.
longoutRecord
Added fields drvl and drvh
aiRecord, calcRecord, calcoutRecord, selRecord, and subRecord
In alarm the definitions of hihi, high, low, lolo; are changed from float to double.
aoRecord.c
dfanoutRecord.c
A dbPutLink is attempted for all links even if a put for a previous link fails. If a dbPutLink fails recGblSetSevr(pdfanout,LINK_ALARM,MAJOR_ALARM) is called.
dbStaticLib
When dbPutString writes to the VAL field then udf is set false.
cvtFast
cvtLongToHexString now puts 0x in frount of the number and
cvtLongToOctalString writes a leading 0.
There was a bug when converting ascii string format to time stamp. The bug involved the year 00 appeared in the ascii string
Channel Access
1) A severe problem where the CA client did not exit a loop sending UDP to a list of addresses if an error condition was returned from the system call which sends a UDP frame was fixed. This problem was discovered during load testing, and will be more likely to occur under heavy network loading conditions.
2) A problem where the client library could fail and use a deallocated data structure if a connection dropped while it was waiting to send a message to a client was fixed.
3) The CA client now maintains a congestion avoidance threshold on UDP search transmissions similar to the congestion avoidance algorithm employed by modern version of TCP. There are also some small changes related to how the search counters are maintained without allowing them to overflow. This patch was made in R3.13.1 because I originally identified it as the fix for (1) above, but it turned out to not be the root cause.
4) A bug fix was made for a problem where the CA repeater was inheriting on HP-UX, and possibly other UNIX systems that are not Solaris, certain open file descriptors when fork()/exec() are used to start the CA repeater.
5) Changes that allow CA to work on Microsoft Visual C++ 6.0 (which includes a new win sock DLL and some changes in esoteric parts of the socket API).
6) always inform client of "no write access" for a SPC_NOMOD fields.
7) calls to ca_printf removed from rsrv.
8) prevent UDP daemon from running damaged messages with TCP protocol and visa-versa
9) use ipAddrToA() so that address print out does not come out byte swapped on the PC
10) improved debug messages and added diagnostics
11) don't send an exception to client when bad request received over UDP.
config
A ca exception handler was added. Thus exceptions will no longer cause the asCa task to suspend.
dbCa
A ca exception handler. Thus exceptions no longer cause dbCa task to suspend.
dbScan.c
pevent_scan_list->scan_list.lock was not initialized. Amazingly it did not cause a crash. Note that the lock is only used when the scan mechanism of records are dynamically changed.
dbCommon.dbd
dbStaticLib
Tables names were previously forced to be alphanumeric. This restriction is removed.
drvTS.c
drvSup.h
removed definition for reboot.
dbNotify
If dbPutNotify called dbProcess and dbProcess returned an error the notify completion callback was called twice. This bug is fixed.
drvBB232
This support was defining storage twice. A bug in the current gcc compiler supplied with tornado does not properl;y compile such code. The extra definitions are removed.
aiRecord
hyst and lalm changed from float to double
dfanoutRecord
hyst, lalm, hihi, high, low, lolo all changed from float to double
compressRecord
compressALG_N_to_1_Median (compress keeping median value) added.
mbbiDirectRecord
When just the record's severity changed, only monitors on the VAL fields were posted, no monitors on the single bit fields.
devApsEr.c
ErGetTicks now locks while updating ticks
devCommonGpib
all mallocs changed to callocs. This is needed for the new unbundled bitbus support.
bitbus support
This support is now unbundled. DO NOT use the version in base. This includes the following
drvBBMsg.c drvBBMsg.c drvRs232.c drvTy232.h
Removedfrom base. Seemed to be old duplicate version of drvBB232.c or not used at all.
devXxDig500Msg232.c
removed, was replaced by the digitel record type & device support
CAN and IPAC
This support has been available for some time as an unbundled product. It is not longer included with base.
Allen Bradley
The allen bradley support has been available for some time as an unbundled product. It is not longer included with base.
devOpt support
The following gpib support modules have been changed to fix compiler bug for vxWorks 5.3:
getopt() changed to getopt "";
rc2.logServer
Moved export statements to the right place.
access security
Issue better error message if access security initialization fails.
makeBaseApp
Under certain conditions (an input link referencing a PV on another ioc and an unusually long ioc initialization), the calcout record would cause an error during iocInit by attempting to dbScanLock a record prematurely. This anomaly has been resolved with this version. No changes to the functionality of the calcout record were made.
dbLoadTemplate
Allow pattern with no substitutions.
devAaoCamac.c
This had an error that prevented it from compiling
If either of the environment variables EPICS_IOC_LOG_PORT or EPICS_IOC_LOG_INET are not defined then iocLogDisable is set true, i.e. logging is disabled. Also in the epics base distribution EPICS_IOC_LOG_FILE_NAME and EPICS_IOC_LOG_INET are set to null.
dbCaGetTimeStamp
This is a new routine for database channel access links.
drvTS
The routine TSsetClockFromUnix was made global. Calling it forces a
resynchronization with a host time server. This is useful to
force a master timing ioc to resynchronize.
Several bugs were fixed. Previously async clients did not sync properly with a master timing ioc. Also if an async client syncing with a unix/ntp server got out of sync by > 1 sec then it could get out of sync by 1 to 20 seconds for an indeterminate period of time.
task_params.h
Task priorities were changed so that no epics task has higher priority than netTask. Definitions for IOEVENTSCAN and TIMESTAMP were removed.
histogram record
Added new field PREC for display of double and float fields ULIM, LLIM, SDEL, SVAL, SGNL, and WDTH. Added unsigned long fields HOPR and LOPR for display of VAL array counts. Changed SDEL field from SPC_NOMOD to SPC_RESET to allow start and stop of the watch dog timer.
Sequencer
The lex definitions have been changed so that definitions like
#define ERRVALUE 9.90E+09
are accepted.
Initial values for static variables are now honored. Previously the syntax was permitted but the initial value was ignored. Note that initial values will give a compilation error if the "recursive" option is used because the assignments are within the body of a struct {} definition; it seemed worthwhile supporting the syntax for the non-recursive case.
devMbbiDirectSoftRaw, devMbbiSoftRaw, devMbboDirectSoftRaw,
devMbboSoftRaw
SHFT was made a prompt field and also modifiable. The VAL field of mbboDirectRecord is now modifiable.
If the fields NOBT and SHFT are given values then this device support will honor the MASK and SHFT fields just like hardware device support. To keep compatibilty with old databases, if NOBT is 0 during init_record, mask is set to the value 0xffffffff. Thus old databases will act like previously unless the nobt field was set to a non-zero value.
calcoutRecord
No longer calls dbScanLock until interruptAccept is true.
breakpoint tables
Entering negative values failed. This bug is fixed.
dbl("<record type>","<output file>","<field list>")
The vxWorks console command dbl now allows an additional argument, which is a list of field names.
For example
iocexample> dbl "ai",0,"DESC SCAN"
mrk:aiExample,"Analog input","Passive"
mrk:aiExample1,"Analog input No. 1","Passive"
mrk:aiExample2,"Analog input No. 2","Passive"
mrk:aiExample3,"Analog input No. 3","Passive"
The Application Developer's Guide is a major revision of the 3.12 edition. The latest version is for beta12 base release. It is available in pdf (adobe acrobat reader) and in postscript. The pdf format is nice for online viewing and postscript for generating a hard copy.
LANL has a revision of the Record Reference Manual available. See the LANL EPICS documentation.
The document "EPICS IOC Applications: Building and Source/Release Control" provides guidlines for developing applications with 3.13.
Before switching applications to beta12 it is STRONGLY recommended that you execute:
cd <top> gnumake clean uninstall
ifndef T_A T_A = $(HOST_ARCH) endif #ifndef T_A
<base>/templates/makeBaseApp/top/config
USER_DBDFLAGS RECTYPES DBDEXPAND DBDNAME MENUS
iocBoot/iocxxx no longer contains soft links. Instead the following is done:
A performance test showed that executing
in a 25MHZ mv167 took (4.4 ,7.8) microseonds when (semBCreate,semMCreate) was used. The extra options as well as allowing a task to lock recursively are worth the difference in performance.semTake(sem,WAIT_FOREVER); semGive(bsem);
363000000
Now it is converted to
363000000.1
All you RF folks can cheer.
The nextField routines used by tsSubr were moved inside tsSubr.c and made static routines.
See the new WWW documentation on Application Source Release for details
-I nnn::mmm # Current directory is between nnn and mmm -I :nnn # Current directory is first -I nnn: # Current directory is lastThe lex grammer was changed so that quoted strings can contain any ascii character except a quote. A quote itself can be given as the escape sequence \". This same change was made to dbLoadRecords and dbLoadTemplates.
For all fields in a .db file, a non null string is considered as not the default.
For winNT the path seperator is a ;
Field attributes (psuedo fields) are now supported. In particular RTYP (record type) and VERS (version) are now supported. In addition a new request type DBR_CLASS is supported. See Application Developer's guide for details.
#device(ai,AB_IO,devAiAbSlcDcm,"AB-SLC500DCM") #device(ai,AB_IO,devAiAbSlcDcmSigned,"AB-SLC500DCM-Signed") #device(ao,AB_IO,devAoAbSlcDcm,"AB-SLC500DCM") #device(longin,AB_IO,devLiAbSlcDcm,"AB-SLC500DCM") #device(longout,AB_IO,devLoAbSlcDcm,"AB-SLC500DCM")
ld < bin/initHooks.oIf you have your own version of initHooks.c it should be changed to support the new features. At a minumum the statement
void initHooks( int state)must be changed to
void initHooks( initHookState state)
The following, which is designed by Benjamin Franksen at BESSY, is now the recommended method:
A new field EOFF exists. The new linear conversion algorithm is now
VAL = AVAL * ESLO + EOFFAVAL is the raw value adjusted by ASLO and AOFF.
Thus device support should now compute ESLO and EOFF instead of ESLO and ROFF.
For example let an ADC be a 16 bits adc with raw values between -32767 and 32767.
ESLO = (EGUH - EGUL)/65535.0; EOFF = 0.0;NOTES:
VAL = AVAL * ESLO + EGULThe original bi-polar adc device support modules added a "bias" to the raw value so that the raw value is >= 0. When they were written neither RVAL or EOFF existed.
device(ai,INST_IO,devAiVXStats,"VX stats") device(ao,INST_IO,devAoVXStats,"VX stats")The INP fields now have the form
field(INP,"@memory") field(INP,"@cpu") field(INP,"@fd")The OUT fields now have the form
field(OUT,"@memoryScanPeriod") field(OUT,"@fdScanPeriod") field(OUT,"@cpuScanPeriod")The source file has comments showing a sample database.
VX_WARN_YES = -Wall -pedantic -ansiMost warning messages have now been eliminated. The remaining messages should not be removed without looking hard at code.
device(ai,VME_IO,devAiVXStats,"VX stats") device(ao,VME_IO,devAoVXStats,"VX stats")Thus if an application has an old base.dbd and baseLIBOBJS including definitions for this device support they must be modified.
In porting EPICS to multiple architectures, the previous method of using utilities to convert the database definition files to a binary file (default.dctsdr) caused problems. The problem is that the binary file is created on one architecture and used on another. This has worked so far for sun4 and hp hosts combined with motorola 68xxx processors. As support for more host and more ioc architectures is developed problems are appearing. This paper describes changes that solve the problems.
Because the changes result in extensive changes to database access, other changes are also made. The file syntax is changed. The internal database structures are simplified and also changed to make it easier to support runtime add/delete of record types and record instances.
Database configuration and utility tools access the database via the static database access library. This library reads the files. It provides routines for reading the information in the database and for creating and modifying record instances. Database definition files can be read incrementally.
Other database configuration tools (capfast, relational database systems, object oriented databases, etc.) can also be used as long as they generate record instances in the format described below. In this case, however, it is still necessary to generate the other files because they are needed by database access and for record and device support modules.
Tools are provided that generate C code from the database files. Header files are generated for menu and record type definitions. These header files are used by record and device support. In addition the record type definitions contain code which computes field offsets and sizes and record sizes. This code is compiled by the same cross compiler that is used to compile other ioc code. Thus cross platform compatibility is achieved.
In order to initialize an ioc, all files needed by that ioc have to be loaded. It is also necessary to load the record/device/driver support modules.
Everything is designed so that the following are possible:
Other changes have been made while the opportunity was available.
The menu choices replace the existing global, record, and conversion choices. The global and record choices are very similar and thus are easy to combine. The method of handling the old conversion choices is described below. That section also describes the breakpoint tables.
The record type description format has been completely changed. It now has a "real" syntax. It should be MUCH easier to generate new definitions.
The device choice and driver support definitions are defined so that it is easy to provide incremental definitions.
The record instance format is an extension of the 3.12.beta13 and later GDCT .db format.
Path and include statements are supported. This provides a powerful tool for combining definitions from many sources. The path is a unix style path, i.e. a colon separated list of directory names.
The allowed conversions are:
The user prepares files in one of two formats: The first is just a list of "raw value, eng units value". The second format is a file with a header line followed by a table of raw data values that represent data at equally spaced engineering unit values. In either case the ascii data is converted to an internal binary format containing breakpoint tables. This data is part of default.dctsdr.
Here is how breakpoint table are now handled.
The document "EPICS IOC Applications: Building and Source/Release Control" describes a utility makeBaseApp which can be used for small applications. It also provides guidlines that can be used for large applications.
#define GEN_SIZE_OFFSET #undef GEN_SIZE_OFFSET
pai->simm = pai->siml.value.value; is changed to recGblInitConstantLink(&pai->siml,DBF_USHORT,&pai->simm);NOTE: This change also has to be made to any device support that manipulates constant links. Normally this is only soft device support.
Because it is now possible to distinguish between null links (links that were never given a value) and CONSTANT links with the value 0, the code now handles initialization of constant links in a uniform manner. Several record types in previous versions had special code to handle the case of the value 0 for constant links. These have been changed.
OLD ROUTINE REPLACEMENT dbFindRecdes dbFindRecordType dbFirstRecdes dbFirstRecordType dbNextRecdes dbNextRecordType dbGetRecdesName dbGetRecordTypeName dbGetNRecdes dbGetNRecordTypes dbFirstFielddes dbFirstField dbNextFielddes dbNextField dbGetChoices dbGetMenuChoicesFor now the old version will be supported. After one release they will go away.
MENUS += menuXXX.h RECTYPES += xxxRecord.h
All code calling these should be removed. They are no longer needed.
These are replaced by
dbGetLink dbPutLink
long dbGetLink(struct db_link *,short dbrType, void *pbuffer,long *options,long *nRequest);The last two arguments can be 0. options=0 means no options. nRequest=0 means scalar, i.e. retrieve one value.
long dbPutLink(struct db_link *,short dbrType, void *pbuffer,long nRequest);
The Add routines are no longer needed. The Get/Put routines are replaced by dbGetLink/dbPutLink.
database(x) { nowhere() { } } or database(x) { }These statements must be removed. They were in pre 3.12 releases.
record(fanout,name) { field(SELN,"1") field(SELL,"0") }Such definitions can be fixed by either completly removing the link definition or changing the value from "0" to "".
here is a complete list of record types and fields that may have this problem:
grep SELL */*.dbThis assumes that you are in directory that contains subdirectorys containing .db files.
If link_status command fails (3 times in succession) adapters are now immediatly declared down.
For btRead and btWrite, The driver now enforces a timeout of 5 seconds which is 1 second more than scanner itself enforces. This is so that if scanner throws away a BT request it will still timeout.
For btRead and btWrite is is no longer permissible to issue a new btRead or btWrite from tha callback routine.
The on line doc has the following two changes: