1. Introduction to EPICS Device Support¶
The EPICS Device support module is designed to provide an easy to use but fully functional interface to EPICS for device drivers. The core mechanism provides device support for records of the five basic Channel Access types (double, 32-bit integer, boolean, enumerations, strings) together with waveforms of these types.
The module is used as follows:
Initialise EPICS device support with the appropriate function calls.
Dynamically create interfaces to all the records to be generated by the IOC.
Call
iocInit()
.
This support module comprises two parts: a C API to be used by the IOC to implement its own EPICS driver support using the API documented here, and a Python API to help with building the associated EPICS database file.
The table below shows the correspondence between header files and documentation
chapters (the header files are listed roughly in the order they need to be
#include
d):
|
|
|
|
|
|
|
|
|
|
|
|
Python Support |
The following sections document the various components provided by this module. For each component there is a header file with the same name providing the functionality documented here.
- Core EPICS Device Functionality:
This is the core functionality provided by this support module, defining mechanisms for declaring and implementing EPICS record bindings for the eleven supported record types.
- Extra EPICS Device Support:
This provides a number of extra facilities for writing EPICS driver support.
- Support for Persistent PV State:
This is an alternative mechanism to autosave/restore and provides tightly integrated support for persistent PV state over IOC restarts.
- Support for PV Logging:
This supports a simple mechanism for logging channel access writes to PVs.
- Error Handling Macros and Other Facilities:
A generic error handling mechanism is used throughout this support module and the associated header file is available for use elsewere.
- Generic Hash Table:
This is a hashtable implementation with decent performance taking much detailed inspiration from Python’s implementation of dictionaries.
- Database Builder Support
This module is designed for driver support for individual records to be written at the same time as the associated EPICS database record definition, in particular there is an exact one-to-one correspondence between published EPICS Device records and the corresponding records in the database. To help with this style of writing this Python module uses IOC builder support to make writing databases simple.