NB: This manual documents a 20+ year old version of EPICS, see here for the EPICS 7 Record Reference documentation.

[Next] [Previous] [Top] [Contents] [Index]

EPICS Record Reference Manual

Chapter 14: Event

1. Introduction

The normal use for this record type is to post an event and/or process a forward link. Device support for this record can provide a hardware interrupt handler routine for I/O Event-scanned records. The records in this field fall into the following groups of parameters:

scan parameters

read parameters

event number parameters

simulation mode parameters

2. Scan Parameters

The event record has the standard fields for specifying under what circumstances it will be processed. If the SCAN field specifies I/O Intr, then device support will provide an interrupt handler, posting an event number when an I/O interrupt occurs. These fields are listed in Scan Fields, Chapter 2, 2. In addition, Scanning Specification, Chapter 1, 1, explains how the scanning fields work. Note that I/O event scanning is only supported for those card types that interrupt.

3. Input Specification

The device support routines use the address in this record to obtain input. For records that provide an interrupt handler, the INP field should specify the address of the I/O card, and the DTYP field should specify a valid device support module. Be aware that the address format differs according to the card type used. See Address Specification, Chapter 1, 2, for information on the format of hardware addresses and specifying links. You can see a list of the device support modules currently supported at the user's local site by using the dbst utility in R3.13.

For soft records, the INP field can be a constant, a database link, or a channel access link. For soft records, the DTYP field should specify Soft Channel.
FieldSummaryTypeDCTInitialAccessModifyRec Proc MonitorPP

4. Event Number Parameters

The VAL field contains the event number read by the device support routines. It is this number which is posted. For records that use Soft Channel device support, it can be configured before run-time or set via dbPuts.
FieldSummaryTypeDCTInitialAccessModifyRec Proc MonitorPP
VALEvent Number to PostUSHORTYes0YesYesYesNo

5. Operator Display Parameters

See Chapter 2, Fields Common to All Record Types, for more on the record name (NAME) and description (DESC) fields.
FieldSummaryTypeDCTInitialAccessModifyRec Proc MonitorPP
NAMERecord NameSTRING [29]Yes0YesNoNo 
DESCDescriptionSTRING [29]YesNullYesYesNoNo

6. Alarm Parameters

The Event record has the alarm parameters common to all record types. Alarm Fields, Chapter 2, 3, lists other fields related to a alarms that are common to all record types.

7. Simulation Mode Parameters

The following fields are used to operate the event record in the simulation mode. See Chapter 3, Fields Common to Many Record Types, for more information on these fields.
FieldSummaryTypeDCTInitialAccessModifyRec Proc MonitorPP
SIOLSimulation Value LocationINLINKYes0NoNoN/ANo
SVALSimulation ValueDOUBLENo0YesYesNoNo
SIMLSimulation Mode LocationINLINKYes0NoNoN/ANo
SIMMSimulation ModeGBLCHOICENo0YesYesNoNo
SIMSSimulation Mode Alarm SeverityGBLCHOICEYes0YesYesNoNo

8. Record Support Routines


This routine initializes SIMM with the value of SIML if SIML type is a CONSTANT link or creates a channel access link if SIML type is PV_LINK. SVAL is likewise initialized if SIOL is CONSTANT or PV_LINK.

If device support includes init_record, it is called.


See next section.


Fills in the values of struct valueDes so that they refer to VAL.

9. Record Processing

Routine process implements the following algorithm:

1. readValue is called. See Input Records, Chapter 3, 2, for more information.

2. If PACT has been changed to TRUE, the device support read routine has started but has not completed reading a new input value. In this case, the processing routine merely returns, leaving PACT TRUE.

3. If VAL > 0, post event number VAL.

4. Check to see if monitors should be invoked. Alarm monitors are invoked if the alarm status or severity has changed NSEV and NSTA are reset to 0.

5. Scan forward link if necessary, set PACT FALSE, and return.

10. Device Support

10.1. Fields of Interest To Device Support

Each record must have an associated set of device support routines. The device support routines are primarily interested in the following fields:
PACTProcessing ActiveSee Chapter 2, Fields Common to All Record Types, for an explanation of these fields.
DPVTDevice Private
UDFVAL Undefined
NSEVNew Alarm Severity
NSTANew Alarm Status
INPInput LinkThis field is used by the device support routines to locate its input.
PRIOPriorityThis value must be used by the device support interrupt handler to set the scheduling priority for processing this record.

10.2. Device Support Routines

Device support consists of the following routines:


  report(FILE fp, interest)
Not currently used.


This routine is called once during IOC initialization.


This routine is optional. If provided, it is called by the record support init_record routine.


  get_ioint_info(int cmd,struct dbCommon *precord,IOSCANPVT *ppvt)
This routine is called by the ioEventScan system each time the record is added or deleted from an I/O event scan list. cmd has the value (0,1) if the record is being (added to, deleted from) an I/O event list. It must be provided for any device type that can use the ioEvent scanner.


This routine returns the following values:

10.3. Device Support For Soft Records

The Soft Channel device support module is available. The INP link type must be either CONSTANT, DB_LINK, or CA_LINK.

If the INP link type is CONSTANT, then the constant value is stored into VAL by init_record, and UDF is set to FALSE. If the INP link type is PV_LINK, then dbCaAddInlink is called by init_record.

read_event calls recGblGetLinkValue to read the current value of VAL. See Input Records, Chapter 3, 2, for details on soft input.

1. - Introduction
2. - Scan Parameters
3. - Input Specification
4. - Event Number Parameters
5. - Operator Display Parameters
6. - Alarm Parameters
7. - Simulation Mode Parameters
8. - Record Support Routines
9. - Record Processing
10. - Device Support
10.1. - Fields of Interest To Device Support
10.2. - Device Support Routines
10.3. - Device Support For Soft Records

EPICS Record Reference Manual - 19 MAY 1998
[Next] [Previous] [Top] [Contents] [Index]

Generated with Harlequin WebMaker