g+
g+ Communities
Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
<== Date ==> <== Thread ==>

Subject: [Merge] lp:~anj/epics-base/udf-severity into lp:epics-base
From: Andrew Johnson <anj@aps.anl.gov>
To: mp+139024@code.launchpad.net
Date: Mon, 10 Dec 2012 16:28:16 -0000
Andrew Johnson has proposed merging lp:~anj/epics-base/udf-severity into lp:epics-base.

Requested reviews:
  EPICS Core Developers (epics-core)

For more details, see:
https://code.launchpad.net/~anj/epics-base/udf-severity/+merge/139024

This branch adds a new alarm severity field UDFS to dbCommon, which is used as the alarm severity whenever a record is put in an undefined state (UDF=TRUE).  It defaults to INVALID, so there should be no change to the default behavior of existing databases.  Out-of-tree record types will need upgrading to implement this properly, usually in the checkAlarms() routine; the base record types that check UDF have been modified in this branch.

I'm not sure whether doing this is a good idea or not; I suspect it would be very useful in some cases, but there could be bad effects on databases that have been designed to use IVOA and someone who doesn't understand the design changes UDFS on some critical record(s).  Discussion encouraged.
-- 
https://code.launchpad.net/~anj/epics-base/udf-severity/+merge/139024
Your team EPICS Core Developers is requested to review the proposed merge of lp:~anj/epics-base/udf-severity into lp:epics-base.
=== modified file 'documentation/RELEASE_NOTES.html'
--- documentation/RELEASE_NOTES.html	2012-11-09 23:06:32 +0000
+++ documentation/RELEASE_NOTES.html	2012-12-10 16:27:31 +0000
@@ -15,6 +15,15 @@
 <h2 align="center">Changes between 3.15.0.1 and 3.15.0.2</h2>
 <!-- Insert new items immediately below here ... -->
 
