diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index 441425505..4c62f055f 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -15,6 +15,15 @@ EPICS Base 3.15.0.x releases are not intended for use in production systems.
A new field has been added to dbCommon which configures the alarm severity +associated with the record being undefined (when UDF=TRUE). The default value is +INVALID so old databases will not be affected, but now individual records can be +configured to have a lower severity or even no alarm when undefined. Be careful +when changing this on applications where the IVOA field of output records is +used, IVOA still requires an INVALID severity to trigger value replacement.
+tapfiles
This new make target runs the same tests as the runtests
target, but
diff --git a/src/ioc/db/dbCommon.dbd b/src/ioc/db/dbCommon.dbd
index 981e3b01a..f87853bec 100644
--- a/src/ioc/db/dbCommon.dbd
+++ b/src/ioc/db/dbCommon.dbd
@@ -110,7 +110,6 @@
prompt("Alarm Severity")
special(SPC_NOMOD)
menu(menuAlarmSevr)
- initial("INVALID")
}
field(NSTA,DBF_MENU) {
prompt("New Alarm Status")
@@ -241,6 +240,13 @@
interest(1)
initial("1")
}
+ field(UDFS,DBF_MENU) {
+ prompt("Undefined Alarm Sevrty")
+ promptgroup(GUI_COMMON)
+ interest(1)
+ menu(menuAlarmSevr)
+ initial("INVALID")
+ }
%#include "epicsTime.h"
field(TIME,DBF_NOACCESS) {
prompt("Time")
diff --git a/src/ioc/misc/iocInit.c b/src/ioc/misc/iocInit.c
index 7b0197d97..f13cf6bb3 100644
--- a/src/ioc/misc/iocInit.c
+++ b/src/ioc/misc/iocInit.c
@@ -33,6 +33,7 @@
#include "caeventmask.h"
#define epicsExportSharedSymbols
+#include "alarm.h"
#include "dbBase.h"
#include "dbFldTypes.h"
#include "link.h"
@@ -415,6 +416,10 @@ static void doInitRecord0(dbRecordType *pdbRecordType, dbCommon *precord,
/* Reset the process active field */
precord->pact = FALSE;
+ /* Initial UDF severity */
+ if (precord->udf && precord->stat == UDF_ALARM)
+ precord->sevr = precord->udfs;
+
/* Init DSET NOTE that result may be NULL */
pdevSup = dbDTYPtoDevSup(pdbRecordType, precord->dtyp);
precord->dset = pdevSup ? pdevSup->pdset : NULL;
diff --git a/src/std/dev/devTimestamp.c b/src/std/dev/devTimestamp.c
index 203d7f708..a43a2d352 100644
--- a/src/std/dev/devTimestamp.c
+++ b/src/std/dev/devTimestamp.c
@@ -62,7 +62,7 @@ static long read_stringin (stringinRecord *prec)
prec->inp.value.instio.string, &prec->time);
if (len >= sizeof prec->val) {
prec->udf = TRUE;
- recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+ recGblSetSevr(prec, UDF_ALARM, prec->udfs);
return -1;
}
prec->udf = FALSE;
diff --git a/src/std/rec/aiRecord.c b/src/std/rec/aiRecord.c
index 2188f53a2..4f2211e52 100644
--- a/src/std/rec/aiRecord.c
+++ b/src/std/rec/aiRecord.c
@@ -323,7 +323,7 @@ static void checkAlarms(aiRecord *prec, epicsTimeStamp *lastTime)
epicsEnum16 asev;
if (prec->udf) {
- recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+ recGblSetSevr(prec, UDF_ALARM, prec->udfs);
prec->afvl = 0;
return;
}
diff --git a/src/std/rec/aoRecord.c b/src/std/rec/aoRecord.c
index 307f21658..31bd3c12c 100644
--- a/src/std/rec/aoRecord.c
+++ b/src/std/rec/aoRecord.c
@@ -378,7 +378,7 @@ static void checkAlarms(aoRecord *prec)
epicsEnum16 asev;
if (prec->udf) {
- recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+ recGblSetSevr(prec, UDF_ALARM, prec->udfs);
return;
}
diff --git a/src/std/rec/biRecord.c b/src/std/rec/biRecord.c
index b58bb65d5..c8dda1da5 100644
--- a/src/std/rec/biRecord.c
+++ b/src/std/rec/biRecord.c
@@ -204,7 +204,7 @@ static void checkAlarms(biRecord *prec)
if(prec->udf == TRUE){
- recGblSetSevr(prec,UDF_ALARM,INVALID_ALARM);
+ recGblSetSevr(prec,UDF_ALARM,prec->udfs);
return;
}
diff --git a/src/std/rec/boRecord.c b/src/std/rec/boRecord.c
index ed6364734..df8f17671 100644
--- a/src/std/rec/boRecord.c
+++ b/src/std/rec/boRecord.c
@@ -353,7 +353,7 @@ static void checkAlarms(boRecord *prec)
/* check for udf alarm */
if(prec->udf == TRUE ){
- recGblSetSevr(prec,UDF_ALARM,INVALID_ALARM);
+ recGblSetSevr(prec,UDF_ALARM,prec->udfs);
}
/* check for state alarm */
diff --git a/src/std/rec/calcRecord.c b/src/std/rec/calcRecord.c
index c048cf2e3..1efe71de6 100644
--- a/src/std/rec/calcRecord.c
+++ b/src/std/rec/calcRecord.c
@@ -298,7 +298,7 @@ static void checkAlarms(calcRecord *prec, epicsTimeStamp *timeLast)
epicsEnum16 asev;
if (prec->udf) {
- recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+ recGblSetSevr(prec, UDF_ALARM, prec->udfs);
prec->afvl = 0;
return;
}
diff --git a/src/std/rec/calcoutRecord.c b/src/std/rec/calcoutRecord.c
index 1c712eaa3..580546e64 100644
--- a/src/std/rec/calcoutRecord.c
+++ b/src/std/rec/calcoutRecord.c
@@ -526,7 +526,7 @@ static void checkAlarms(calcoutRecord *prec)
epicsEnum16 asev;
if (prec->udf) {
- recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+ recGblSetSevr(prec, UDF_ALARM, prec->udfs);
return;
}
@@ -591,7 +591,7 @@ static void execOutput(calcoutRecord *prec)
break;
}
if (prec->udf){
- recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+ recGblSetSevr(prec, UDF_ALARM, prec->udfs);
}
/* Check to see what to do if INVALID */
diff --git a/src/std/rec/dfanoutRecord.c b/src/std/rec/dfanoutRecord.c
index 9ffb66969..3deba1dc6 100644
--- a/src/std/rec/dfanoutRecord.c
+++ b/src/std/rec/dfanoutRecord.c
@@ -207,7 +207,7 @@ static void checkAlarms(dfanoutRecord *prec)
epicsEnum16 asev;
if (prec->udf) {
- recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+ recGblSetSevr(prec, UDF_ALARM, prec->udfs);
return;
}
diff --git a/src/std/rec/longinRecord.c b/src/std/rec/longinRecord.c
index 817f7cc66..a0f52e6b4 100644
--- a/src/std/rec/longinRecord.c
+++ b/src/std/rec/longinRecord.c
@@ -255,7 +255,7 @@ static void checkAlarms(longinRecord *prec, epicsTimeStamp *timeLast)
epicsEnum16 asev;
if (prec->udf) {
- recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+ recGblSetSevr(prec, UDF_ALARM, prec->udfs);
prec->afvl = 0;
return;
}
diff --git a/src/std/rec/longoutRecord.c b/src/std/rec/longoutRecord.c
index ba1fa34b9..6c7e8f10b 100644
--- a/src/std/rec/longoutRecord.c
+++ b/src/std/rec/longoutRecord.c
@@ -272,7 +272,7 @@ static void checkAlarms(longoutRecord *prec)
epicsEnum16 asev;
if (prec->udf) {
- recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+ recGblSetSevr(prec, UDF_ALARM, prec->udfs);
return;
}
diff --git a/src/std/rec/mbbiRecord.c b/src/std/rec/mbbiRecord.c
index e664cc788..e7d3e171e 100644
--- a/src/std/rec/mbbiRecord.c
+++ b/src/std/rec/mbbiRecord.c
@@ -303,7 +303,7 @@ static void checkAlarms(mbbiRecord *prec, epicsTimeStamp *timeLast)
/* Check for UDF alarm */
if (prec->udf) {
- recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+ recGblSetSevr(prec, UDF_ALARM, prec->udfs);
prec->afvl = 0;
return;
}
diff --git a/src/std/rec/mbboDirectRecord.c b/src/std/rec/mbboDirectRecord.c
index c1179c21d..99c043517 100644
--- a/src/std/rec/mbboDirectRecord.c
+++ b/src/std/rec/mbboDirectRecord.c
@@ -197,7 +197,7 @@ static long process(mbboDirectRecord *prec)
prec->val = val;
}
else if (prec->udf) {
- recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+ recGblSetSevr(prec, UDF_ALARM, prec->udfs);
goto CONTINUE;
}
diff --git a/src/std/rec/mbboRecord.c b/src/std/rec/mbboRecord.c
index 4668bd575..927d5eb75 100644
--- a/src/std/rec/mbboRecord.c
+++ b/src/std/rec/mbboRecord.c
@@ -216,7 +216,7 @@ static long process(mbboRecord *prec)
prec->val = val;
}
else if (prec->udf) {
- recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+ recGblSetSevr(prec, UDF_ALARM, prec->udfs);
goto CONTINUE;
}
diff --git a/src/std/rec/selRecord.c b/src/std/rec/selRecord.c
index 6720aa6ea..f4dfb0cc2 100644
--- a/src/std/rec/selRecord.c
+++ b/src/std/rec/selRecord.c
@@ -255,7 +255,7 @@ static void checkAlarms(selRecord *prec)
epicsEnum16 asev;
if (prec->udf) {
- recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+ recGblSetSevr(prec, UDF_ALARM, prec->udfs);
return;
}
diff --git a/src/std/rec/stringoutRecord.c b/src/std/rec/stringoutRecord.c
index 1555f5b61..d3a8ac314 100644
--- a/src/std/rec/stringoutRecord.c
+++ b/src/std/rec/stringoutRecord.c
@@ -146,7 +146,7 @@ static long process(stringoutRecord *prec)
}
if(prec->udf == TRUE ){
- recGblSetSevr(prec,UDF_ALARM,INVALID_ALARM);
+ recGblSetSevr(prec,UDF_ALARM,prec->udfs);
}
if (prec->nsev < INVALID_ALARM )
diff --git a/src/std/rec/subArrayRecord.c b/src/std/rec/subArrayRecord.c
index f40f5ac0c..1112a3057 100644
--- a/src/std/rec/subArrayRecord.c
+++ b/src/std/rec/subArrayRecord.c
@@ -152,7 +152,7 @@ static long process(subArrayRecord *prec)
prec->udf = !!status; /* 0 or 1 */
if (status)
- recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+ recGblSetSevr(prec, UDF_ALARM, prec->udfs);
monitor(prec);
diff --git a/src/std/rec/subRecord.c b/src/std/rec/subRecord.c
index 8a8d7822e..6c3187dd1 100644
--- a/src/std/rec/subRecord.c
+++ b/src/std/rec/subRecord.c
@@ -320,7 +320,7 @@ static void checkAlarms(subRecord *prec)
epicsEnum16 asev;
if (prec->udf) {
- recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+ recGblSetSevr(prec, UDF_ALARM, prec->udfs);
return;
}
diff --git a/src/template/base/top/exampleApp/src/xxxRecord.c b/src/template/base/top/exampleApp/src/xxxRecord.c
index 4281eb983..f4b65d204 100644
--- a/src/template/base/top/exampleApp/src/xxxRecord.c
+++ b/src/template/base/top/exampleApp/src/xxxRecord.c
@@ -203,7 +203,7 @@ static void checkAlarms(xxxRecord *prec)
unsigned short hhsv, llsv, hsv, lsv;
if(prec->udf == TRUE ){
- recGblSetSevr(prec,UDF_ALARM,INVALID_ALARM);
+ recGblSetSevr(prec,UDF_ALARM,prec->udfs);
return;
}
hihi = prec->hihi; lolo = prec->lolo; high = prec->high; low = prec->low;