diff --git a/documentation/new-notes/PR-655.md b/documentation/new-notes/PR-655.md new file mode 100644 index 000000000..254ba1356 --- /dev/null +++ b/documentation/new-notes/PR-655.md @@ -0,0 +1,7 @@ +### Records calc, calcout and sub extended + +The record types calc, calcout and sub have been extended from 12 inputs +A - L to 21 inputs A - U. +The macro `CALCPERFORM_NARGS` reflects this change. +The new inputs can be used in calc links and access security as well. +The size of CALC and OCAL fields has been doubled to 160 chars. diff --git a/modules/database/src/std/link/links.dbd.pod b/modules/database/src/std/link/links.dbd.pod index 5247f6950..27689e321 100644 --- a/modules/database/src/std/link/links.dbd.pod +++ b/modules/database/src/std/link/links.dbd.pod @@ -81,11 +81,13 @@ link(calc, lnkCalcIf) =head3 Calculation Link C<"calc"> A calculation link is an input link that can evaluate mathematical expressions -on scalar (double-precision floating-point) values obtained from up to 12 child +on scalar (double-precision floating-point) values obtained from up to 21 child input links, and returns a double-precision floating-point result. The expression is evaluated by the EPICS Calc engine, and the result is returned as the value of the link. +Since UNRELEASED the number of inputs has been increased from 12 to 21. + Two additional expressions may also be provided and are evaluated to determine whether the record owning the link should be placed in alarm state. In both cases the result of the main calculation is available to these expressions as @@ -95,7 +97,7 @@ record will be placed in C alarm. If not and the C expression evaluates to non-zero the record will be placed in C alarm state. A calculation link can also be an output link, with the scalar output value -being converted to a double and provided to the expression as C. Up to 12 +being converted to a double and provided to the expression as C. Up to 21 additional input links can also be read and provided to the expression as above. The result of the calculation is forwarded to a child output link specified in the link's C parameter. @@ -126,8 +128,8 @@ An optional expression that returns non-zero to raise a minor alarm. =item args -A JSON list of up to 12 input arguments for the expression, which are assigned -to the inputs C, C, C, ... C. Each input argument may be either a +A JSON list of up to 24 input arguments for the expression, which are assigned +to the inputs C, C, C, ... C. Each input argument may be either a numeric literal or an embedded JSON link inside C<{}> braces. The same input values are provided to the two alarm expressions as to the primary expression. @@ -149,7 +151,7 @@ result should be displayed. Equivalent to the C field of a record. =item time -An optional string containing a single upper or lower-case letter C ... C +An optional string containing a single upper or lower-case letter C ... C which must correspond to an input provided in the C parameter. When the record containing such a link has C set to -2 (epicsTimeEventDeviceTime) the record's timestamp field C