All major functionality that will be in R3.13 is now in place. It has been build on solaris, sunos, HPUX, alpha, SG, and winXX. There are still some c++ related problems. In particular c++ code does not build properly on SGI. Thus we are not yet ready for the first official 3.13 release. Since none of the c++ code is necessary for IOC applications this should not stop anyone from upgrading to 3.13.
The Application Developer's Guide is a major revision of the 3.12 edition. All Application Developer's should get a hard copy (from the postscript version) and read it. It describes the features in the latest release. The latest version is for beta11 base release.
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.
Epics base now builds on windows platforms
The gdd library and the portable channel access server now build on all platforms, except SGI and cygwin32, listed above. This also means that C++ is supported on these platforms.
The chapter "Building IOC Applications" is gone. It is replaced by the document "EPICS IOC Applications, Building and Source/Release Control". Other changes are minor. Following is a brief list:
NOTE: The initHooks described in the appDevGuide is not in beta11. In beta11 initHooks is the same as previous releases. The new version will be in the next release.
All of base except drv/old is now being built with
VX_WARN_YES = -Wall -pedantic -ansi
Most warning messages have now been eliminated. The remaining messages should not be removed without looking hard at code.
get_control_double routine returned incorrect values for fields INDX and NELM.
This is now renamed devVXStats. The new device definitions are:
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.
This is removed from base. It is for APS designed and build VME create system monitoring. The support code is available from APS if needed. NOTE: In some beta releases baseLIBOBJS, had an include for devSysmon.o. Applications using an old version of baseLIBOBJS will not build until this statement is deleted.
The enums for menus had a comma after last item.
recGblInitConstantLink for sgl was referencing wrong field.
This did not properly support multiple clients in multi-thread environment.
Modified to be faster.
Use maxCards from module_types.h instead of a #define
Allow CALC to be 40 characters. Increase rpbuf from 184 to 200
Add call to refresh_bits.
Bx becomes no prompt for mbbi and prompt for mbbo. It was the reverse before.
A new record type that replaces old wait record. It is like a calc record with an output and a delay. It makes the wait record obsolete.
dbGetPdbAddrFromLink is a new routine. It returns NULL for all except LINK_DB links, for which it returns the address of the associated DB_ADDR structure.
dbLoadDatabase, dbLoadRecords, and dbLoadTemplate all allow the standard C escape sequences in quoted strings. For example a string can contain: "\x00 \27 \t" Thus these sequences pass though the lexical analyzer .
A new routine in libCom. It is used to translate escape sequences. It is defined in file epicsString.h. It typical place to use this is on parm fields that contain escape sequences like "\x00 \27 \t".
iocs with big databases were taking a long time to boot. It was discovered that allocating and then freeing small amounts of memeory frequently resulted in a VERY long memory free list. This is now fixed.
init_record now initialized the RVAL field.
Benjamin Franksen at BESSY reported a serious bug in the routine ProcessCallback (not used in base). It has been fixed.
postfix and calcPerform (used by calcRecord) have been changed so that a 0 byte now ends the postfix expression. Also if postfix detects an illegal expression it generates a 0 length postfix string. When calcPerform is given a 0 length string it returns a error status. Thus calcRecord no longer causes the IOC to crash if an illegal CALC fields is loaded.
Many other minor problems, bugs, etc. were fixed.
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.
EPICS defines a set of database file formats. In addition any of these files can contain include statements. For each ioc, the application developer will create a set of files specifying the record types, devices, and drivers needed for that ioc. Normally a master file will be created which consists of include statements that bring in record, device, and driver definitions. Default configurations can be provided for new users or for particular applications.
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:
An additional feature is that, for database configuration tools, record instance numeric fields and menu fields are stored as character strings. This solves the following problems.
Another feature is is that it is now possible to distinguish link constants with a value of 0 from links that have never been given a value.
Other changes have been made while the opportunity was available.
Formats are defined for the following:
See the Application Developer's Guide for details.
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.
NOTES
The following tools are provided:
For all utilities the required database definition files are generated from a dctsdr file from a previous epics release. A dctsdr file can be specified or else the utilities can be run in a directory which contains default.dctsdr (or a soft link with that name). sdr2recordtype also requires the header file generated by a previous epics release.
Let's briefly review database conversion, i.e. the LINR field for ai and ao records.
The allowed conversions are:
The main complication results from the breakpoint tables. Previously EPICS handled breakpoint tables as follows:
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.
One other comment needs to be made about conversions. The Allen Bradley device support for the IXE module uses the LINR field in a non standard way. This was a mistake but compatibility must be maintained. Thus menuConvert contains a lot of choices used only by the IXE device support.
At the present time There are at least three Application Source/Release Control Systems in active use. The old technique of having cat_ascii and replace_ascii directories no longer work. In addition makesdr no longer exists. The new system offers developers far more flexibility but it also means that each Application Source/Release Control system has to be modified to take advantage of the new capabilities. Again the changes in RULES and makeBaseApp should make this task easier.
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 dbGetMenuChoices
For now the old version will be supported. After one release they will go away.
MENUS += menuXXX.h RECTYPES += xxxRecord.h
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);
All record instances must be capable of being loaded into an ioc via dbLoadDatabase, dbLoadRecords, or dbLoadTemplate. This is the same format that dbLoadRecords and dbLoadTemplate used in 3.12 releases. Note that if any files contain the statements:
database(x) { nowhere() { } } or database(x) { }
These statements must be removed. They were in pre 3.12 releases.
Release 3.13 is now capably of distingushing between a null link (a link that is not given any value at all) and a constant link with the value 0. This cause problems for some old record instance files. For example if a record instance is defined as:
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:
pulseCounterRecord
pulseDelayRecord
pulseTrainRecord
selRecord
seqRecord
stringinRecord
stringoutRecord
A good way to find these problems is to use grep. For example:
grep SELL */*.db
This assumes that you are in directory that contains subdirectorys containing .db files.
The command dbLoad is no longer supported. The new method is to issue one or more dbLoadDatabase commands and any combination of dbLoadRecords and dbLoadTemplate commands.
Many changes have been made to the EPICS ioc test routines, i.e., routines given to the vxWorks shell. Please read the chapter "IOC Test Facilities" in the Application Developer's Guide for details.
The config environment has been extensively changed. BASE now has its own set of config files. Extensions will be able to use the base config files (for the version of base it is built against) and add it's own definitions. Changes to extensions will come at a future time.
It is now possible to compile 3.13 EPICS base with the gnu C and C++ compilers. A C++ compiler that properly supports templates is required to build the new ca server and the gdd library.
Thanks to William Lupton at KECK the log server will now (under the latest EPICS 3.13) obtain a new directory for the log file in response to SIGHUP.
Thanks to Kim Gillies, Bret Goodrich, and others at NOAO a problem has been discovered and fixed in the 3.12 CA repeater under solaris.
A new CA server C++ class library is available. The server library is in libcas.a. The API is described in casdef.h. Doc is in progress. An example server tool can be found at base/src/cas/example. The server has been tested under sunos4 and solaris. A multi-threaded version of the new server for vxWorks is in progress.
The macro substitution library discussed in tech-talk is now part of epics base. Thus was contributed by Bill Lupton. The static database library uses this library. dbLoadRecords and dvbLoadTemplate also use it.
Thanks to Ric Claus of SLAC a bug has been isolated in the VXI resource
manager.
Symptom: correct slot isnt located when EPICS_VXI_LA_BASE is set to something
other than zero.
If asSetFile has been set in a startup file and access security initialization fails, then iocInit returns -1 so that startup file does not finish.
On Unix this now calls fprintf(stderr instead of printf
This now calls printf instead of epicsPrintf to prevent deadlocks.
Formerlly old database access, which does not have unsigned short called the native type DBR_FLOAT. It now calls it DBF_LONG
Analog Output Block Transfers were being requested too frequently
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:
Support has been added by LBL. It still needs to be ansified.
dbAccess (dbGetField dbPutField) make sure that link field strings are not longer than 39 characters. They allow M for MS and N for NMS
The task names have been changed to make them unique
If the strlen of the new field is >= field_size an error is returned.
Multiple priorities are now supported.
WARNING: Default PRIO is low thus old event scanned records may be executed
at a lower priority then previous release.
Support for the allen bradley stepper motor is available. See the APS EPICS Hardware Support page for details.
INITHOOKafterCaLinkInit1 is replaced by INITHOOKafterCaLinkInit
INITHOOKafterCaLinkInit2 no longer exists