diff --git a/src/std/rec/lsiRecord.dbd.pod b/src/std/rec/lsiRecord.dbd.pod index c50d905d8..bb8b5d712 100644 --- a/src/std/rec/lsiRecord.dbd.pod +++ b/src/std/rec/lsiRecord.dbd.pod @@ -5,7 +5,44 @@ # in file LICENSE that is included with this distribution. #************************************************************************* + +=title Long String Input Record (lsi) + +The long string input record is used to retrieve an arbitrary ASCII string with +a maximum length of 65535 characters. + +=head2 Parameter Fields + +The record-specific fields are described below, grouped by functionality. + +=recordtype lsi + +=cut + recordtype(lsi) { + +=head3 Scan Parameters + +The long string input record has the standard fields for specifying under what +circumstances it will be processed. These fields are listed in L. +In addition, L explains how these fields are used. + +=head3 Input Specification + +The INP field determines where the long string input record obtains its string +from. 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 in +VAL is given by SIZV, and cannot be larger than 65535. In addition, the +appropriate device support module must be entered into the DTYP field. + +See L
for information on specifying links. + +=fields VAL, OVAL, SIZV, INP, DTYP + +=cut + include "dbCommon.dbd" %#include "devSup.h" % @@ -25,12 +62,18 @@ recordtype(lsi) { pp(TRUE) special(SPC_DBADDR) extra("char *val") + #=type STRING[SIZV] + #=read Yes + #=write Yes } field(OVAL,DBF_NOACCESS) { prompt("Old Value") special(SPC_DBADDR) interest(3) extra("char *oval") + #=type STRING[SIZV] + #=read Yes + #=write No } field(SIZV,DBF_USHORT) { prompt("Size of buffers") @@ -52,6 +95,18 @@ recordtype(lsi) { promptgroup("40 - Input") interest(1) } + +=head3 Monitor Parameters + +These parameters are used to specify when the monitor post should be sent by the +C routine. There are two possible choices: + +APST is used for archiver monitors and MPST for all other type of monitors. + +=fields MPST, APST + +=cut + field(MPST,DBF_MENU) { prompt("Post Value Monitors") promptgroup("80 - Display") @@ -64,6 +119,37 @@ recordtype(lsi) { interest(1) menu(menuPost) } + +=head3 Operator Display Parameters + +See L for more on the record name (NAME) and +description (DESC) fields. + +=fields NAME, DESC + +=head3 Alarm Parameters + +The long string input record has the alarm parameters common to all record +types. L lists other fields related to a alarms that are common to +all record types. + +=head3 Run-time and Simulation Mode Parameters + +The old value field (OVAL) of the long string input record is used to implement +value change monitors for VAL. If VAL is not equal to OVAL, then monitors are +triggered. LEN contains the length of the string in VAL, OLEN contains the +length of the string in OVAL. + +=fields OVAL, LEN, OLEN + + +The following fields are used to operate the string input in the simulation +mode. See L for more information on simulation mode fields. + +=fields SIOL, SIML, SIMM, SIMS + +=cut + field(SIML,DBF_INLINK) { prompt("Simulation Mode Link") promptgroup("90 - Simulate") @@ -86,3 +172,36 @@ recordtype(lsi) { interest(2) } } + + + +=head2 Device Support Interface + +The record requires device support to provide an entry table (dset) which +defines the following members: + + typedef struct { + long number; + long (*report)(int level); + long (*init)(int after); + long (*init_record)(lsiRecord *prec); + long (*get_ioint_info)(int cmd, lsiRecord *prec, IOSCANPVT *piosl); + long (*read_string)(lsiRecord *prec); + } lsidset; + +The module must set C to at least 5, and provide a pointer to its +C routine; the other function pointers may be C if their +associated functionality is not required for this support layer. +Most device supports also provide an C routine to configure the +record instance and connect it to the hardware or driver support layer. + +=head2 Device Support for Soft Records + +A device support module for DTYP C is provided for retrieving +values from other records or other software components. + +Device support for DTYP C is provided for retrieving strings from +environment variables. C addressing C<< @ >> is +used on the C link field to select the desired environment variable. + +=cut diff --git a/src/std/rec/lsoRecord.dbd.pod b/src/std/rec/lsoRecord.dbd.pod index 69203f2d0..63aa4c515 100644 --- a/src/std/rec/lsoRecord.dbd.pod +++ b/src/std/rec/lsoRecord.dbd.pod @@ -5,8 +5,110 @@ # in file LICENSE that is included with this distribution. #************************************************************************* + +=title Long String Output Record (lso) + +The long string output record is used to write an arbitrary ASCII string with a +maximum length of 65535 characters. + +=head2 Parameter Fields + +The record-specific fields are described below, grouped by functionality. + +=recordtype lso + +=cut + +include "menuIvoa.dbd" + recordtype(lso) { - include "dbCommon.dbd" + +=head3 Scan Parameters + +The long string output record has the standard fields for specifying under what +circumstances it will be processed. These fields are listed in L. +In addition, L explains how these fields are used. + +=head3 Desired Output Parameters + +The long 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: +C or C. If C is specified, DOL is +ignored, the current value of VAL is written, and VAL can be changed externally +via dbPuts at run-time. If C 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. + +The maximum number of characters in VAL is given by SIZV, and cannot be larger +than 65535. + +DOL can also be a constant in addition to a link, in which case VAL is +initialized to the constant value. Your string constant, however, may be +interpreted as a CA link name. If you want to initialize your string output +record, it is therefore best to use the VAL field. Note that if DOL is a +constant, OMSL cannot be C. + +See L
for information on specifying links. + +=fields VAL, SIZV, DOL, OMSL + +=head3 Output Specification + +The output link specified in the OUT field specifies where the long 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. + +See L
for information on specifying links. + +In addition, the appropriate device support module must be entered into the DTYP +field. + + +=fields OUT, DTYP + +=head3 Monitor Parameters + +These parameters are used to specify when the monitor post should be sent by the +C routine. There are two possible choices: + +APST is used for archiver monitors and MPST for all other type of monitors. + +=fields MPST, APST + + +=head3 Operator Display Parameters + +See L for more on the record name (NAME) and +description (DESC) fields. + +=fields NAME, DESC + +=head3 Alarm Parameters + +The long string input record has the alarm parameters common to all record +types. L lists other fields related to a alarms that are common to +all record types. + +The IVOA field specifies an action to take when the INVALID alarm is triggered. +There are three possible actions: + +=head4 Menu menuIvoa + +=menu menuIvoa + +When C<<< Set output to IVOV >>>, the value contained in the IVOV field is +written to the output link during an alarm condition. See +L +for more information on the IVOA and IVOV fields. +L +lists other fields related to a alarms that are common to all record types. + +=fields IVOA, IVOV + +=cut + + include "dbCommon.dbd" %#include "devSup.h" % %/* Declare Device Support Entry Table */ @@ -25,12 +127,18 @@ recordtype(lso) { pp(TRUE) special(SPC_DBADDR) extra("char *val") + #=type STRING[SIZV] + #=read Yes + #=write Yes } field(OVAL,DBF_NOACCESS) { prompt("Previous Value") special(SPC_DBADDR) interest(3) extra("char *oval") + #=type STRING[SIZV] + #=read Yes + #=write No } field(SIZV,DBF_USHORT) { prompt("Size of buffers") @@ -88,6 +196,24 @@ recordtype(lso) { interest(1) menu(menuPost) } + + +=head3 Run-time and Simulation Mode Parameters + +The old value field (OVAL) of the long string input record is used to implement +value change monitors for VAL. If VAL is not equal to OVAL, then monitors are +triggered. LEN contains the length of the string in VAL, OLEN contains the +length of the string in OVAL. + +=fields OVAL, LEN, OLEN + +The following fields are used to operate the string input in the simulation +mode. See L for more information on simulation mode fields. + +=fields SIOL, SIML, SIMM, SIMS + +=cut + field(SIML,DBF_INLINK) { prompt("Sim Mode link") promptgroup("90 - Simulate") @@ -110,3 +236,37 @@ recordtype(lso) { interest(1) } } + + + +=head2 Device Support Interface + +The record requires device support to provide an entry table (dset) which +defines the following members: + + typedef struct { + long number; + long (*report)(int level); + long (*init)(int after); + long (*init_record)(lsoRecord *prec); + long (*get_ioint_info)(int cmd, lsoRecord *prec, IOSCANPVT *piosl); + long (*write_string)(lsoRecord *prec); + } lsodset; + +The module must set C to at least 5, and provide a pointer to its +C routine; the other function pointers may be C if their +associated functionality is not required for this support layer. +Most device supports also provide an C routine to configure the +record instance and connect it to the hardware or driver support layer. + + +=head2 Device Support for Soft Records + +Device support for DTYP C is provided for writing values to other +records or other software components. + +Device support for DTYP C is provided for writing values to the stdout, +stderr, or errlog streams. C addressing C<@stdout>, C<@stderr> or +C<@errlog> is used on the OUT link field to select the desired stream. + +=cut diff --git a/src/std/rec/printfRecord.dbd.pod b/src/std/rec/printfRecord.dbd.pod index 4fd63ef3c..3f4c859c1 100644 --- a/src/std/rec/printfRecord.dbd.pod +++ b/src/std/rec/printfRecord.dbd.pod @@ -2,10 +2,174 @@ # Copyright (c) 2012 UChicago Argonne LLC, as Operator of Argonne # National Laboratory. # EPICS BASE is distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# in file LICENSE that is included with this distribution. #************************************************************************* + +=title Printf Record (printf) + +The printf record is used to generate and write a string using a format +specification and parameters, analogous to the C C function. + +=head2 Parameter Fields + +The record-specific fields are described below, grouped by functionality. + +=recordtype printf + +=cut + recordtype(printf) { + +=head3 Scan Parameters + +The printf record has the standard fields for specifying under what +circumstances it will be processed. These fields are listed in L. +In addition, L explains how these fields are used. + +=head3 String Generation Parameters + +The printf record must specify the desired output string with embedded format +specifiers in the FMT field. Plain characters are copied directly to the output +string. A pair of percent characters 'C<%%>' are converted into a single percent +character in the output string. A single precent character 'C<%>' introduces a +format specifier and is followed by zero or more of the standard C +format flags and modifiers: + +=over 4 + +=item * + +Plus ('C<+>') + +=item * + +Minus ('C<->') + +=item * + +Space ('C< >') + +=item * + +Hash ('C<#>') + +=item * + +Minimum Field Width (decimal digits or 'C<*>') + +=item * + +Precision ('C<.>' followed by decimal digits or 'C<*>') + +=item * + +Length Modifier 'C' E Reads link as DBR_CHAR or DBR_UCHAR + +=item * + +Length Modifier 'C' E Reads link as DBR_SHORT or DBR_USHORT for +integer conversions, DBR_FLOAT for floating-point conversions. + +=item * + +Length Modifier 'C' E Reads link as DBR_LONG or DBR_ULONG for integer +conversions, array of DBR_CHAR for string conversion. + +=back + + +The following character specifies the conversion to perform, see your operating +system's C documentation for more details. These conversions +ultimately call the C routine for the actual string conversion +process, so are subject to the behaviour of that routine. + +=over 4 + +=item * + +'C' E Convert to a character. Only single byte characters are +permitted. + +=item * + +'C' or 'C' E Convert to a decimal integer. + +=item * + +'C' E Convert to an unsigned octal integer. + +=item * + +'C' E Convert to an unsigned decimal integer. + +=item * + +'C' E Convert to an unsigned hexadecimal integer, using C. + +=item * + +'C' E Convert to an unsigned hexadecimal integer, using C. + +=item * + +'C' or 'C' E Convert to floating-point in exponent style, reading +the link as DBR_DOUBLE or DBR_FLOAT. + +=item * + +'C' or 'C' E Convert to floating-point in fixed-point style, +reading the link as DBR_DOUBLE or DBR_FLOAT. + +=item * + +'C' or 'C' E Convert to floating-point in general style, reading +the link as DBR_DOUBLE or DBR_FLOAT. + +=item * + +'C' E Insert string, reading the link as DBR_STRING or array of +DBR_CHAR. + +=back + +The fields INP0 ... INP9 are input links that provide the parameter values to be +formatted into the output. The format specifiers in the FMT string determine +which type of the data is requested through the appropriate input link. As with +C a C<*> character may be used in the format to specify width and/or +precision instead of numeric literals, in which case additional input links are +used to provide the necessary integer parameter or parameters. See L
for information on specifying links. + +The formatted string is written to the VAL field. The maximum number of +characters in VAL is given by SIZV, and cannot be larger than 65535. The LEN +field contains the length of the formatted string in the VAL field. + +=fields FMT, INP0, INP1, INP2, INP3, INP4, INP5, INP6, INP7, INP8, INP9, VAL, SIZV, LEN + + +=head3 Output Specification + +The output link specified in the OUT field specifies where the printf record is +to write the contents of its VAL field. The link can be a database or channel +access link. If the OUT field is a constant, no output will be written. + +See L
for information on specifying links. + +In addition, the appropriate device support module must be entered into the DTYP +field. + +=fields OUT, DTYP + +=head3 Operator Display Parameters + +See L for more on the record name (NAME) and +description (DESC) fields. + +=fields NAME, DESC + +=cut + include "dbCommon.dbd" %#include "devSup.h" % @@ -25,6 +189,9 @@ recordtype(printf) { pp(TRUE) special(SPC_DBADDR) extra("char *val") + #=type STRING[SIZV] + #=read Yes + #=write Yes } field(SIZV,DBF_USHORT) { prompt("Size of VAL buffer") @@ -48,6 +215,21 @@ recordtype(printf) { pp(TRUE) size(81) } + + +=head3 Alarm Parameters + +The printf record has the alarm parameters common to all record types. +L lists other fields related to a alarms that are common to all +record types. + +The IVLS field specifies a string which is sent to the OUT link if if input +link data are invalid. + +=fields IVLS + +=cut + field(IVLS,DBF_STRING) { prompt("Invalid Link String") promptgroup("30 - Action") @@ -107,3 +289,35 @@ recordtype(printf) { %/* Number of INPx fields defined */ %#define PRINTF_NLINKS 10 } + + +=head2 Device Support Interface + +The record requires device support to provide an entry table (dset) which +defines the following members: + + typedef struct { + long number; + long (*report)(int level); + long (*init)(int after); + long (*init_record)(printfRecord *prec); + long (*get_ioint_info)(int cmd, printfRecord *prec, IOSCANPVT *piosl); + long (*write_string)(printfRecord *prec); + } printfdset; + +The module must set C to at least 5, and provide a pointer to its +C routine; the other function pointers may be C if their +associated functionality is not required for this support layer. +Most device supports also provide an C routine to configure the +record instance and connect it to the hardware or driver support layer. + +=head2 Device Support for Soft Records + +A soft device support module Soft Channel is provided for writing values to +other records or other software components. + +Device support for DTYP C is provided for writing values to the stdout, +stderr, or errlog streams. C addressing C<@stdout>, C<@stderr> or +C<@errlog> is used on the OUT link field to select the desired stream. + +=cut