EPICS Record Reference Manual
Chapter 33: stringin - String Input
The string input record retrieves an arbitrary ASCII string of up to 40
characters. Several device support routines are available, all of which
are soft device support for retrieving values from other records or
other software components. Its fields fall into the following
operator display parameters
run-time and simulation mode parameters
2. Scan Parameters
The string input record has the standard fields for specifying under
what circumstances it will be processed. These fields are listed in Scan
Fields, Chapter 2, 2. In addition, Scanning
Specification, Chapter 1, 1, explains how these fields are
3. Read Parameters
The INP field determines where the string input record gets its string.
It can be a database or channel access link, or a constant. If constant,
the VAL field is initialized with the constant and can be changed via
dbPuts. Otherwise, the string is read from the specified location each
time the record is processed and placed in the VAL field. The maximum
number of characters that the string in VAL can be is 40. In addition,
the appropriate device support module must be entered into the DTYP
Specification, Chapter 1, 2, for information on specifying
links. The user can see a list of the device support modules currently
supported at the user's local site by using the
4. Operator Display Parameters
2, Fields Common to All Record Types, for more on the
record name (NAME) and description (DESC) fields.
|NAME||Record Name||STRING ||Yes||0||Yes||No||No||No|
5. Alarm Parameters
The string input record has the alarm parameters common to all record
Fields, Chapter 2, 3, lists other fields related to a alarms
that are common to all record types.
6. Run-time and Simulation Mode Parameters
The old value field (OVAL) of the string input is used to implement
value change monitors for VAL. If VAL is not equal to OVAL, then
monitors are triggered.
The following fields are used to operate the string input in the
simulation mode. See Simulation
Mode, Chapter 3, 2.4, for more information on simulation mode
|SIOL||Simulation Value Location||INLINK||Yes||0||No||No||N/A||No|
|SVAL||Simulation Value||STRING ||No||Null||Yes||Yes||No||Yes|
|SIML||Simulation Mode Location||INLINK||Yes||0||No||No||N/A||No|
|SIMS||Simulation Mode Alarm Severity||GBLCHOICE||Yes||0||Yes||Yes||No||No|
7. Record Support Routines
Three record support routines are provided: init_record, process, and
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.
This routine next checks to see that device support is available and a
record support read routine is defined. If either does not exist, an
error message is issued and processing is terminated.
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.
8. Record Processing
Routine process implements the following algorithm:
- 1. Check to see that the appropriate device support
module exists. If it doesn't, an error message is issued and processing
is terminated with the PACT field still set to TRUE. This ensures that
processes will no longer be called for this record. Thus error storms
will not occur.
- 2. readValue is called. See Simulation
Mode, Chapter 3, 2.4, for more information on simulation mode
fields and how they affect input.
- 3. 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.
- 4. TIME is set to tslocaltime
- 5. Check to see if monitors should be invoked.
- Alarm monitors are invoked if the alarm status or severity has
- Archive and value change monitors are invoked if OVAL is
not equal to VAL.
- NSEV and NSTA are reset to 0.
- 6. Scan forward link if necessary, set PACT FALSE, and
9. Device Support
9.1. Fields Of Interest To Device Support
Each stringin input record must have an associated set of device support
routines. The primary responsibility of the device support routines is
to obtain a new ASCII string value whenever read_stringin is called. The
device support routines are primarily interested in the following
|PACT||Processing Active||See Chapter
2, Fields Common to All Record Types for an explanation of
|VAL || Value ||This field is set by the device support
|INP || Input Link.||This field is used by the device
support routines to locate its input.|
9.2. Device Support Routines
Device support consists of the following routines:
report(FILE fp, paddr)
Not currently used.
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 must provide a new input value. It returns the following
0: Success. A new ASCII string is stored into VAL.
9.3. Device Support For Soft Records
Soft Channel module places a value directly in VAL.
If the INP link type is constant, the double constant, if non-zero, is
converted to a string and stored into VAL by init_record, and UDF is set
to FALSE. If the INP link type is PV_LINK, then dbCaAddInlink is called
read_stringin calls recGblGetLinkValue to read the current value of VAL.
Input, Chapter 3, 2.3.
If the return status of recGblGetLinkValue is zero, then read_stringin
sets UDF to FALSE. The status of recGblGetLinkValue is returned.
1. - Introduction
2. - Scan Parameters
3. - Read Parameters
4. - Operator Display Parameters
5. - Alarm Parameters
6. - Run-time and Simulation Mode Parameters
7. - Record Support Routines
8. - Record Processing
9. - Device Support
- Fields Of Interest To Device Support
- Device Support Routines
- Device Support For Soft Records
EPICS Record Reference Manual - 19 MAY 1998
Generated with Harlequin WebMaker