EPICS Record Reference Manual
Most device support modules obtain values from hardware and place the value in RVAL. For these device support modules record processing uses RVAL to determine the current state (VAL is given a value between 0 and 15). Device support modules may optionally read a value directly into VAL.
Soft device modules are provided to obtain input via database or channel
access links or via dbPutField or dbPutLink requests. Two soft device
support modules are provided: Soft Channel
allows VAL to be
an arbitrary unsigned short integer. Raw Soft Channel
reads the value into RVAL just like normal device support modules.
The multi-bit binary input fields fall into the following categories:
scan parameters
read and convert parameters
operator display parameters
alarm parameters
run-time and simulation mode parameters
dbst
utility in R3.13.
Two soft device support modules can be specified in DTYP--Soft
Channel
and Raw Soft Channel
. Raw Soft Channel
reads the value into RVAL, upon which the normal conversion process is
undergone. Soft Channel
reads any unsigned integer directly
into VAL. For a soft mbbi record, the INP field can be a constant, a
database, or a channel access link. If INP is a constant, then the VAL
is initialized to the constant value but can be changed at run-time via
dbPutField or dbPutLink. See Address
Specification, Chapter 1, 2, for information on the format of
database addresses.
Unless the device support routine specifies no conversion, RVAL is used to determine VAL as follows:
Alternatively, the input value can be read as a string, in which case, a match is sought with one of the strings specified in the ZRST-FFST fields. Then RVAL is set equal to the corresponding value for that string, and the conversion process occurs.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
VAL | Value Field | ENUM | No | 0 | Yes | Yes | Yes | Yes |
INP | Input Link | INLINK | Yes | 0 | No | No | N/A | No |
RVAL | Raw Data Value | ULONG | No | 0 | Yes | Yes | Yes | Yes |
SHFT | Shift | USHORT | No | 0 | Yes | No | No | No |
ZRVL | Zero Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
ONVL | One value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
TWVL | Two Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
THVL | Three Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
FRVL | Four Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
FVVL | Five Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
SXVL | Six Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
SVVL | Seven Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
EIVL | Eight value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
NIVL | Nine Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
TEVL | Ten Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
ELVL | Eleven Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
TVVL | Twelve Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
TTVL | Thirteen Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
FTVL | Fourteen Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
FFVL | Fifteen Value | ULONG | Yes | 0 | Yes | Yes | No | Yes |
ZRST | Zero String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
ONST | One String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
TWST | Two String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
THST | Three String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
FRST | Four String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
FVST | Five String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
SXST | Six String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
SVST | Seven String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
EIST | Eight String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
NIST | Nine String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
TEST | Ten String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
ELST | Eleven String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
TVST | Twelve String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
TTST | Thirteen String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
FTST | Fourteen String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
FFST | Fifteen String | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
get_enum_str
and get_enum_strs
record routines retrieve these strings
for the operator. Get_enum_str
gets the string
corresponding to the value set in VAL, and get_enum_strs
retrieves all the strings.See Chapter 2, 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 |
---|---|---|---|---|---|---|---|---|
ZRST,...,FFST | Zero String, One String, ... | STRING [16] | Yes | Null | Yes | Yes | No | Yes |
HOPR | High Operating Range | FLOAT | Yes | 0 | Yes | Yes | No | No |
NAME | Record Name | STRING [29] | Yes | 0 | Yes | No | No | |
DESC | Description | STRING [29] | Yes | Null | Yes | Yes | No | No |
The unknown state severity (UNSV) field, if set to MINOR or MAJOR,
triggers an alarm when the record support routine cannot find a matching
value in the state value fields for rval
.
The change of state severity (COSV) field triggers an alarm when any change of state occurs, if set to MAJOR or MINOR.
The other fields, when set to MAJOR or MINOR, trigger an alarm when VAL equals the corresponding state. See the See Alarm Specification, Chapter 1, 4, for a complete explanation of discrete alarms and these fields. Alarm Fields, Chapter 2, 3, lists other fields related to a alarms that are common to all record types.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
UNSV | Unknown State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
COSV | Change of State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
ZRSV | 0 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
ONSV | 1 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
TWSV | 2 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
THSV | 3 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
FRSV | 4 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
FVSV | 5 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
SXSV | 6 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
SVSV | 7 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
EISV | 8 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
NISV | 9 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
TESV | 10 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
ELSV | 11 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
TVSV | 12 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
TTSV | 13 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
FTSV | 14 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
FFSV | 15 State Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | Yes |
MASK is used by device support routine to read the hardware register. It is shifted left NOBT bits by the record processing routine. The user can configure the NOBT field, but the device support routines may set it, in which case the value given to it by the user is simply overridden.
The LALM field implements the change of state alarm severity by holding the value of VAL when the previous change of state alarm was issued.
MLST holds the value when the last monitor for value change was triggered.
SDEF is used by record support to save time if no states are defined.
Field | Summary | Type | DCT | Initial | Access | Modify | Rec Proc Monitor | PP |
---|---|---|---|---|---|---|---|---|
SHFT | Shift | USHORT | No | 0 | Yes | No | No | No |
ORAW | Old Raw Data | ULONG | No | 0 | Yes | No | No | No |
NOBT | Number of Bits | SHORT | Yes | 0 | Yes | No | No | No |
MASK | Mask | ULONG | No | 0 | Yes | No | No | No |
LALM | Last Alarmed | USHORT | No | 0 | Yes | No | No | No |
MLST | Monitor Last | USHORT | No | 0 | Yes | No | No | No |
SDEF | States Defined? | SHORT | No | 0 | Yes | No | No | No |
The following fields are used to operate the mbbi record in the simulation mode. See Chapter 3, 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 | No | No | N/A | No |
SVAL | Simulation Value | DOUBLE | No | 0 | Yes | Yes | No | No |
SIML | Simulation Mode Location | INLINK | Yes | 0 | No | No | N/A | No |
SIMM | Simulation Mode | GBLCHOICE | No | 0 | Yes | Yes | No | No |
SIMS | Simulation Mode Alarm Severity | GBLCHOICE | Yes | 0 | Yes | Yes | No | No |
This routine next checks to see that device support is available and a device support read routine is defined. If either does not exist, an error message is issued and processing is terminated.
Clears MASK and then sets the NOBT low order bits.
If device support includes init_record, it is called.
init_common is then called to determine if any states are defined. If states are defined, SDEF is set to TRUE.
The primary responsibility of the device support routines is to obtain a new raw input value whenever read_mbbi is called. The device support routines are primarily interested in the following fields:
Name | Summary | Description |
---|---|---|
PACT | Processing Active | See Chapter 2, 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 | |
NOBT | Number of Bits | Number of hardware bits accessed. They must be consecutive. |
VAL | Value Field | This field is set by the device support routines if they don't want record support to set it. |
INP | Input Link | This field is used by the device support routines to locate its input. |
RVAL | Raw Data Value | It is the responsibility of the device support routine to give this field a value. |
MASK | Mask | This is a mask used to read the hardware. Record support sets the low order NOBT bits. The device support routine can shift the bits. The device support routine should perform the shift in init_record. |
SHFT | Shift | This can be set by the device support module at init_record time. |
report(FILE fp, paddr)Not currently used.
init()This routine is called once during IOC initialization.
init_record(precord)This routine is optional. If provided, it is called by the record support init_record routine. If it uses MASK, it should shift it as necessary and also give SHFT a value.
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 I/O Event scanner.
read_mbbi(precord)This routine must provide a new input value. It returns the following values:
Soft Channel
and Raw
Soft Channel
are provided for multi-bit binary input records not
related to actual hardware devices. 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. VAL can be changed via dbPut requests. If the INP link type is PV_LINK, then dbCaAddInlink is called by init_record.
read_mbbi calls recGblGetLinkValue to read the current value of VAL. See Soft Input, Chapter 3, 2.3.
If the return status of recGblGetLinkValue is zero, then read_mbbi sets UDF to FALSE. The status of recGblGetLinkValue is returned.
Generated with Harlequin WebMaker