Revert subRecord extension to 21 inputs
This partially reverts commit 79624b72e5
The change breaks existing binaries for sub record functions.
Re-apply when upgrading to 7.0.10
This commit is contained in:
@@ -86,7 +86,7 @@ static long do_sub(subRecord *);
|
||||
static long fetch_values(subRecord *);
|
||||
static void monitor(subRecord *);
|
||||
|
||||
#define INP_ARG_MAX 21
|
||||
#define INP_ARG_MAX 12
|
||||
|
||||
static long init_record(struct dbCommon *pcommon, int pass)
|
||||
{
|
||||
@@ -196,9 +196,9 @@ static long special(DBADDR *paddr, int after)
|
||||
#define indexof(field) subRecord##field
|
||||
|
||||
static long get_linkNumber(int fieldIndex) {
|
||||
if (fieldIndex >= indexof(A) && fieldIndex < indexof(A) + INP_ARG_MAX)
|
||||
if (fieldIndex >= indexof(A) && fieldIndex <= indexof(L))
|
||||
return fieldIndex - indexof(A);
|
||||
if (fieldIndex >= indexof(LA) && fieldIndex < indexof(LA) + INP_ARG_MAX)
|
||||
if (fieldIndex >= indexof(LA) && fieldIndex <= indexof(LL))
|
||||
return fieldIndex - indexof(LA);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
The subroutine record is used to call a C initialization routine and a recurring
|
||||
scan routine. There is no device support for this record.
|
||||
|
||||
Since UNRELEASED the number of inputs has been increased from 12 to 21.
|
||||
|
||||
=recordtype sub
|
||||
|
||||
=cut
|
||||
@@ -32,17 +30,17 @@ These fields are described in L<Scan Fields|dbCommonRecord/Scan Fields>.
|
||||
|
||||
=head3 Read Parameters
|
||||
|
||||
The subroutine record has 21 input links INPA - INPU, each of which has a
|
||||
corresponding value field A - U. These fields are used to retrieve and store
|
||||
The subroutine record has twelve input links (INPA-INPL), each of which has a
|
||||
corresponding value field (A-L). These fields are used to retrieve and store
|
||||
values that can be passed to the subroutine that the record calls.
|
||||
|
||||
The input links can be either channel access or database links, or constants.
|
||||
When constants, the corresponding value field for the link is initialized with
|
||||
the constant value and the field's value can be changed at run-time via dbPuts.
|
||||
Otherwise, the values for A - U are fetched from the input links when the
|
||||
record is processed.
|
||||
Otherwise, the values for (A-F) are fetched from the input links when the record
|
||||
is processed.
|
||||
|
||||
=fields INPA - INPU, A - U
|
||||
=fields INPA - INPL, A - L
|
||||
|
||||
=head3 Subroutine Connection
|
||||
|
||||
@@ -117,11 +115,11 @@ processing routines or the monitors.
|
||||
VAL should be set by the subroutine. SADR holds the subroutine address and is
|
||||
set by the record processing routine.
|
||||
|
||||
The rest of these fields--LALM, ALST, MLST, and the LA-LU fields--are used to
|
||||
The rest of these fields--LALM, ALST, MLST, and the LA-LL fields--are used to
|
||||
implement the monitors. For example, when LA is not equal to A, the value-change
|
||||
monitors are called for that field.
|
||||
|
||||
=fields VAL, SADR, LALM, ALST, MLST, LA - LU
|
||||
=fields VAL, SADR, LALM, ALST, MLST, LA - LL
|
||||
|
||||
=head2 Record Support
|
||||
|
||||
@@ -163,7 +161,7 @@ recGblGetPrec() >>>.
|
||||
long (*get_graphic_double)(struct dbAddr *paddr, struct dbr_grDouble *p)
|
||||
|
||||
Sets the upper display and lower display limits for a field. If the field is
|
||||
VAL, A-U, LA-LU, HIHI, HIGH, LOW, or LOLO, the limits are set to HOPR and LOPR,
|
||||
VAL, A-L, LA-LL, HIHI, HIGH, LOW, or LOLO, the limits are set to HOPR and LOPR,
|
||||
else if the field has upper and lower limits defined they will be used, else the
|
||||
upper and lower maximum values for the field type will be used.
|
||||
|
||||
@@ -172,7 +170,7 @@ upper and lower maximum values for the field type will be used.
|
||||
long (*get_control_double)(struct dbAddr *paddr, struct dbr_ctrlDouble *p)
|
||||
|
||||
Sets the upper control and the lower control limits for a field. If the field is
|
||||
VAL, A-U, LA-LU, HIHI, HIGH, LOW, or LOLO, the limits are set to HOPR and LOPR,
|
||||
VAL, A-L, LA-LL, HIHI, HIGH, LOW, or LOLO, the limits are set to HOPR and LOPR,
|
||||
else if the field has upper and lower limits defined they will be used, else the
|
||||
upper and lower maximum values for the field type will be used.
|
||||
|
||||
@@ -243,7 +241,7 @@ met.
|
||||
|
||||
=item *
|
||||
|
||||
Monitors for A-U are invoked if value has changed.
|
||||
Monitors for A-L are invoked if value has changed.
|
||||
|
||||
=item *
|
||||
|
||||
@@ -502,103 +500,58 @@ processing.
|
||||
promptgroup("42 - Input G-L")
|
||||
interest(1)
|
||||
}
|
||||
field(INPM,DBF_INLINK) {
|
||||
prompt("Input M")
|
||||
promptgroup("43 - Input M-R")
|
||||
interest(1)
|
||||
}
|
||||
field(INPN,DBF_INLINK) {
|
||||
prompt("Input N")
|
||||
promptgroup("43 - Input M-R")
|
||||
interest(1)
|
||||
}
|
||||
field(INPO,DBF_INLINK) {
|
||||
prompt("Input O")
|
||||
promptgroup("43 - Input M-R")
|
||||
interest(1)
|
||||
}
|
||||
field(INPP,DBF_INLINK) {
|
||||
prompt("Input P")
|
||||
promptgroup("43 - Input M-R")
|
||||
interest(1)
|
||||
}
|
||||
field(INPQ,DBF_INLINK) {
|
||||
prompt("Input Q")
|
||||
promptgroup("43 - Input M-R")
|
||||
interest(1)
|
||||
}
|
||||
field(INPR,DBF_INLINK) {
|
||||
prompt("Input R")
|
||||
promptgroup("43 - Input M-R")
|
||||
interest(1)
|
||||
}
|
||||
field(INPS,DBF_INLINK) {
|
||||
prompt("Input S")
|
||||
promptgroup("44 - Input S-U")
|
||||
interest(1)
|
||||
}
|
||||
field(INPT,DBF_INLINK) {
|
||||
prompt("Input T")
|
||||
promptgroup("44 - Input S-U")
|
||||
interest(1)
|
||||
}
|
||||
field(INPU,DBF_INLINK) {
|
||||
prompt("Input U")
|
||||
promptgroup("44 - Input S-U")
|
||||
interest(1)
|
||||
}
|
||||
field(EGU,DBF_STRING) {
|
||||
prompt("Engineering Units")
|
||||
promptgroup("80 - Display")
|
||||
interest(1)
|
||||
size(16)
|
||||
prop(YES) # get_units
|
||||
prop(YES)
|
||||
}
|
||||
field(HOPR,DBF_DOUBLE) {
|
||||
prompt("High Operating Range")
|
||||
promptgroup("80 - Display")
|
||||
interest(1)
|
||||
prop(YES) # get_graphic_double, get_control_double
|
||||
prop(YES)
|
||||
}
|
||||
field(LOPR,DBF_DOUBLE) {
|
||||
prompt("Low Operating Range")
|
||||
promptgroup("80 - Display")
|
||||
interest(1)
|
||||
prop(YES) # get_graphic_double, get_control_double
|
||||
prop(YES)
|
||||
}
|
||||
field(HIHI,DBF_DOUBLE) {
|
||||
prompt("Hihi Alarm Limit")
|
||||
promptgroup("70 - Alarm")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
prop(YES) # get_alarm_double
|
||||
prop(YES)
|
||||
}
|
||||
field(LOLO,DBF_DOUBLE) {
|
||||
prompt("Lolo Alarm Limit")
|
||||
promptgroup("70 - Alarm")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
prop(YES) # get_alarm_double
|
||||
prop(YES)
|
||||
}
|
||||
field(HIGH,DBF_DOUBLE) {
|
||||
prompt("High Alarm Limit")
|
||||
promptgroup("70 - Alarm")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
prop(YES) # get_alarm_double
|
||||
prop(YES)
|
||||
}
|
||||
field(LOW,DBF_DOUBLE) {
|
||||
prompt("Low Alarm Limit")
|
||||
promptgroup("70 - Alarm")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
prop(YES) # get_alarm_double
|
||||
prop(YES)
|
||||
}
|
||||
field(PREC,DBF_SHORT) {
|
||||
prompt("Display Precision")
|
||||
promptgroup("80 - Display")
|
||||
interest(1)
|
||||
prop(YES) # get_precision
|
||||
prop(YES)
|
||||
}
|
||||
field(BRSV,DBF_MENU) {
|
||||
prompt("Bad Return Severity")
|
||||
@@ -612,7 +565,7 @@ processing.
|
||||
promptgroup("70 - Alarm")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
prop(YES) # get_alarm_double
|
||||
prop(YES)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(LLSV,DBF_MENU) {
|
||||
@@ -620,7 +573,7 @@ processing.
|
||||
promptgroup("70 - Alarm")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
prop(YES) # get_alarm_double
|
||||
prop(YES)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(HSV,DBF_MENU) {
|
||||
@@ -628,7 +581,7 @@ processing.
|
||||
promptgroup("70 - Alarm")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
prop(YES) # get_alarm_double
|
||||
prop(YES)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(LSV,DBF_MENU) {
|
||||
@@ -636,7 +589,7 @@ processing.
|
||||
promptgroup("70 - Alarm")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
prop(YES) # get_alarm_double
|
||||
prop(YES)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(HYST,DBF_DOUBLE) {
|
||||
@@ -702,42 +655,6 @@ processing.
|
||||
prompt("Value of Input L")
|
||||
pp(TRUE)
|
||||
}
|
||||
field(M,DBF_DOUBLE) {
|
||||
prompt("Value of Input M")
|
||||
pp(TRUE)
|
||||
}
|
||||
field(N,DBF_DOUBLE) {
|
||||
prompt("Value of Input N")
|
||||
pp(TRUE)
|
||||
}
|
||||
field(O,DBF_DOUBLE) {
|
||||
prompt("Value of Input O")
|
||||
pp(TRUE)
|
||||
}
|
||||
field(P,DBF_DOUBLE) {
|
||||
prompt("Value of Input P")
|
||||
pp(TRUE)
|
||||
}
|
||||
field(Q,DBF_DOUBLE) {
|
||||
prompt("Value of Input Q")
|
||||
pp(TRUE)
|
||||
}
|
||||
field(R,DBF_DOUBLE) {
|
||||
prompt("Value of Input R")
|
||||
pp(TRUE)
|
||||
}
|
||||
field(S,DBF_DOUBLE) {
|
||||
prompt("Value of Input S")
|
||||
pp(TRUE)
|
||||
}
|
||||
field(T,DBF_DOUBLE) {
|
||||
prompt("Value of Input T")
|
||||
pp(TRUE)
|
||||
}
|
||||
field(U,DBF_DOUBLE) {
|
||||
prompt("Value of Input U")
|
||||
pp(TRUE)
|
||||
}
|
||||
field(LA,DBF_DOUBLE) {
|
||||
prompt("Prev Value of A")
|
||||
special(SPC_NOMOD)
|
||||
@@ -798,51 +715,6 @@ processing.
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(LM,DBF_DOUBLE) {
|
||||
prompt("Prev Value of M")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(LN,DBF_DOUBLE) {
|
||||
prompt("Prev Value of N")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(LO,DBF_DOUBLE) {
|
||||
prompt("Prev Value of O")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(LP,DBF_DOUBLE) {
|
||||
prompt("Prev Value of P")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(LQ,DBF_DOUBLE) {
|
||||
prompt("Prev Value of Q")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(LR,DBF_DOUBLE) {
|
||||
prompt("Prev Value of R")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(LS,DBF_DOUBLE) {
|
||||
prompt("Prev Value of S")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(LT,DBF_DOUBLE) {
|
||||
prompt("Prev Value of T")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(LU,DBF_DOUBLE) {
|
||||
prompt("Prev Value of U")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(LALM,DBF_DOUBLE) {
|
||||
prompt("Last Value Alarmed")
|
||||
special(SPC_NOMOD)
|
||||
|
||||
Reference in New Issue
Block a user