EPICS Base Release 3.15.0.x

EPICS Base 3.15.0.x releases are not intended for use in production systems.

Changes between 3.14.x and 3.15.0.x

Cross-builds targeting win32-x86-mingw

Some Linux distributions now package the MinGW cross-compiler which makes it possible to cross-build the win32-x86-mingw target from a linux-x86 host. Build configuration files for this combination are now included; adjust the settings in configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw and add win32-x86-mingw to the CROSS_COMPILER_TARGET_ARCHS variable in configure/CONFIG_SITE or in configure/os/CONFIG_SITE.linux-x86.Common.

Architecture win32-x86-cygwin Removed

The ability to compile non-cygwin binaries using the Cygwin build tools is no longer supported by current versions of Cygwin, so this architecture has been removed. Use the MinWG tools and the win32-x86-mingw architecture instead.

RTEMS and VxWorks Test Harnesses

The original libCom test harness has been renamed libComTestHarness, and two additional test harnesses have been created dbTestHarness and filterTestHarness which are all built for RTEMS and vxWorks targets. The new ones include tests in src/ioc/db/test and src/std/filters/test.

Running the new tests requires additional .db and .dbd files to be loaded at runtime, which can be found in the relevant source directory or its O.Common subdirectory. If the target can access the Base source tree directly it may be simplest to cd to the relevant source directory before running the test. If not, the files needed are listed in the generated 'testspec' file found in the associated build (O.arch) directory.

For RTEMS users the current directory is determined in a BSP specific way. See rtems_init.c and setBootConfigFromNVRAM.c in src/libCom/RTEMS.

New API to hook into thread creation

A hook API has been added allowing user-supplied functions to be called whenever a thread starts. The calls are made from the thread's context, and can be used to control additional thread properties not handled inside EPICS base, e.g. setting the scheduling policy or CPU affinity (on SMP systems).

The API also supports a mapping operation, calling a user-supplied function for every thread that is currently running.

New scan rate units

Scan rates defined in the menuScan.dbd file may now be specified in seconds, minutes, hours or Hertz, and plural time units will also be accepted (seconds are used if no unit is mentioned in the choice string). At iocInit each scan rate is compared with the OS's clock tick and a warning printed if the rate is too fast or likely to be more than 10% different to the requested rate. For example the rates given below are all valid, although non-standard (the default menuScan choices that come with Base have not been changed):

menu(menuScan) {
    choice(menuScanPassive,     "Passive")
    choice(menuScanEvent,       "Event")
    choice(menuScanI_O_Intr,    "I/O Intr")
    choice(menuScan1_hour,      "1 hour")
    choice(menuScan0_5_hours, "0.5 hours")
    choice(menuScan15_minutes, "15 minutes")
    choice(menuScan5_minutes,   "5 minutes")
    choice(menuScan1_minute,    "1 minute")
    choice(menuScan10_seconds, "10 seconds")
    choice(menuScan5_seconds,   "5 seconds")
    choice(menuScan2_seconds,   "2 seconds")
    choice(menuScan1_second,    "1 second")
    choice(menuScan2_Hertz,     "2 Hertz")
    choice(menuScan5_Hertz,     "5 Hertz")
    choice(menuScan10_Hertz,   "10 Hz")
}

Alarm filtering added to input record types

The record types ai, calc, longin and mbbi have a new alarm filter added to them. This provides a low-pass filter that can be used to delay the reporting of alarms caused by the input level passing the HIGH, HIHI, LOW or LOLO values. The filter is controlled with a new AFTC field that sets the filter's time constant. The default value for this field is zero, which keeps the record's original alarm behaviour.

The record must be scanned often enough for the filtering action to work effectively and the alarm severity can only change when the record is processed, but that processing does not have to be regular; the filter uses the time since the record last processed in its calculation. Setting AFTC to a positive number of seconds will delay the record going into or out of a minor alarm severity or from minor to major severity until the input signal has been in that range for that number of seconds.

Post events on Waveform record's NORD field

When the record type or soft device support modify the NORD field of a waveform record they now also post a DBE_VALUE and DBE_LOG event, signalling the array length change to any clients monitoring the NORD field. Input device support routines should be modified to do this as well.

Attributes of Non-VAL Fields

Non-VAL fields now report meaningful information for precision, units, graphic limits, control limits, and alarm limits instead of simply using PREC, EGU, HOPR, LOPR, DRVL, DRVH, HIHI, HIGH, LOW, and LOLO. All delay fields have a default precision of 2 digits, units "s" and control limits of 0 to 100,000 seconds (these precision and limit values can be changed for each record type as a whole at runtime by updating a registered global variable). Input fields like A-L of the calc record read their metadata from the corresponding INPn link if possible.

epicsStdioRedirect.h merged into epicsStdio.h

The definitions from the header file epicsStdioRedirect.h have been moved into epicsStdio.h so all calls to printf(), puts() and putchar() in files that include that OSI header will now be subject to stdout redirection. In past releases (3.14.7 and later) it was necessary to request the redirection support by including the epicsStdioRedirect.h header file. The header file is still provided, but now it just includes epicsStdio.h.

Named Soft Events