+<h3>New Undefined Severity field UDFS</h3>
+
+<p>A new field has been added to dbCommon which configures the alarm severity
+associated with the record being undefined (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.</p>
+
 <h3>Redirection of the errlog console stream</h3>
 
 <p>A new routine has been added to the errlog facility which allows the console

=== modified file 'src/ioc/db/dbCommon.dbd'
--- src/ioc/db/dbCommon.dbd	2009-12-29 02:37:09 +0000
+++ src/ioc/db/dbCommon.dbd	2012-12-10 16:27:31 +0000
@@ -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")

=== modified file 'src/ioc/misc/iocInit.c'
--- src/ioc/misc/iocInit.c	2012-07-17 19:33:31 +0000
+++ src/ioc/misc/iocInit.c	2012-12-10 16:27:31 +0000
@@ -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 @@
     /* 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;

=== modified file 'src/std/dev/devTimestamp.c'
--- src/std/dev/devTimestamp.c	2012-07-18 21:45:23 +0000
+++ src/std/dev/devTimestamp.c	2012-12-10 16:27:31 +0000
@@ -62,7 +62,7 @@
                               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;

=== modified file 'src/std/rec/aiRecord.c'
--- src/std/rec/aiRecord.c	2012-10-18 05:10:12 +0000
+++ src/std/rec/aiRecord.c	2012-12-10 16:27:31 +0000
@@ -323,7 +323,7 @@
     epicsEnum16 asev;
 
     if (prec->udf) {
-        recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+        recGblSetSevr(prec, UDF_ALARM, prec->udfs);
         prec->afvl = 0;
         return;
     }

=== modified file 'src/std/rec/aoRecord.c'
--- src/std/rec/aoRecord.c	2012-10-18 05:10:12 +0000
+++ src/std/rec/aoRecord.c	2012-12-10 16:27:31 +0000
@@ -378,7 +378,7 @@
     epicsEnum16 asev;
 
     if (prec->udf) {
-        recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+        recGblSetSevr(prec, UDF_ALARM, prec->udfs);
         return;
     }
 

=== modified file 'src/std/rec/biRecord.c'
--- src/std/rec/biRecord.c	2010-10-05 19:27:37 +0000
+++ src/std/rec/biRecord.c	2012-12-10 16:27:31 +0000
@@ -204,7 +204,7 @@
 
 
         if(prec->udf == TRUE){
-                recGblSetSevr(prec,UDF_ALARM,INVALID_ALARM);
+                recGblSetSevr(prec,UDF_ALARM,prec->udfs);
                 return;
         }
 

=== modified file 'src/std/rec/boRecord.c'
--- src/std/rec/boRecord.c	2012-01-21 22:35:40 +0000
+++ src/std/rec/boRecord.c	2012-12-10 16:27:31 +0000
@@ -353,7 +353,7 @@
 
         /* check for udf alarm */
         if(prec->udf == TRUE ){
-			recGblSetSevr(prec,UDF_ALARM,INVALID_ALARM);
+			recGblSetSevr(prec,UDF_ALARM,prec->udfs);
         }
 
         /* check for  state alarm */

=== modified file 'src/std/rec/calcRecord.c'
--- src/std/rec/calcRecord.c	2012-10-18 05:10:12 +0000
+++ src/std/rec/calcRecord.c	2012-12-10 16:27:31 +0000
@@ -299,7 +299,7 @@
     epicsEnum16 asev;
 
     if (prec->udf) {
-        recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+        recGblSetSevr(prec, UDF_ALARM, prec->udfs);
 	prec->afvl = 0;
         return;
     }

=== modified file 'src/std/rec/calcoutRecord.c'
--- src/std/rec/calcoutRecord.c	2012-10-18 05:10:12 +0000
+++ src/std/rec/calcoutRecord.c	2012-12-10 16:27:31 +0000
@@ -526,7 +526,7 @@
     epicsEnum16 asev;
 
     if (prec->udf) {
-        recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+        recGblSetSevr(prec, UDF_ALARM, prec->udfs);
         return;
     }
 
@@ -591,7 +591,7 @@
         break;
     }
     if (prec->udf){
-        recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+        recGblSetSevr(prec, UDF_ALARM, prec->udfs);
     }
 
     /* Check to see what to do if INVALID */

=== modified file 'src/std/rec/dfanoutRecord.c'
--- src/std/rec/dfanoutRecord.c	2012-10-18 05:10:12 +0000
+++ src/std/rec/dfanoutRecord.c	2012-12-10 16:27:31 +0000
@@ -207,7 +207,7 @@
     epicsEnum16 asev;
 
     if (prec->udf) {
-        recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+        recGblSetSevr(prec, UDF_ALARM, prec->udfs);
         return;
     }
 

=== modified file 'src/std/rec/longinRecord.c'
--- src/std/rec/longinRecord.c	2012-07-06 19:26:20 +0000
+++ src/std/rec/longinRecord.c	2012-12-10 16:27:31 +0000
@@ -255,7 +255,7 @@
     epicsEnum16 asev;
 
     if (prec->udf) {
-        recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+        recGblSetSevr(prec, UDF_ALARM, prec->udfs);
         prec->afvl = 0;
         return;
     }

=== modified file 'src/std/rec/longoutRecord.c'
--- src/std/rec/longoutRecord.c	2012-01-21 21:20:11 +0000
+++ src/std/rec/longoutRecord.c	2012-12-10 16:27:31 +0000
@@ -272,7 +272,7 @@
     epicsEnum16 asev;
 
     if (prec->udf) {
-        recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+        recGblSetSevr(prec, UDF_ALARM, prec->udfs);
         return;
     }
 

=== modified file 'src/std/rec/mbbiRecord.c'
--- src/std/rec/mbbiRecord.c	2012-06-18 17:13:14 +0000
+++ src/std/rec/mbbiRecord.c	2012-12-10 16:27:31 +0000
@@ -311,7 +311,7 @@
 
     /* check for udf alarm */
     if (prec->udf) {
-        recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+        recGblSetSevr(prec, UDF_ALARM, prec->udfs);
         prec->afvl = 0;
         return;
     }

