EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: [Merge] ~info-martin-konrad/epics-base:deprecation-warning-state-record into epics-base:7.0
From: Martin Konrad via Core-talk <core-talk at aps.anl.gov>
To: mp+379159 at code.launchpad.net
Date: Thu, 13 Feb 2020 16:59:23 -0000
Martin Konrad has proposed merging ~info-martin-konrad/epics-base:deprecation-warning-state-record into epics-base:7.0.

Requested reviews:
  EPICS Core Developers (epics-core)

For more details, see:
https://code.launchpad.net/~info-martin-konrad/epics-base/+git/epics-base/+merge/379159

Rebased on 7.0.
-- 
Your team EPICS Core Developers is requested to review the proposed merge of ~info-martin-konrad/epics-base:deprecation-warning-state-record into epics-base:7.0.
diff --git a/documentation/RELEASE_NOTES.md b/documentation/RELEASE_NOTES.md
index 2adeacf..4bd4297 100644
--- a/documentation/RELEASE_NOTES.md
+++ b/documentation/RELEASE_NOTES.md
@@ -12,6 +12,12 @@ The external PVA submodules each have their own separate set of release notes
 which should also be read to understand what has changed since an earlier
 release.
 
+### `state` record deprecated
+
+IOCs now emit a warning when a database file containing the `state` record is
+loaded. This record has been deprecated for a while and will be removed
+beginning with EPICS 7.1. Consider using the `stringin` record instead.
+
 ## EPICS Release 7.0.3.1
 
 **IMPORTANT NOTE:** *Some record types in this release will not be compatible
diff --git a/modules/database/src/std/rec/stateRecord.c b/modules/database/src/std/rec/stateRecord.c
index fd5b9fb..9697fda 100644
--- a/modules/database/src/std/rec/stateRecord.c
+++ b/modules/database/src/std/rec/stateRecord.c
@@ -28,6 +28,7 @@
 #include "errMdef.h"
 #include "recSup.h"
 #include "recGbl.h"
+#include "errlog.h"
 
 #define GEN_SIZE_OFFSET
 #include "stateRecord.h"
@@ -37,7 +38,7 @@
 /* Create RSET - Record Support Entry Table*/
 #define report NULL
 #define initialize NULL
-#define init_record NULL
+static long init_record(stateRecord *prec, int pass);
 static long process(struct dbCommon *);
 #define special NULL
 #define get_value NULL
@@ -77,6 +78,19 @@ epicsExportAddress(rset,stateRSET);
 
 static void monitor(stateRecord *);
 
+static long init_record(stateRecord *prec, int pass)
+{
+    if(pass == 0) {
+        errlogPrintf(
+            "WARNING: Using deprecated record type \"state\" for record "
+            "\"%s\". This record type will be removed beginning with EPICS 7.1."
+            "Please replace it by a stringin record.\n",
+            prec->name
+        );
+    }
+    return 0;
+}
+
 static long process(struct dbCommon *pcommon)
 {
     struct stateRecord *prec = (struct stateRecord *)pcommon;

Replies:
Re: [Merge] ~info-martin-konrad/epics-base:deprecation-warning-state-record into epics-base:7.0 Martin Konrad via Core-talk
Re: [Merge] ~info-martin-konrad/epics-base:deprecation-warning-state-record into epics-base:7.0 mdavidsaver via Core-talk
[Merge] ~info-martin-konrad/epics-base:deprecation-warning-state-record into epics-base:7.0 mdavidsaver via Core-talk

Navigate by Date:
Prev: [Merge] ~info-martin-konrad/epics-base:deprecation-warning-state-record into epics-base:3.15 Martin Konrad via Core-talk
Next: Jenkins build became unstable: epics-7.0 » linux32 #195 APS Jenkins via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Jenkins build is back to stable : epics-base-3.15-win32s-test #271 APS Jenkins via Core-talk
Next: Re: [Merge] ~info-martin-konrad/epics-base:deprecation-warning-state-record into epics-base:7.0 Martin Konrad via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 30 Apr 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·