Updates to existing .dbd.pod texts, add event and fanout from wiki

This commit is contained in:
Andrew Johnson
2019-08-29 12:54:21 -05:00
committed by Andrew Johnson
parent 03e613cec0
commit 86b1882186
8 changed files with 556 additions and 124 deletions
+4 -10
View File
@@ -70,7 +70,7 @@ output value PVAL is added to it.
=head4 Drive Limits
The output value is now clipped to the range DRVL to DRVH inclusive, provided
that DRVH > DRVL.
that DRVH E<gt> DRVL.
The result is copied into both the VAL and PVAL fields.
=head4 Limit Rate of Change
@@ -164,9 +164,7 @@ OUT field must specify the address of the I/O card. In addition, the
DTYP field must contain the name of the device support module. Be aware
that the address format differs according to the I/O bus used. See
Address Specification for information on the format of hardware
addresses. The user 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.
addresses.
For soft records the output link can be a database link, a channel
access link, or a constant value. If the link is a constant, no output
@@ -593,7 +591,7 @@ terminated.
For compatibility with old device supports that don't know EOFF, if
both EOFF and ESLO have their default value, EOFF is set to EGUL.
If device support includes init_record, it is called.
If device support includes C<init_record()>, it is called.
INIT is set TRUE. This causes PBRK, LBRK, and smoothing to be
re-initialized. If "backwards" linear conversion is requested, then VAL
@@ -620,10 +618,6 @@ called.
INIT is set TRUE. This causes PBRK, LBRK, and smoothing to be
re-initialized.
=item get_value
Fills in the values of struct valueDes so that they refer to VAL.
=item get_alarm_double
Sets the following values:
@@ -903,7 +897,7 @@ OUT link type must be either a CONSTANT, DB_LINK, or CA_LINK.
This module writes the current value of OVAL.
If the OUT link type is PV_LINK, then dbCaAddInlink is called by
init_record. init_record always returns a value of 2, which means that
C<init_record()>. C<init_record()> always returns a value of 2, which means that
no conversion will ever be attempted.
write_ao calls recGblPutLinkValue to write the current value of VAL.
+35 -31
View File
@@ -69,9 +69,7 @@ If the binary input record gets its value from hardware, the address of the
card must be entered in the INP field, and the name of the device support
module must be entered in the DTYP field. See L<Address Specification> for
information on the format of the hardware address. Be aware that the format
differs between types of cards. You can see a list of device support
modules currently supported at the user's local site by using C<dbst>
utility (R3.13).
differs between types of cards.
For records that specify C<Soft Channel> or C<Raw Soft Channel> device
support routines, the INP field can be a channel or a database link, or a
@@ -94,18 +92,18 @@ the device support module reads a value directly into VAL or the
C<Soft Channel> device support is used. The value can also be fetched as one of
the strings specified in the ZNAM or ONAM fields. The ZNAM field has a
string that corresponds to the 0 state, so when the value is fetched as
this string, C<put_enum_str> will return a 0. The ONAM field hold the
this string, C<put_enum_str()> will return a 0. The ONAM field hold the
string that corresponds to the 1 state, so when the value is fetched as
this string, C<put_enum_str> returns a 1.
this string, C<put_enum_str()> returns a 1.
=fields ZNAM, ONAM
=head3 Operator Display Parameters
These parameters are used to present meaningful data to the operator. The
C<get_enum_str> record support routine can retrieve the state string
corresponding to the VAL's state. If the value is 1, C<get_enum_str> will
return the string in the ONAM field; and if 0, C<get_enum_str> will return
C<get_enum_str()> record support routine can retrieve the state string
corresponding to the VAL's state. If the value is 1, C<get_enum_str()> will
return the string in the ONAM field; and if 0, C<get_enum_str()> will return
the ZNAM string.
See L<Fields Common to All Record Types> for more on the record name (NAME)
@@ -149,7 +147,7 @@ The LALM fields holds the value of the last occurence of the change of
state alarm. It is used to implement the change of state alarm, and thus
only has meaning if COSV is MAJOR or MINOR.
The MSLT field is used by the C<process> record support routine to
The MSLT field is used by the C<process()> record support routine to
determine if archive and value change monitors are invoked. They are if MSLT
is not equal to VAL.
@@ -276,16 +274,12 @@ This routine next checks to see that device support is available and a
device support routine is defined. If neither exist, an error is issued and
processing is terminated.
If device support includes C<init_record>, it is called.
If device support includes C<init_record()>, it is called.
=head2 C<process>
See next section.
=head2 C<get_value>
Fills in the values of struct valueDes so that they refer to VAL.
=head2 C<get_enum_str>
Retrieves ASCII string corresponding to VAL.
@@ -311,7 +305,7 @@ 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.
=item 2.
C<readValue> is called. See L<Input Records> for details.
C<readValue()> is called. See L<Input Records> for details.
=item 3.
If PACT has been changed to TRUE, the device support read routine has
@@ -332,7 +326,7 @@ status = read_bi
PACT = TRUE
=item *
TIME = tslocaltime
C<recGblGetTimeStamp()> is called.
=item *
if status is 0, then set VAL=(0,1) if RVAL is (0, not 0) and UDF = False.
@@ -383,7 +377,7 @@ Scan forward link if necessary, set PACT FALSE, and return.
Each binary input record must have an associated set of device support
routines. The primary resposibility of the device support routines is to
obtain a new raw input value whenever C<read_bi> is called. The device
obtain a new raw input value whenever C<read_bi()> is called. The device
support routines are primarily interested in the following fields:
=fields PACT, DPVT, UDF, NSEV, NSTA, VAL, INP, RVAL, MASK
@@ -392,22 +386,32 @@ support routines are primarily interested in the following fields:
Device support consists of the following routines:
=head2 C<report(FILE fp, paddr)>
=head4 long report(int level)
Not currently used.
This optional routine is called by the IOC command C<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 C<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.
=head2 C<init()>
=head4 long init(int after)
This routine is called once during IOC initialization.
This optional routine is called twice at IOC initialization time.
The first call happens before any of the C<init_record()> calls are made, with
the integer parameter C<after> set to 0.
The second call happens after all of the C<init_record()> calls have been made,
with C<after> set to 1.
=head2 C<init_record(precord)>
This routine is optional. If provided, it is called by the record support
C<init_record> routine.
C<init_record()> routine.
=head2 C<get_ioint_info(int cmd, struct dbCommon *precord, IOSCANPVT *ppvt)>
This routine is called by the C<ioEventScan> system each time the record is
This routine is called by the ioEventScan system each time the record is
added or deleted from an I/O event scan list. C<cmd> has the value (0,1) if
the record is being (added to, deleted from) and I/O event list. It must be
provided for any device type that can use the ioEvent scanner.
@@ -439,25 +443,25 @@ link type must be either CONSTANT, DB_LINK, or CA_LINK.
=head3 Soft Channel
C<read_bi> always returns a value of 2, which means that no conversion is
C<read_bi()> always returns a value of 2, which means that no conversion is
performed.
If the INP link type is CONSTANT, then the constant value is stored in VAL
by C<init_record>, and the UDF is set to FALSE. VAL can be changed via
C<dbPut> requests. If the INP link type is PV_LINK, the C<dbCaAddInlink> is
called by C<init_record>.
by C<init_record()>, and the UDF is set to FALSE. VAL can be changed via
C<dbPut()> requests. If the INP link type is PV_LINK, the C<dbCaAddInlink()> is
called by C<init_record()>.
C<read_bi> calls C<recGbleGetLinkValue> to read the current value of VAL.
C<read_bi()> calls C<dbGetLinkValue> to read the current value of VAL.
See L<Soft Input> for details.
If the return status of C<recGblGetLinkValue> is zero, then C<read_bi> sets
UDF to FALSE. The status of C<recGblGetLinkValue> is returned.
If the return status of C<dbGetLinkValue()> is zero, then C<read_bi()> sets
UDF to FALSE. The status of C<dbGetLinkValue()> is returned.
=head3 Raw Soft Channel
This module is like the previous except that values are read into RVAL.
C<read_bi> returns a value of 0. Thus the record processing routine will
C<read_bi()> returns a value of 0. Thus the record processing routine will
force VAL to be 0 or 1.
=cut
+28 -23
View File
@@ -130,8 +130,7 @@ It must specify the address of an I/O card if the record sends its output
to hardware, and the DTYP field must contain the corresponding device
support module. Be aware that the address format differs according to the
I/O bus used. See L<Address Specification> for information on the format of
hardware addresses. You can see a list of device support modules currently
supported at the user's local site by using the C<dbst> utility in R3.13.
hardware addresses.
Otherwise, if the record is configured to use the soft device support
modules, then it can be either a database link, a channel access link, or a
@@ -143,9 +142,9 @@ this chapter for more on output to other records.
=head3 Operator Display Parameters
These parameters are used to present meaningful data to the operator, The
C<get_enum_str> record support routine can retrieve the state string
corresponding to the VAL's state. So, if the value is 1, C<get_enum_str>
will return the string in the ONAM field: and if 0, C<get_enum_str> will
C<get_enum_str()> record support routine can retrieve the state string
corresponding to the VAL's state. So, if the value is 1, C<get_enum_str()>
will return the string in the ONAM field: and if 0, C<get_enum_str()> will
return the ZNAM string.
See L<Fields Common to All Record Types> for more on the record name (NAME)
@@ -194,7 +193,7 @@ The LALM field holds the value of the last occurrence of the change of
state alarm. It is used to implement the change of state alarm, and thus
only has meaning if COSV is MINOR or MAJOR.
The MLST is used by the C<process> record support routine to determine if
The MLST is used by the C<process()> record support routine to determine if
archive and value change monitors are invoked. They are if MLST is not
equal to VAL.
@@ -373,17 +372,13 @@ exist, and error message is issued and processing is terminated.
If DOL is a constant, then VAL is initialized to 1 if its value is nonzero
or initialzed to 0 if DOL is zero, and UDF is set to FALSE.
If device support includes C<init_record>, it is called. VAL is set using
If device support includes C<init_record()>, it is called. VAL is set using
RVAL, and UDF is set to FALSE.
=head2 C<process>
See next section.
=head2 C<get_value>
Fills in the values of struct valueDes so that they refer to VAL.
=head2 C<get_enum_str>
Retrieves ASCII string corresponding to VAL.
@@ -416,7 +411,7 @@ If PACT is FALSE
=over
=item *
If DOL is DB_LINK and OMSL is CLOSED_LOOP
If DOL holds a link and OMSL is C<closed_loop>
=over
@@ -500,27 +495,37 @@ Scan forward link if necessary, set PACT FALSE, and return
Each binary 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 C<write_bo> is called. The device support routines
write a new value whenever C<write_bo()> is called. The device support routines
are primarily interested in the following fields:
=fields PACT, DPVT, NSEV, NSTA, VAL, OUT, RVAL, MASK, RBV
=head3 Decive Support Routines
=head3 Device Support Routines
Device support consists of the following routines:
=head2 C<report(FILE fp, paddr)>
=head4 long report(int level)
Not currently used.
This optional routine is called by the IOC command C<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 C<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.
=head2 C<init()>
=head4 long init(int after)
This routine is called once during IOC initialization.
This optional routine is called twice at IOC initialization time.
The first call happens before any of the C<init_record()> calls are made, with
the integer parameter C<after> set to 0.
The second call happens after all of the C<init_record()> calls have been made,
with C<after> set to 1.
=head2 C<init_record(precord)>
This routine is optional. If provided, it is called by record support
C<init_record> routine. It should determine MASK if it is needed.
C<init_record()> routine. It should determine MASK if it is needed.
=over
@@ -566,10 +571,10 @@ link type must be either CONSTANT, DB_LINK, or CA_LINK.
This module writes the current value of VAL.
If the OUT link type is PV_LINK, then C<dbCaAddInlink> is called by
C<init_record>. C<init_record> always returns a value of 2, which means
that no conversion will ever be attempted. C<write_bo> calls
C<recGblPutLinkValue> to write the current value of VAL. See L<Soft Output>
If the OUT link type is PV_LINK, then C<dbCaAddInlink()> is called by
C<init_record()>. C<init_record()> always returns a value of 2, which means
that no conversion will ever be attempted. C<write_bo()> calls
C<recGblPutLinkValue()> to write the current value of VAL. See L<Soft Output>
for details.
=head3 Raw Soft Channel
+23 -27
View File
@@ -261,22 +261,22 @@ ATAN: Arc tangent
=over 1
=item *
>= : Greater than or equal to
C<<< >= >>> : Greater than or equal to
=item *
> : Greater than
C<<< > >>> : Greater than
=item *
<= : Less than or equal to
C<<< <= >>> : Less than or equal to
=item *
< : Less than
C<<< < >>> : Less than
=item *
# : Not equal to
C<<< # >>> : Not equal to
=item *
= : Equal to
C<<< = >>> : Equal to
=back
@@ -285,13 +285,13 @@ ATAN: Arc tangent
=over 1
=item *
&& : And
C<&&> : And
=item *
|| : Or
C<||> : Or
=item *
! : Not
C<!> : Not
=back
@@ -300,10 +300,10 @@ ATAN: Arc tangent
=over 1
=item *
| : Bitwise Or
C<|> : Bitwise Or
=item *
& : Bitwise And
C<&> : Bitwise And
=item *
OR : Bitwise Or
@@ -315,13 +315,13 @@ AND : Bitwise And
XOR : Bitwise Exclusive Or
=item *
~ : One's Complement
C<~> : One's Complement
=item *
<< : Left shift
C<<< << >>> : Left shift
=item *
>> : Right shift
C<<< >> >>> : Right shift
=back
@@ -330,7 +330,7 @@ XOR : Bitwise Exclusive Or
=over 1
=item *
:= : assigns a value (right hand side) to a variable (i.e. field)
C<:=> : assigns a value (right hand side) to a variable (i.e. field)
=back
@@ -360,35 +360,35 @@ C<A + B + 10>
=over 1
=item *
Result is A + B + 10
Result is C<A + B + 10>
=back
=head3 Relational
C<(A + B) < (C + D)>
C<<< (A + B) < (C + D) >>>
=over 1
=item *
Result is 1 if (A + B) < (C + D)
Result is 1 if C<<< (A + B) < (C + D) >>>
=item *
Result is 0 if (A + B) >= (C + D)
Result is 0 if C<<< (A + B) >= (C + D) >>>
=back
=head3 Question Mark
C<(A + B) < (C + D) ? E : F + L + 10>
C<<< (A + B) < (C + D) ? E : F + L + 10 >>>
=over 1
=item *
Result is E if (A + B) < (C + D)
Result is C<E> if C<<< (A + B) < (C + D) >>>
=item *
Result is F + L + 10 if (A + B) >= (C + D)
Result is C<F + L + 10> if C<<< (A + B) >= (C + D) >>>
=back
@@ -412,7 +412,7 @@ C<(A + B) < (C + D) ? E : VAL>
=head3 Logical
C<A&B>
C<A & B>
=over 1
@@ -851,10 +851,6 @@ See next section.
This is called if CALC is changed. C<special> calls postfix.
=head2 C<get_value>
Fills in the values of struct valueDes so that the refer to VAL.
=head2 C<get_units>
Retrieves EGU.
+56 -26
View File
@@ -293,22 +293,22 @@ ATAN: Arc tangent
=over 1
=item *
>= : Greater than or equal to
C<<< >= >>> : Greater than or equal to
=item *
> : Greater than
C<<< > >>> : Greater than
=item *
<= : Less than or equal to
C<<< <= >>> : Less than or equal to
=item *
< : Less than
C<<< < >>> : Less than
=item *
# : Not equal to
C<<< # >>> : Not equal to
=item *
= : Equal to
C<<< = >>> : Equal to
=back
@@ -332,10 +332,10 @@ ATAN: Arc tangent
=over 1
=item *
| : Bitwise Or
C<|> : Bitwise Or
=item *
& : Bitwise And
C<&> : Bitwise And
=item *
OR : Bitwise Or
@@ -347,13 +347,13 @@ AND : Bitwise And
XOR : Bitwise Exclusive Or
=item *
~ : One's Complement
C<~> : One's Complement
=item *
<< : Left shift
C<<< << >>> : Left shift
=item *
>> : Right shift
C<<< >> >>> : Right shift
=back
@@ -362,11 +362,11 @@ XOR : Bitwise Exclusive Or
=over 1
=item *
:= : assigns a value (right hand side) to a variable (i.e. field)
C<:=> : assigns a value (right hand side) to a variable (i.e. field)
=back
=head3 Parentheses and Comma
=head3 Parantheses, Comma, and Semicolon
The open and close parentheses are supported. Nested parentheses are
supported.
@@ -374,6 +374,10 @@ supported.
The comma is supported when used to separate the arguments of a binary
function.
The semicolon is used to separate expressions. Although only one
traditional calculation expression is allowed, multiple assignment
expressions are allowed.
=head3 Conditional Expression
The C language's question mark operator is supported. The format is:
@@ -388,41 +392,59 @@ C<A + B + 10>
=over 1
=item *
Result is A + B + 10
Result is C<A + B + 10>
=back
=head3 Relational
C<(A + B) < (C + D)>
C<<< (A + B) < (C + D) >>>
=over 1
=item *
Result is 1 if (A + B) < (C + D)
Result is 1 if C<<< (A + B) < (C + D) >>>
=item *
Result is 0 if (A + B) >= (C + D)
Result is 0 if C<<< (A + B) >= (C + D) >>>
=back
=head3 Question Mark
C<(A + B) < (C + D) ? E : F + L + 10>
C<<< (A + B) < (C + D) ? E : F + L + 10 >>>
=over 1
=item *
Result is E if (A + B) < (C + D)
Result is C<E> if C<<< (A + B) < (C + D) >>>
=item *
Result is F + L + 10 if (A + B) >= (C + D)
Result is C<F + L + 10> if C<<< (A + B) >= (C + D) >>>
=back
Prior to Base 3.14.9 it was legal to omit the : and the second (else) part
of the conditional, like this:
C<(A + B)<(C + D) ? E>
=over 1
=item
Result is E if (A + B)<(C + D)
=item
Result is unchanged if (A + B)>=(C + D)
From 3.14.9 onwards, this expresion must be written as
C<(A + B) < (C + D) ? E : VAL>
=back
=head3 Logical
C<A&B>
C<A & B>
=over 1
@@ -447,6 +469,18 @@ Convert result to floating point
=back
=head3 Assignment
C<sin(a); a:=a+D2R>
=over 1
=item *
Causes the Calc record to output the successive values of a sine curve in
1 degree intervals.
=back
=head3 Output Parameters
These parameters specify and control the output capabilities of the Calcout
@@ -529,7 +563,7 @@ are also meant to represent the status of the record at run-time.
The EGU field contains a string of up to 16 characters which is supplied by
the user and which describes the values being operated upon. The string is
retrieved whenever the routine C<get_units> is called. The EGU string is
retrieved whenever the routine C<get_units()> is called. The EGU string is
solely for an operator's sake and does not have to be used.
The HOPR and LOPR fields on;y refer to the limits if the VAL, HIHI, HIGH,
@@ -1146,10 +1180,6 @@ See next section.
This is called id CALC or OCAL is changed. C<special> calls postfix.
=head2 C<get_value>
Fills in the values of struct valueDes so that they refer to VAL.
=head2 C<get_units>
Retrieves EGU.
-5
View File
@@ -379,11 +379,6 @@ and the DOL link, a non-zero value is returned if an error occurs.
See next section.
=head2 C<get_value()>
This routine fills in the members of C<struct valueDes> with the VAL fields
value and characteristics.
=head2 C<get_units()>
The routine copies the string specified in the EGU field to the location
+224 -1
View File
@@ -6,8 +6,63 @@
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
=title Event Record (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.
=head2 Parameter Fields
The records in this field fall into the following groups of parameters:
=over
=item *
scan parameters
=item *
read parameters
=item *
event number parameters
=item *
simulation mode parameters
=back
=recordtype event
=cut
recordtype(event) {
include "dbCommon.dbd"
include "dbCommon.dbd"
=head3 Scan Parameters
The event record has the standard fields for specifying under what circumstances
it will be processed. If the SCAN field specifies C<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 L<Scan Fields>. In addition,
L<Scanning Specification> explains how the scanning fields work. Note that I/O
event scanning is only supported for those card types that interrupt.
=head3 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 C<Soft Channel> device
support, it can be configured before run-time or set via dbPuts.
=fields VAL
=cut
field(VAL,DBF_STRING) {
prompt("Event Name To Post")
promptgroup("40 - Input")
@@ -22,11 +77,52 @@ recordtype(event) {
interest(4)
extra("EVENTPVT epvt")
}
=head3 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 L<Address Specification> for information on the format of
hardware addresses and specifying links.
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 C<Soft Channel>.
=fields INP, DTYP
=cut
field(INP,DBF_INLINK) {
prompt("Input Specification")
promptgroup("40 - Input")
interest(1)
}
=head3 Operator Display Parameters
See L<Fields Common to All Record Types> for more on the record name (NAME) and
description (DESC) fields.
=fields NAME, DESC
=head3 Alarm Parameters
The Event record has the alarm parameters common to all record types. L<Alarm
Fields> lists other fields related to alarms that are common to all record
types.
=head3 Simulation Mode Parameters
The following fields are used to operate the event record in the simulation
mode. See L<Fields Common to Many Record Types> for more information on these
fields.
=fields SIOL, SVAL, SIML, SIMM, SIMS
=cut
field(SIOL,DBF_INLINK) {
prompt("Sim Input Specifctn")
promptgroup("90 - Simulate")
@@ -52,4 +148,131 @@ recordtype(event) {
interest(2)
menu(menuAlarmSevr)
}
=head2 Record Support
=head3 Record Support Routines
=head4 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 C<init_record()>, it is called.
=head4 process
See next section.
=head3 Record Processing
Routine process implements the following algorithm:
=over
=item 1.
readValue is called. See L<Input Records> for more information.
=item 2.
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.
=item 3.
If VAL E<gt> 0, post event number VAL.
=item 4.
Check to see if monitors should be invoked. Alarm monitors are invoked if the
alarm status or severity has chanet to 0.
=item 5.
Scan forward link if necessary, set PACT FALSE, and return.
=back
=head2 Device Support
=head3 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:
=fields PACT, DPVT, UDF, NSEV, NSTA, INP, PRIO
=head3 Device Support Routines
Device support consists of the following routines:
=head4 long report(int level)
This optional routine is called by the IOC command C<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 C<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.
=head4 long init(int after)
This optional routine is called twice at IOC initialization time.
The first call happens before any of the C<init_record()> calls are made, with
the integer parameter C<after> set to 0.
The second call happens after all of the C<init_record()> calls have been made,
with C<after> set to 1.
=head4 init_record
init_record(precord)
This routine is optional. If provided, it is called by the record support
C<init_record()> routine.
=head4 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.
=head4 read_event
read_event(precord)
This routine returns the following values:
=over
=item *
0: Success.
=item *
Other: Error.
=back
=head3 Device Support For Soft Records
The C<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
C<init_record()>, and UDF is set to FALSE. If the INP link type is PV_LINK, then
dbCaAddInlink is called by C<init_record()>.
C<read_event> calls recGblGetLinkValue to read the current value of VAL. See
L<Input Records> for details on soft input.
=cut
}
+186 -1
View File
@@ -6,13 +6,121 @@
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
=title Fanout Record (fanout)
The fanout record uses several forward processing links to force multiple
passive records to scan. When more than one record needs to be scanned as the
result of a record being processed, the forward link of that record can specify
a fanout record. The fanout record can specify up to sixteen other records to
process. If more than sixteen are needed, one of the forward links in the fanout
record (or its FLNK field) can point to another fanout record.
B<NOTE: Fanout records only propagate processing, not data.> The dfanout or
data fanout record can, on the other hand, send data to other records.
=head2 Parameter Fields
The fanout record's fields fall into the following categories:
=over
=item *
scan parameters
=item *
operator display parameters
=item *
run-time parameters.
=back
=recordtype fanout
=cut
menu(fanoutSELM) {
choice(fanoutSELM_All,"All")
choice(fanoutSELM_Specified,"Specified")
choice(fanoutSELM_Mask,"Mask")
}
recordtype(fanout) {
include "dbCommon.dbd"
include "dbCommon.dbd"
=head3 Scan Parameters
The forward link fields of the fanout record (LNK0-LNK9, LNKA-LNKF) specify
records to be scanned. The records to be processed must specify C<Passive> in
their SCAN fields; otherwise the forward link will not cause them to process.
Also when specifying database links for the fanout record, the user needs only
to specify the record name. As no value is being sent or retrieved, a field name
is only required when the link will be over Channel Access, in which case the
field PROC must be named.
The SELM, SELN, and SELL fields specify the order of processing for the forward
links. The select mechanism menu field (SELM) has three choices:
=menu fanoutSELM
How the SELM value affects which links to process and in which order is as
follows:
=over
=item *
B<All>
Links are processed in numerical order - LNK0, LNK1, etc.
=item *
B<Specified> The sum of the values in the SELN and OFFS fields is used as the
specifier of which link to process. For instance, with OFFS=0 and SELN=1, the
record targeted by LNK1 will be processed.
=item *
B<Mask> The individual bits in SELN are shifted by SHFT bits (negative means
shift left) and the result used to select which links to process as follows:
=over
=item *
If bit 0 (LSB) is set, LNK0 is processed.
=item *
If bit 1 is set, LNK2 is processed.
=item *
If bit 2 is set, LNK3 is processed, etc.
=back
=back
SELN reads its value from SELL. SELL can be a constant, a database link, or a
channel access link. If a constant, SELN is initialized with the constant value
and can be changed via dbPuts. For database/channel access links, SELN is
retrieved from SELL each time the record is processed and can also be changed
via dbPuts.
The Fanout record also has the standard scanning fields common to all records.
These fields are listed in L<Scan Fields>. In addition,
L<Scanning Specification> explains in more detail how forward links and the
scanning algorithms work.
=fields SELM, SELN, SELL, OFFS, SHFT, LNK0, LNK1, LNK2, LNK3, LNK4, LNK5, LNK6, LNK7, LNK8, LNK9, LNKA, LNKB, LNKC, LNKD, LNKE, LNKF
=cut
field(VAL,DBF_LONG) {
prompt("Used to trigger")
asl(ASL0)
@@ -126,4 +234,81 @@ recordtype(fanout) {
promptgroup("52 - Output 8-F")
interest(1)
}
=head3 Operator Display Parameters
These parameters are used to present meaningful data to the operator. See
L<Fields Common to All Record Types> for more on these fields.
=fields NAME, DESC
=head3 Alarm Parameters
The Fanout record has the alarm parameters common to all record types.
L<Alarm Fields> lists other fields related to a alarms that are common to all
record types.
=head3 Run-time Parameters
The VAL field performs no specific function, but a Channel Access put to it will
cause the record to process.
=fields VAL
=head2 Record Support
=head3 Record Support Routines
=head4 init_record
This routine initializes SELN with the value of SELL, if SELL type is CONSTANT
link, or creates a channel access link if SELL type is PV_LINK.
=head4 process
See next section.
=head3 Record Processing
Routine process implements the following algorithm:
=over
=item 1.
PACT is set to TRUE.
=item 2.
The link selection SELN is fetched.
=item 3.
Depending on the selection mechanism, the link selection forward links are
processed, and UDF is set to FALSE.
=item 4.
Check to see if monitors should be invoked:
=over
=item *
Alarm monitors are invoked if the alarm status or severity has changed.
=item *
NSEV and NSTA are reset to 0.
=back
=item 5.
Scan forward link field FLNK if used, set PACT FALSE, and return.
=back
=cut
}