Difference between revisions of "RRM 3-14 Event"
(Link fields are modifyable) |
|||
(One intermediate revision by one other user not shown) | |||
Line 18: | Line 18: | ||
=== Scan Parameters === | === Scan Parameters === | ||
The event record has the standard fields for specifying under what circumstances it will be processed. If the SCAN field specifies <CODE>I/O Intr</CODE>, then device support will provide an interrupt handler, posting an event number when an I/O interrupt occurs. These fields are listed in [[RRM 3- | The event record has the standard fields for specifying under what circumstances it will be processed. If the SCAN field specifies <CODE>I/O Intr</CODE>, then device support will provide an interrupt handler, posting an event number when an I/O interrupt occurs. These fields are listed in [[RRM 3-14 dbCommon#Scan Fields|Scan Fields]]. In addition, [[RRM 3-14 Concepts#Scanning Specification|Scanning Specification]] explains how the scanning fields work. Note that I/O event scanning is only supported for those card types that interrupt. | ||
=== Input Specification === | === 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 [[RRM 3- | 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 [[RRM 3-14 Concepts#Address Specification|Address Specification]] 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 <CODE>Soft Channel</CODE>. | 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 <CODE>Soft Channel</CODE>. | ||
Line 30: | Line 30: | ||
<TABLE BORDER="1"> | <TABLE BORDER="1"> | ||
<TH>Field<TH>Summary<TH>Type<TH>DCT<TH>Initial<TH>Access<TH>Modify<TH>Rec Proc Monitor<TH>PP<TR> | <TH>Field<TH>Summary<TH>Type<TH>DCT<TH>Initial<TH>Access<TH>Modify<TH>Rec Proc Monitor<TH>PP<TR> | ||
<TD>INP<TD>Input Link<TD>INLINK<TD>Yes<TD>0<TD> | <TD>INP<TD>Input Link<TD>INLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>DTYP<TD>Device Type<TD>DEVCHOICE<TD>Yes<TD>0<TD>Yes<TD>No<TD>No<TD> | <TD>DTYP<TD>Device Type<TD>DEVCHOICE<TD>Yes<TD>0<TD>Yes<TD>No<TD>No<TD> | ||
</TABLE> | </TABLE> | ||
Line 48: | Line 48: | ||
=== Operator Display Parameters === | === Operator Display Parameters === | ||
See [[RRM 3- | See [[RRM 3-14 dbCommon#Fields Common to All Record Types|Fields Common to All Record Types]] for more on the record name (NAME) and description (DESC) fields. | ||
Line 60: | Line 60: | ||
=== Alarm Parameters === | === Alarm Parameters === | ||
The Event record has the alarm parameters common to all record types. [[RRM 3- | The Event record has the alarm parameters common to all record types. [[RRM 3-14 dbCommon#Alarm Fields|Alarm Fields]] lists other fields related to a alarms that are common to all record types. | ||
=== Simulation Mode Parameters === | === Simulation Mode Parameters === | ||
The following fields are used to operate the event record in the simulation mode. See [[RRM 3- | The following fields are used to operate the event record in the simulation mode. See [[RRM 3-14 Common#Fields Common to Many Record Types|Fields Common to Many Record Types]] for more information on these fields. | ||
<TABLE BORDER="1"> | <TABLE BORDER="1"> | ||
<TH>Field<TH>Summary<TH>Type<TH>DCT<TH>Initial<TH>Access<TH>Modify<TH>Rec Proc Monitor<TH>PP<TR> | <TH>Field<TH>Summary<TH>Type<TH>DCT<TH>Initial<TH>Access<TH>Modify<TH>Rec Proc Monitor<TH>PP<TR> | ||
<TD>SIOL<TD>Simulation Value Location<TD>INLINK<TD>Yes<TD>0<TD> | <TD>SIOL<TD>Simulation Value Location<TD>INLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>SVAL<TD>Simulation Value<TD>DOUBLE<TD>No<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | <TD>SVAL<TD>Simulation Value<TD>DOUBLE<TD>No<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>SIML<TD>Simulation Mode Location<TD>INLINK<TD>Yes<TD>0<TD> | <TD>SIML<TD>Simulation Mode Location<TD>INLINK<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>SIMM<TD>Simulation Mode<TD>[[RRM 3- | <TD>SIMM<TD>Simulation Mode<TD>[[RRM 3-14 Menu Choices|GBLCHOICE]]<TD>No<TD>0<TD>Yes<TD>Yes<TD>No<TD>No<TR> | ||
<TD>SIMS<TD>Simulation Mode Alarm Severity<TD>[[RRM 3- | <TD>SIMS<TD>Simulation Mode Alarm Severity<TD>[[RRM 3-14 Menu Choices|GBLCHOICE]]<TD>Yes<TD>0<TD>Yes<TD>Yes<TD>No<TD>No | ||
</TABLE> | </TABLE> | ||
Line 101: | Line 101: | ||
Routine process implements the following algorithm: | Routine process implements the following algorithm: | ||
# readValue is called. See [[RRM 3- | # readValue is called. See [[RRM 3-14 Common#Input Records|Input Records]] for more information. | ||
# 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. | # 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. | ||
# If VAL > 0, post event number VAL. | # If VAL > 0, post event number VAL. | ||
Line 115: | Line 115: | ||
<TABLE BORDER="1"> | <TABLE BORDER="1"> | ||
<TH>Name<TH>Summary<TH>Description<TR> | <TH>Name<TH>Summary<TH>Description<TR> | ||
<TD>PACT<TD>Processing Active<TD rowspan=5>See [[RRM 3- | <TD>PACT<TD>Processing Active<TD rowspan=5>See [[RRM 3-14 dbCommon#Fields Common to All Record Types|Fields Common to All Record Types]] for an explanation of these fields.<TR> | ||
<TD>DPVT<TD>Device Private<TR> | <TD>DPVT<TD>Device Private<TR> | ||
<TD>UDF<TD>VAL Undefined<TR> | <TD>UDF<TD>VAL Undefined<TR> | ||
Line 169: | Line 169: | ||
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. | 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. | ||
<CODE>read_event</CODE> calls recGblGetLinkValue to read the current value of VAL. See [[RRM 3- | <CODE>read_event</CODE> calls recGblGetLinkValue to read the current value of VAL. See [[RRM 3-14 Common#Input Records|Input Records]] for details on soft input. | ||
Latest revision as of 19:32, 22 March 2016
Event
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.
Parameter Fields
The records in this field fall into the following groups of parameters:
- scan parameters
- read parameters
- event number parameters
- simulation mode parameters
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. In addition, Scanning Specification explains how the scanning fields work. Note that I/O event scanning is only supported for those card types that interrupt.
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 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
.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
INP | Input Link | INLINK | Yes | 0 | Yes | Yes | No | No |
DTYP | Device Type | DEVCHOICE | Yes | 0 | Yes | No | No |
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 Channe
l device support, it can be configured before run-time or set via dbPuts.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
VAL | Event Number to Post | USHORT | Yes | 0 | Yes | Yes | Yes | No |
Operator Display Parameters
See Fields Common to All Record Types for more on the record name (NAME) and description (DESC) fields.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
NAME | Record Name | STRING [29] | Yes | 0 | Yes | No | No | |
DESC | Description | STRING [29] | Yes | Null | Yes | Yes | No | No |
Alarm Parameters
The Event record has the alarm parameters common to all record types. Alarm Fields lists other fields related to a alarms that are common to all record types.
Simulation Mode Parameters
The following fields are used to operate the event record in the simulation mode. See Fields Common to Many Record Types for more information on these fields.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
SIOL | Simulation Value Location | INLINK | Yes | 0 | Yes | Yes | No | No |
SVAL | Simulation Value | DOUBLE | No | 0 | Yes | Yes | No | No |
SIML | Simulation Mode Location | INLINK | Yes | 0 | Yes | Yes | No | No |
SIMM | Simulation Mode | GBLCHOICE | No | 0 | Yes | Yes | No | No |
SIMS | Simulation Mode Alarm Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | No |
Record Support
Record Support Routines
init_record
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.
process
See next section.
get_value
Fills in the values of struct valueDes so that they refer to VAL.
Record Processing
Routine process implements the following algorithm:
- readValue is called. See Input Records for more information.
- 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.
- If VAL > 0, post event number VAL.
- 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.
- Scan forward link if necessary, set PACT FALSE, and return.
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 Fields Common to All Record Types for an explanation of these fields. |
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 record. |
Device Support Routines
Device support consists of the following routines:
report
report(FILE fp, interest)
Not currently used.
init
init()
This routine is called once during IOC initialization.
init_record
init_record(precord)
This routine is optional. If provided, it is called by the record support init_record routine.
get_ioint_info
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.
read_event
read_event(precord)
This routine returns the following values:
- 0: Success.
- Other: Error.
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 for details on soft input.
EPICS Record Reference Manual - 19 MAY 1998