From 3b846dda9a1415114cda4ca18c7df8d8946f3a5b Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Tue, 29 Jul 2025 17:52:37 +0200 Subject: [PATCH] Revert "extend sub record to inputs A-U" This reverts commit 6196554b17f83c45a0168a62424ca3a21391e3fa. This commit would break backward compatibility. Postpone until 7.0.10. --- modules/database/src/std/rec/subRecord.c | 6 +- .../database/src/std/rec/subRecord.dbd.pod | 144 ++---------------- 2 files changed, 12 insertions(+), 138 deletions(-) diff --git a/modules/database/src/std/rec/subRecord.c b/modules/database/src/std/rec/subRecord.c index 401c6a8eb..be274d18f 100644 --- a/modules/database/src/std/rec/subRecord.c +++ b/modules/database/src/std/rec/subRecord.c @@ -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; } diff --git a/modules/database/src/std/rec/subRecord.dbd.pod b/modules/database/src/std/rec/subRecord.dbd.pod index 6ba8a7060..6e6edd4bb 100644 --- a/modules/database/src/std/rec/subRecord.dbd.pod +++ b/modules/database/src/std/rec/subRecord.dbd.pod @@ -30,17 +30,17 @@ These fields are described in L. =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 +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 @@ -115,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 @@ -161,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. @@ -170,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. @@ -241,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 * @@ -500,51 +500,6 @@ 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") @@ -700,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) @@ -796,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)