EPICS Execution Flow
Marty Kraimer
May 1996
Table of Contents
- ld (vxWorks command)
- iocCore
- drvSup
- recSup
- devSup
- dbLoad("default.dctsdr")
- Loads definitions of menus, record types, device types, driver types, etc.
- dbLoad("xxx.database"), dbLoadRecords, dbLoadTemplates
- iocInit (main steps)
- Dynamically link to record, device, and driver support (support entry tables)
- Start general purpose tasks (log server, task watchdogs, callback, etc)
- Initialize drivers
- Initialize records (two passes) and devices
- Start scan tasks
- Start access security
- Start Channel Access Server
- Decide to process a record (Database Scanning)
- Periodic
- I/O Interrupt
- Event
- Passive
- Skip if record is already active
- Skip if record is disabled
- Call record support process routine
- Linked Records (input, output, forward) (Process Passive)
- Process routines are called recursively.
- Set PACT true (processing active)
- Perform I/O operation
- For hardware link access via device support
- For database link, recursive processing may be invoked
- For channel access link
- inputs are monitored - just retrieve latest value
- outputs are handled by separate task
- Check for record specific alarm conditions
- Raise channel access monitors for any fields modified while processing
- Request processing of forward link
- Set PACT false
- Asynchronous Start (Called by iocCore)
- Set PACT true (processing active)
- Start I/O operation (normally device support does this)
- return leaving PACT true
- Asynchronous Completion (record/device support directly calls process)
- Complete I/O operation
- Check for record specific alarm conditions
- Raise channel access monitors for any fields modified while processing
- Request processing of forward link
- Set PACT false
- return
- Search
- Perform broadcast (normally local subnet) of PV name
- Each ioc has CA broadcast listener.
- IOC that contains PV sends UDP message back to client
- For each IOC containing PVs for client a TCP connection is established
- For each client IOC establishes following tasks
- Server task (handles all communication except monitors)
- Event task (handles monitors raised by record support or iocCore)
- Get
- Issue request and wait for reply
- Put
- Issue put and complete without waiting for response
- May cause record processing
- Add event
- Ask for monitors to be set on PV (record.field)
- put notify
- Issue put and wait for completion
- Completion is all records completing asynchronous phase of processing
- Connection management, Access security, Error handling, etc.
- Automatic search on first reference
- Simplified request types
- Only PV names - No Channel Ids
- Simplified error handling