The stringout record is used to write an arbitrary ASCII string of up to 40 characters to other records or software variables.
The record-specific fields are described below, grouped by functionality.
The string output record has the standard fields for specifying under what circumstances it will be processed. These fields are listed in Scan Fields.
The string output record must specify from where it gets its desired output string.
The first field that determines where the desired output originates is the output mode select (OMSL) field,
which can have two possible value:
supervisory is specified,
DOL is ignored,
the current value of VAL is written,
and the VAL can be changed externally via dbPuts at run-time.
closed_loop is specified,
the VAL field's value is obtained from the address specified in the desired output location field (DOL) which can be either a database link or a channel access link.
DOL can also be a constant,
in which case VAL will be initialized to the constant value.
However to be interpreted as a constant instead of a CA link the constant can only be numeric,
so string output records are best initialized by dirctly setting the VAL field.
Note that if DOL is a constant,
OMSL cannot be
Field Summary Type DCT Default Read Write CA PP VAL Current Value STRING  Yes Yes Yes Yes DOL Desired Output Loc INLINK Yes Yes Yes No OMSL Output Mode Select MENU (menuOmsl) Yes Yes Yes No
The output link specified in the OUT field specifies where the string output record is to write its string. The link can be a database or channel access link. If the OUT field is a constant, no output will be written.
In addition, the appropriate device support module must be entered into the DTYP field.
Field Summary Type DCT Default Read Write CA PP OUT Output Specification OUTLINK Yes Yes Yes No DTYP Device Type DEVICE Yes Yes Yes No
These parameters are used to specify when the monitor post should be sent by
There are two possible choices:
Index Identifier Choice String 0 stringoutPOST_OnChange On Change 1 stringoutPOST_Always Always
APST is used for archiver monitors and MPST is for all other type of monitors.
Field Summary Type DCT Default Read Write CA PP MPST Post Value Monitors MENU (stringoutPOST) Yes Yes Yes No APST Post Archive Monitors MENU (stringoutPOST) Yes Yes Yes No
These parameters are used to present meaningful data to the operator. These fields are used to display the value and other parameters of the string output either textually or graphically.
See Fields Common to All Record Types for more on the record name (NAME) and description (DESC) fields.
Field Summary Type DCT Default Read Write CA PP NAME Record Name STRING  No Yes No No DESC Descriptor STRING  Yes Yes Yes No
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.
Field Summary Type DCT Default Read Write CA PP OVAL Previous Value STRING  No Yes No No
The following fields are used to operate the record in simulation mode.
If SIMM (fetched through SIML) is YES, the record is put in SIMS severity and the value is written through SIOL. SSCN sets a different SCAN mechanism to use in simulation mode. SDLY sets a delay (in sec) that is used for asynchronous simulation processing.
See Output Simulation Fields for more information on simulation mode and its fields.
Field Summary Type DCT Default Read Write CA PP SIML Simulation Mode Link INLINK Yes Yes Yes No SIMM Simulation Mode MENU (menuYesNo) No Yes Yes No SIOL Simulation Output Link OUTLINK Yes Yes Yes No SIMS Simulation Mode Severity MENU (menuAlarmSevr) Yes Yes Yes No SDLY Sim. Mode Async Delay DOUBLE Yes -1.0 Yes Yes No SSCN Sim. Mode Scan MENU (menuScan) Yes 65535 Yes Yes No
The possible alarm conditions for the string output record are the SCAN, READ, and INVALID alarms. The severity of the first two is always MAJOR and not configurable.
The IVOA field specifies an action to take when the INVALID alarm is triggered.
Set output to IVOV,
the value contained in the IVOV field is written to the output link during an alarm condition.
See Invalid Output Action Fields for more information on the IVOA and IVOV fields.
Alarm Fields lists the fields related to alarms that are common to all record types.
Field Summary Type DCT Default Read Write CA PP IVOA INVALID output action MENU (menuIvoa) Yes Yes Yes No IVOV INVALID output value STRING  Yes Yes Yes No
long (*init_record)(struct dbCommon *precord, int pass)
This routine initializes SIMM if SIML is a constant or creates a channel access link if SIML is PV_LINK. If SIOL is PV_LINK a channel access link is created.
This routine next checks to see that device support is available. The routine next checks to see if the device support write routine is defined. If either device support or the device support write routine does not exist, an error message is issued and processing is terminated.
If DOL is a constant, then the type double constant, if non-zero, is converted to a string and stored into VAL and UDF is set to FALSE. If DOL type is a PV_LINK then dbCaAddInlink is called to create a channel access link.
If device support includes
init_record(), it is called.
long (*process)(struct dbCommon *precord)
See "Record Processing".
Routine process implements the following algorithm:
Each stringout output record must have an associated set of device support routines. The primary responsibility of the device support routines is to write a new value whenever write_stringout is called. The device support routines are primarily interested in the following fields:
Field Summary Type DCT Default Read Write CA PP PACT Record active UCHAR No Yes No No DPVT Device Private NOACCESS No No No No NSEV New Alarm Severity MENU (menuAlarmSevr) No Yes No No NSTA New Alarm Status MENU (menuAlarmStat) No Yes No No VAL Current Value STRING  Yes Yes Yes Yes OUT Output Specification OUTLINK Yes Yes Yes No
Device support consists of the following routines:
long report(int level)
This optional routine is called by the IOC command
dbior and is passed the report level that was requested by the user. It should print a report on the state of the device support to stdout. The
level parameter may be used to output increasingly more detailed information at higher levels, or to select different types of information with different levels. Level zero should print no more than a small summary.
long init(int after)
This optional routine is called twice at IOC initialization time. The first call happens before any of the
init_record() calls are made, with the integer parameter
after set to 0. The second call happens after all of the
init_record() calls have been made, with
after set to 1.
long init_record(dbCommon *prec)
This routine is optional. If provided, it is called by the record support
long get_ioint_info(int cmd, 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.
long write_stringout(stringoutRecord *prec)
This routine must output a new value. It returns the following values:
Soft Channel device support module writes the current value of VAL.
Device support for DTYP
stdio is provided for writing values to the stdout, stderr, or errlog streams.
@errlog is used on the OUT link field to select the desired stream.