=== modified file 'src/std/rec/mbboDirectRecord.c'
--- src/std/rec/mbboDirectRecord.c	2012-12-08 04:15:48 +0000
+++ src/std/rec/mbboDirectRecord.c	2012-12-10 16:27:31 +0000
@@ -175,7 +175,7 @@
 	    }
 	}
 	if(prec->udf) {
-	    recGblSetSevr(prec,UDF_ALARM,INVALID_ALARM);
+	    recGblSetSevr(prec,UDF_ALARM,prec->udfs);
 	    goto CONTINUE;
 	}
 	if(prec->nsev < INVALID_ALARM

=== modified file 'src/std/rec/mbboRecord.c'
--- src/std/rec/mbboRecord.c	2012-06-18 17:13:14 +0000
+++ src/std/rec/mbboRecord.c	2012-12-10 16:27:31 +0000
@@ -219,7 +219,7 @@
             }
         }
         if (prec->udf==TRUE) {
-            recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+            recGblSetSevr(prec, UDF_ALARM, prec->udfs);
             goto CONTINUE;
         }
         /* convert val to rval */

=== modified file 'src/std/rec/selRecord.c'
--- src/std/rec/selRecord.c	2012-10-18 05:10:12 +0000
+++ src/std/rec/selRecord.c	2012-12-10 16:27:31 +0000
@@ -255,7 +255,7 @@
     epicsEnum16 asev;
 
     if (prec->udf) {
-        recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+        recGblSetSevr(prec, UDF_ALARM, prec->udfs);
         return;
     }
 

=== modified file 'src/std/rec/stringoutRecord.c'
--- src/std/rec/stringoutRecord.c	2010-10-05 19:27:37 +0000
+++ src/std/rec/stringoutRecord.c	2012-12-10 16:27:31 +0000
@@ -146,7 +146,7 @@
 	}
 
         if(prec->udf == TRUE ){
-                recGblSetSevr(prec,UDF_ALARM,INVALID_ALARM);
+                recGblSetSevr(prec,UDF_ALARM,prec->udfs);
         }
 
         if (prec->nsev < INVALID_ALARM )

=== modified file 'src/std/rec/subArrayRecord.c'
--- src/std/rec/subArrayRecord.c	2012-01-21 21:20:11 +0000
+++ src/std/rec/subArrayRecord.c	2012-12-10 16:27:31 +0000
@@ -152,7 +152,7 @@
 
     prec->udf = !!status; /* 0 or 1 */
     if (status)
-        recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+        recGblSetSevr(prec, UDF_ALARM, prec->udfs);
 
     monitor(prec);
 

=== modified file 'src/std/rec/subRecord.c'
--- src/std/rec/subRecord.c	2012-10-18 05:10:12 +0000
+++ src/std/rec/subRecord.c	2012-12-10 16:27:31 +0000
@@ -321,7 +321,7 @@
     epicsEnum16 asev;
 
     if (prec->udf) {
-        recGblSetSevr(prec, UDF_ALARM, INVALID_ALARM);
+        recGblSetSevr(prec, UDF_ALARM, prec->udfs);
         return;
     }
 


Replies:
Re: [Merge] lp:~anj/epics-base/udf-severity into lp:epics-base Ben Franksen

Navigate by Date:
Prev: mbboDirect changes Andrew Johnson
Next: Re: [Merge] lp:~anj/epics-base/udf-severity into lp:epics-base Ben Franksen
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
Navigate by Thread:
Prev: mbboDirect changes Andrew Johnson
Next: Re: [Merge] lp:~anj/epics-base/udf-severity into lp:epics-base Ben Franksen
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
ANJ, 10 Dec 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICSv4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·