Table of Contents Previous Chapter Chapter 15: Event

Chapter 15: 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.

2. Field Summary

Field  Type       DCT  Initial  Access  Modify  Rec Proc   PP  
VAL    SHORT      Yes  0        Yes     Yes     Yes        No  
INP    INLINK     Yes  0        No      No      N/A        No  
SIOL   INLINK     Yes  0        No      No      N/A        No  
SVAL   USHORT     No   0        Yes     Yes     No         No  
SIML   INLINK     Yes  0        No      No      N/A        No  
SIMM   GBLCHOICE  No   0        Yes     Yes     No         No  
SIMS   GBLCHOICE  Yes  0        Yes     Yes     No         No  

3. Field Descriptions

Name  Summary            Description                                                   
VAL   Value Field        Event number to post.                                         
INP   Input Link         This field is used by the device support routines to obtain   
                         input. For soft records, it can be a constant, a database     
                         link, or a channel access link.                               
SIMM  Simulation Mode    Simulation mode process variables.  Refer to Chapter 3,       
                         Section "Simulation Mode" on page 11 for more                 
SIML  Simulation Mode                                                                  
SVAL  Simulation Value                                                                 
SIOL  Simulation Value                                                                 
SIMS  Simulation Mode                                                                  
      Alarm Severity                                                                   

4. Record Support Routines


This routine initializes SIMM with the value of SIML if SIML type is 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.

5. Record Processing

Routine process implements the following algorithm:

  1. readValue is called. See Chapter 3, Section "Simulation Mode" on page 11 for details.
  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.

6. Device Support

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:

Name  Summary             Description                                                   
PACT  Processing Active   See Chapter 2, Section "Database Common: Field                
                          Descriptions" on page 4 for descriptions.                     
DPVT  Device Private                                                                    
UDF   VAL Undefined                                                                     
NSEV  New Alarm Severity                                                                
NSTA  New Alarm Status                                                                  
INP   Input Link          This field is used by the device support routines to locate   
                          its input.                                                    
PRIO  Priority            This value must be used by the device support interrupt       
                          handler to set the scheduling priority for processing this    

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:

7. Device Support For Soft Records

A soft device support module is provided. 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 Chapter 3, Section "Soft Input" on page 10 for details.

If the return status of recGblGetLinkValue is zero, then read_event sets UDF to FALSE. The status of recGblGetLinkValue is returned.

Table of Contents Next Chapter