Soft events can now be given meaningful names instead of just using the numbers 1-255. The EVNT field is now a DBF_STRING. The post_event() API is now deprecated but still works. It should be replaced by code that in advance looks up the EVNTPVT event handle associated with the named event by calling eventNameToHandle(char *), and when that event occurs passes that handle to the new postEvent(EVNTPVT) routine (which may be called from interrupt level). A new iocsh command postEvent name will trigger a named event from the command-line or a startup script (on vxWorks the expression postEvent(eventNameToHandle("name")) must be used instead though).

Parallel Builds

As EPICS sites get computers with more CPUs they report additional bugs in our parallel build rules. Various issues have been fixed by separating out the build rules that generate dependency (.d) files, ensuring that they are constructed at the appropriate time in the build.

These rule changes can cause additional warning messages to appear when building support modules. Where an application provides its own Makefile rules it may now have to add rules to construct an associated dependency file. In many cases though the change needed is just to replace a dependency for a target$(OBJ) with the target$(DEP) so this

    myLib$(OBJ): myLib_lex.c

becomes

    myLib$(DEP): myLib_lex.c

To debug build issues assocated with dependency files, use the command make --debug=m which tells GNUmake to display information about what it is doing during the first pass when it updates its makefiles.

Removed tsDefs.h

The deprecated tsDefs API was provided for 3.13 compatibility only, and has now been removed. Convert any remaining code that used it to call the epicsTime API instead.

Changes to epicsVersion.h

The two macros EPICS_UPDATE_LEVEL and EPICS_CVS_SNAPSHOT have been deleted from the epicsVersion.h file; they were deprecated in R3.14 and can be replaced with EPICS_PATCH_LEVEL and EPICS_DEV_SNAPSHOT respectively.

A new pair of macros has been added to make version number comparisons easier. Code that will not work with a version of Base before 3.15.0 can now be written like this to prevent it from compiling:

#if defined(VERSION_INT) && EPICS_VERSION_INT < VERSION_INT(3,15,0,0)
#  error EPICS Base R3.15.0 or later is required
#endif

Added support for iocLogPrefix

Added a iocLogPrefix command to iocsh. This adds a prefix to all messages from this IOC (or other log client) as they get sent to the iocLogServer. This lets sites use the "fac=<facility>" syntax for displaying the facility, process name etc. in log viewers like the cmlogviewer.

Reworked the epicsEvent C & C++ APIs

Enabled histogram record type

The histogram record was not included in the base.dbd file in any 3.14 release, but has now been added along with its associated soft device support. The build system now generates the list of all the record.dbd files in base automatically in src/std/rec/Makefile.

Reorganization of src/

Reorganization of subdirectories of src/ to better represent the relation between different parts as described in the following table.

This change also allows the number of libraries built to be reduced to: libCap5.so, libca.so, libdbCore.so, libdbStaticHost.so, libCom.so, libcas.so, libdbRecStd.so, and libgdd.so

Component Dependency Library name Description
src/tools Build system scripts
src/libCom src/tools Com Utility routines and OS-independant API
src/template src/tools User application templates (e.g. makeBaseApp)
src/ca/client src/libCom ca Channel Access client
src/ca/legacy/gdd src/ca/client gdd Generic data layer for PCAS
src/ca/legacy/pcas src/ca/legacy/gdd cas Portable Channel Access Server
src/ioc src/ca dbCore Core database processing functions
src/std src/ioc dbRecStd Standard records, soft device support and the softIoc

In order to better reflect these relations the following directories and files were moved as described:

Relocations
PreviousNew
libCom
src/RTEMS src/libCom/RTEMS
src/toolsComm/flex src/libCom/flex
src/toolsComm/antelope src/libCom/yacc
src/dbStatic/alarm.h
.../alarmString.h
src/libCom/misc/
IOC Core Components
src/bpt src/ioc/bpt
src/db src/ioc/db
src/dbStatic src/ioc/dbStatic
src/dbtools src/ioc/dbtemplate
src/misc src/ioc/misc
src/registry src/ioc/registry
src/rsrv src/ioc/rsrv 1
Standard Record Definitions
src/dev/softDev src/std/dev
src/rec src/std/rec
src/softIoc src/std/softIoc
Channel Access
src/ca src/ca/client
src/catools src/ca/client/tools
src/cap5 src/ca/client/perl
src/gdd src/ca/legacy/gdd
src/cas src/ca/legacy/pcas
src/excas src/ca/legacy/pcas/ex
User Templates
src/makeBaseApp src/template/base
src/makeBaseExt src/template/ext
Dispersed
src/util 2 src/ca/client
src/ca/client/test
src/libCom/log
src/as 3 src/libCom/as
src/ioc/as

1 RSRV is built as part of dbCore due to its tight (bidirectional) coupling with the other database code.

2 The contents for src/util/ moved to three locations. The caRepeater init script was moved to src/ca/client/. ca_test is now in src/ca/client/test/. The iocLogServer was moved into the same directory (src/libCom/log) as the log client code.

3 The Access Security code has been divided, with the parts not related to the database (lexer/parser and trap registration) becoming part of libCom. The remaining components are included in the dbCore library

Moved src/RTEMS/base directory

These files are now found under src/RTEMS.

Removed 3.13 compatibility

Removed the 3.13 <top>/config directory and build compatibility rules and variables, and various conversion documents.