diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html
index 99a32458e..88becb3cc 100644
--- a/documentation/RELEASE_NOTES.html
+++ b/documentation/RELEASE_NOTES.html
@@ -17,13 +17,13 @@ EPICS Base 3.15.0.x releases are not intended for use in production systems.
Generate Version Header
-A Perl script and Makefile rules are added to allow modules
-to generate a C header file with a macro defined with an automatically updated identifier.
-This is a VCS revision ID (Darcs, Git, and Mercurial supported) or
-the time of the build if not VCS system is in use.
+A Perl script and Makefile rules have been added to allow modules to generate
+a C header file with a macro defined with an automatically updated identifier.
+This is a VCS revision ID (Darcs, Git, Mercurial Subversion and Bazaar are all
+supported) or the date/time of the build if no VCS system is in use.
-The example template is updated with a demonstration which makes this
-identifier visible with a stringin record.
+The makeBaseApp example template has been updated with a new device support
+which makes this identifier visible via a lsi (long string input) record.
Implement EPICS_CAS_INTF_ADDR_LIST in rsrv
diff --git a/src/template/base/Makefile b/src/template/base/Makefile
index 4e7de23d3..c8c1eed8b 100644
--- a/src/template/base/Makefile
+++ b/src/template/base/Makefile
@@ -28,11 +28,12 @@ TEMPLATES += top/exampleApp/Makefile
TEMPLATES += top/exampleApp/Db/Makefile
TEMPLATES += top/exampleApp/Db/dbExample1.db
TEMPLATES += top/exampleApp/Db/dbExample2.db
-TEMPLATES += top/exampleApp/Db/dbVersionExample.db
+TEMPLATES += top/exampleApp/Db/_APPNAME_Version.db
TEMPLATES += top/exampleApp/Db/dbSubExample.db
TEMPLATES += top/exampleApp/Db/user.substitutions
TEMPLATES += top/exampleApp/src/Makefile
-TEMPLATES += top/exampleApp/src/devGenVersion.c
+TEMPLATES += top/exampleApp/src/dev_APPNAME_Version.c
+TEMPLATES += top/exampleApp/src/dev_APPNAME_Version.dbd
TEMPLATES += top/exampleApp/src/xxxRecord.dbd
TEMPLATES += top/exampleApp/src/xxxRecord.c
TEMPLATES += top/exampleApp/src/devXxxSoft.c
diff --git a/src/template/base/top/exampleApp/Db/Makefile b/src/template/base/top/exampleApp/Db/Makefile
index 86bc0d620..89b452264 100644
--- a/src/template/base/top/exampleApp/Db/Makefile
+++ b/src/template/base/top/exampleApp/Db/Makefile
@@ -12,7 +12,7 @@ include $(TOP)/configure/CONFIG
# databases, templates, substitutions like this
DB += dbExample1.db
DB += dbExample2.db
-DB += dbVersionExample.db
+DB += _APPNAME_Version.db
DB += dbSubExample.db
DB += user.substitutions
diff --git a/src/template/base/top/exampleApp/Db/_APPNAME_Version.db b/src/template/base/top/exampleApp/Db/_APPNAME_Version.db
new file mode 100644
index 000000000..1b03f08ba
--- /dev/null
+++ b/src/template/base/top/exampleApp/Db/_APPNAME_Version.db
@@ -0,0 +1,6 @@
+record(lsi, "$(user):_APPNAME_:version") {
+ field(DTYP, "_APPNAME_ version")
+ field(DESC, "Version string")
+ field(SIZV, "$(SIZV=200)")
+ field(PINI, "YES")
+}
diff --git a/src/template/base/top/exampleApp/Db/dbVersionExample.db b/src/template/base/top/exampleApp/Db/dbVersionExample.db
deleted file mode 100644
index e86b75dc4..000000000
--- a/src/template/base/top/exampleApp/Db/dbVersionExample.db
+++ /dev/null
@@ -1,7 +0,0 @@
-record(waveform, "$(user):version") {
- field(DTYP, "Module Version")
- field(DESC, "Module version")
- field(FTVL, "CHAR")
- field(NELM, "$(NELM=200)")
- field(PINI, "YES")
-}
diff --git a/src/template/base/top/exampleApp/src/Makefile b/src/template/base/top/exampleApp/src/Makefile
index 2a301d872..fa2a16ce7 100644
--- a/src/template/base/top/exampleApp/src/Makefile
+++ b/src/template/base/top/exampleApp/src/Makefile
@@ -14,21 +14,22 @@ DBDINC += xxxRecord
# Install devXxxSoft.dbd into /dbd
DBD += xxxSupport.dbd
-# Compile and add the code to the support library
+# Compile and add code to the support library
_APPNAME_Support_SRCS += xxxRecord.c
_APPNAME_Support_SRCS += devXxxSoft.c
-_APPNAME_Support_SRCS += devGenVersion.c
# Link locally-provided code into the support library,
-# rather than directly into the IOC application.
+# rather than directly into the IOC application, that
+# causes problems on Windows DLL builds
_APPNAME_Support_SRCS += dbSubExample.c
+_APPNAME_Support_SRCS += dev_APPNAME_Version.c
_APPNAME_Support_SRCS += _APPNAME_Hello.c
_APPNAME_Support_SRCS += initTrace.c
_APPNAME_Support_LIBS += $(EPICS_BASE_IOC_LIBS)
-# Generate a header which defines a macro with a version string
-# with the date and time, or a revision id from VCS system if available
+# Auto-generate a header file containing a version string.
+# Version comes from the VCS if available, else date+time.
GENVERSION = _APPNAME_Version.h
# Macro name
GENVERSIONMACRO = _APPNAME_VERSION
@@ -44,6 +45,7 @@ DBD += _APPNAME_.dbd
_APPNAME__DBD += base.dbd
_APPNAME__DBD += xxxSupport.dbd
_APPNAME__DBD += dbSubExample.dbd
+_APPNAME__DBD += dev_APPNAME_Version.dbd
_APPNAME__DBD += _APPNAME_Hello.dbd
_APPNAME__DBD += initTrace.dbd
diff --git a/src/template/base/top/exampleApp/src/_APPNAME_Hello.dbd b/src/template/base/top/exampleApp/src/_APPNAME_Hello.dbd
index 47f187050..64eb0389a 100644
--- a/src/template/base/top/exampleApp/src/_APPNAME_Hello.dbd
+++ b/src/template/base/top/exampleApp/src/_APPNAME_Hello.dbd
@@ -1,2 +1 @@
registrar(helloRegister)
-device(waveform,INST_IO,devWfMyModVersion,"Module Version")
diff --git a/src/template/base/top/exampleApp/src/devGenVersion.c b/src/template/base/top/exampleApp/src/devGenVersion.c
deleted file mode 100644
index 297b69138..000000000
--- a/src/template/base/top/exampleApp/src/devGenVersion.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/* devGenVersion.c */
-/* Example device support providing the module version string as a charactor array (long string) */
-
-#include
-#include
-#include
-#include
-
-#include "recGbl.h"
-#include "alarm.h"
-#include "recSup.h"
-#include "devSup.h"
-#include "menuFtype.h"
-#include "waveformRecord.h"
-
-#include "_APPNAME_Version.h"
-
-/* must be last include */
-#include "epicsExport.h"
-
-static long read_wf(waveformRecord *prec)
-{
- size_t N = strlen(_APPNAME_VERSION)+1;
- char *buf = prec->bptr;
-
- if(prec->ftvl!=menuFtypeCHAR) {
- (void)recGblSetSevr(prec, READ_ALARM, INVALID_ALARM);
- return 0;
- }
-
- if(N>=prec->nelm)
- N = prec->nelm;
- prec->nord = N;
-
- memcpy(buf, _APPNAME_VERSION, N);
- buf[prec->nelm-1] = '\0';
-
- return 0;
-}
-
-static struct {
- long number;
- DEVSUPFUN report;
- DEVSUPFUN init;
- DEVSUPFUN init_record;
- DEVSUPFUN get_ioint_info;
- DEVSUPFUN read_si;
-}devWfMyModVersion={
- 5,
- NULL,
- NULL,
- NULL,
- NULL,
- read_wf,
-};
-epicsExportAddress(dset,devWfMyModVersion);
diff --git a/src/template/base/top/exampleApp/src/dev_APPNAME_Version.c b/src/template/base/top/exampleApp/src/dev_APPNAME_Version.c
new file mode 100644
index 000000000..4f2c28f67
--- /dev/null
+++ b/src/template/base/top/exampleApp/src/dev_APPNAME_Version.c
@@ -0,0 +1,38 @@
+/* dev_APPNAME_Version.c */
+/* Example device support for the lsi (long string input) record
+ * providing the module version string as the value
+ */
+
+#include
+#include
+#include
+
+#include "devSup.h"
+#include "lsiRecord.h"
+
+#include "_APPNAME_Version.h"
+
+/* must be last include */
+#include "epicsExport.h"
+
+const char const version[] = _APPNAME_VERSION;
+
+static long read_string(lsiRecord *prec)
+{
+ size_t N = sizeof version;
+ char *buf = prec->val;
+
+ if (N > prec->sizv)
+ N = prec->sizv;
+ prec->len = N;
+
+ memcpy(buf, version, N);
+ buf[N - 1] = '\0';
+
+ return 0;
+}
+
+static lsidset dev_CSAFEAPPNAME_Version = {
+ 5, NULL, NULL, NULL, NULL, read_string
+};
+epicsExportAddress(dset,dev_CSAFEAPPNAME_Version);
diff --git a/src/template/base/top/exampleApp/src/dev_APPNAME_Version.dbd b/src/template/base/top/exampleApp/src/dev_APPNAME_Version.dbd
new file mode 100644
index 000000000..67295f3f0
--- /dev/null
+++ b/src/template/base/top/exampleApp/src/dev_APPNAME_Version.dbd
@@ -0,0 +1 @@
+device(lsi,INST_IO,dev_CSAFEAPPNAME_Version,"_APPNAME_ version")
diff --git a/src/template/base/top/exampleBoot/ioc/st.cmd@Common b/src/template/base/top/exampleBoot/ioc/st.cmd@Common
index c4eb081ba..a2d018e3a 100644
--- a/src/template/base/top/exampleBoot/ioc/st.cmd@Common
+++ b/src/template/base/top/exampleBoot/ioc/st.cmd@Common
@@ -13,7 +13,7 @@ _CSAFEAPPNAME__registerRecordDeviceDriver pdbbase
## Load record instances
dbLoadTemplate "db/user.substitutions"
-dbLoadRecords "db/dbVersionExample.db", "user=_USER_"
+dbLoadRecords "db/_APPNAME_Version.db", "user=_USER_"
dbLoadRecords "db/dbSubExample.db", "user=_USER_"
## Set this to see messages from mySub
diff --git a/src/template/base/top/exampleBoot/ioc/st.cmd@RTEMS b/src/template/base/top/exampleBoot/ioc/st.cmd@RTEMS
index 7b6319608..cc96f84ab 100644
--- a/src/template/base/top/exampleBoot/ioc/st.cmd@RTEMS
+++ b/src/template/base/top/exampleBoot/ioc/st.cmd@RTEMS
@@ -11,7 +11,7 @@ _CSAFEAPPNAME__registerRecordDeviceDriver(pdbbase)
## Load record instances
dbLoadTemplate("db/user.substitutions")
-dbLoadRecords("db/dbVersionExample.db", "user=_USER_")
+dbLoadRecords("db/_APPNAME_Version.db", "user=_USER_")
dbLoadRecords("db/dbSubExample.db", "user=_USER_")
## Set this to see messages from mySub
diff --git a/src/template/base/top/exampleBoot/ioc/st.cmd@vxWorks b/src/template/base/top/exampleBoot/ioc/st.cmd@vxWorks
index d8a2077ce..44a9afc67 100644
--- a/src/template/base/top/exampleBoot/ioc/st.cmd@vxWorks
+++ b/src/template/base/top/exampleBoot/ioc/st.cmd@vxWorks
@@ -20,7 +20,7 @@ _CSAFEAPPNAME__registerRecordDeviceDriver pdbbase
## Load record instances
dbLoadTemplate "db/user.substitutions"
-dbLoadRecords "db/dbVersionExample.db", "user=_USER_"
+dbLoadRecords "db/_APPNAME_Version.db", "user=_USER_"
dbLoadRecords "db/dbSubExample.db", "user=_USER_"
## Set this to see messages from mySub