_________________________________________________________________________________________

EPICS Application Developer’s Guide

EPICS Base Release 3.16.1

19 June 2017

Martin R. Kraimer, Janet B. Anderson (Retired)

Andrew N. Johnson (Argonne National Laboratory)

W. Eric Norum (Lawrence Berkeley National Laboratory)

Jeffrey O. Hill (Los Alamos National Laboratory)

Ralph Lange (ITER Organization)

Benjamin Franksen (Helmholtz-Zentrum Berlin)

Peter Denison (Diamond Light Source)

Michael Davidsaver (Osprey DCS)

_________________________________________________________________________________________

1 Introduction
 1.1 Overview
 1.2 Acknowledgments
2 Getting Started
 2.1 Introduction
 2.2 Example IOC Application
 2.3 Channel Access Host Example
 2.4 iocsh
 2.5 Building IOC components
 2.6 makeBaseApp.pl
 2.7 vxWorks boot parameters
 2.8 RTEMS boot procedure
3 EPICS Overview
 3.1 What is EPICS?
 3.2 Basic Attributes
 3.3 IOC Software Components
 3.4 Channel Access
 3.5 OPI Tools
 3.6 EPICS Core Software
4 Build Facility
 4.1 Overview
 4.2 Build Requirements
 4.3 Configuration Definitions
 4.4 Makefiles
 4.5 Make
 4.6 Makefile definitions
 4.7 Table of Makefile definitions
 4.8 Configuration Files
 4.9 Build Documentation Files
 4.10 Startup Files
5 Database Locking, Scanning, And Processing
 5.1 Overview
 5.2 Record Links
 5.3 Link Operations
 5.4 Database Locking
 5.5 Database Scanning
 5.6 Record Processing
 5.7 Guidelines for Creating Database Links
 5.8 Guidelines for Synchronous Records
 5.9 Guidelines for Asynchronous Records
 5.10 Cached Puts
 5.11 processNotify
 5.12 Channel Access Links
 5.13 Record Locking Algorithms
6 Database Definition
 6.1 Overview
 6.2 Summary of Database Syntax
 6.3 General Rules for Database Definition
 6.4 Database Definition Statements
 6.5 Record Information Item
 6.6 Record Attributes
 6.7 Breakpoint Tables – Discussion
 6.8 Menu and Record Type Include File Generation.
 6.9 dbdExpand.pl
 6.10 dbLoadDatabase
 6.11 dbLoadRecords
 6.12 dbLoadTemplate
7 IOC Initialization
 7.1 Overview - Environments requiring a main program
 7.2 Overview - vxWorks
 7.3 Overview - RTEMS
 7.4 IOC Initialization
 7.5 Pausing an IOC
 7.6 Changing iocCore fixed limits
 7.7 initHooks
 7.8 Environment Variables
 7.9 Initialize Logging
8 Access Security
 8.1 Overview
 8.2 Quick Start
 8.3 User’s Guide
 8.4 Design Summary
 8.5 Access Security Application Programmer’s Interface
 8.6 Database Access Security
 8.7 Channel Access Security
 8.8 Trapping Channel Access Writes
 8.9 Access Control: Implementation Overview
 8.10 Structures
9 IOC Test Facilities
 9.1 Overview
 9.2 Database List, Get, Put
 9.3 Breakpoints
 9.4 Trace Processing
 9.5 Error Logging
 9.6 Hardware Reports
 9.7 Scan Reports
 9.8 General Time
 9.9 Access Security Commands
 9.10 Channel Access Reports
 9.11 Interrupt Vectors
 9.12 Miscellaneous
 9.13 Database System Test Routines
 9.14 Record Link Reports
 9.15 Old Database Access Testing
 9.16 Routines to dump database information
10 IOC Error Logging
 10.1 Overview
 10.2 Error Message Routines
 10.3 errlog Listeners
 10.4 errlogThread
 10.5 console output and message queue size
 10.6 Status Codes
 10.7 iocLog
11 Record Support
 11.1 Overview
 11.2 Overview of Record Processing
 11.3 Record Support and Device Support Entry Tables
 11.4 Example Record Support Module
 11.5 Record Support Routines
 11.6 Global Record Support Routines
12 Device Support
 12.1 Overview
 12.2 Example Synchronous Device Support Module
 12.3 Example Asynchronous Device Support Module
 12.4 Device Support Routines
 12.5 Extended Device Support
13 Driver Support
 13.1 Overview
 13.2 Device Drivers
14 Static Database Access
 14.1 Overview
 14.2 Definitions
 14.3 Allocating and Freeing DBBASE
 14.4 DBENTRY Routines
 14.5 Read and Write Database
 14.6 Manipulating Record Types
 14.7 Manipulating Field Descriptions
 14.8 Manipulating Record Attributes
 14.9 Manipulating Record Instances
 14.10 Manipulating Menu Fields
 14.11 Manipulating Link Fields
 14.12 Manipulating Information Items
 14.13 Find Breakpoint Table
 14.14 Dump Routines
 14.15 Examples
15 Runtime Database Access
 15.1 Overview
 15.2 Database Include Files
 15.3 Runtime Database Access Overview
 15.4 Database Access Routines
 15.5 Runtime Link Modification
 15.6 Channel Access Monitors
 15.7 Channel Access Database Links
 15.8 dbServer API
16 EPICS General Purpose Tasks
 16.1 Overview
 16.2 General Purpose Callback Tasks
 16.3 Task Watchdog
17 Database Scanning
 17.1 Overview
 17.2 Scan Related Database Fields
 17.3 Scan Related Software Components
 17.4 Implementation Overview
18 IOC Shell
 18.1 Introduction
 18.2 IOC Shell Operation
 18.3 IOC Shell Programming
19 libCom
 19.1 bucketLib
 19.2 calc
 19.3 cppStd
 19.4 epicsExit
 19.5 cvtFast
 19.6 cxxTemplates
 19.7 dbmf
 19.8 ellLib
 19.9 epicsRingBytes
 19.10 epicsRingPointer
 19.11 epicsTimer
 19.12 fdmgr
 19.13 freeList
 19.14 gpHash
 19.15 logClient
 19.16 macLib
 19.17 epicsThreadPool
 19.18 misc
20 libCom OSI libraries
 20.1 Overview
 20.2 epicsAssert
 20.3 epicsAtomic
 20.4 epicsEndian
 20.5 epicsEvent
 20.6 epicsFindSymbol
 20.7 epicsGeneralTime
 20.8 epicsInterrupt
 20.9 epicsMath
 20.10 epicsMessageQueue
 20.11 epicsMutex
 20.12 epicsSpin
 20.13 epicsStdlib
 20.14 epicsStdio
 20.15 epicsTempFile
 20.16 epicsThread
 20.17 epicsTime
 20.18 osiPoolStatus
 20.19 osiProcess
 20.20 Ignoring Posix Signals
 20.21 OS-Independent Socket API
 20.22 epicsMMIO
 20.23 Device Support Library
 20.24 vxWorks Specific routines and Headers
21 Registry
 21.1 Registry.h
 21.2 registryRecordType.h
 21.3 registryDeviceSupport.h
 21.4 registryDriverSupport.h
 21.5 registryFunction.h
 21.6 registerRecordDeviceDriver.c
 21.7 registerRecordDeviceDriver.pl
22 Database Structures
 22.1 Overview
 22.2 Include Files
 22.3 Structures
Index