EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Autosave ignores PVs starting with some characters
From: "Konrad, Martin" <[email protected]>
To: Andrew Johnson <[email protected]>, Ralph Lange <[email protected]>, "J. Lewis Muir" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Thu, 8 Sep 2016 19:40:17 +0000
> Thanks for clarifying. I updated my patch accordingly.
Sorry forgot the attachment...


-- 
Martin Konrad
Control System Engineer
Facility for Rare Isotope Beams
Michigan State University
640 South Shaw Lane
East Lansing, MI 48824-1321, USA
Tel. 517-908-7253
Email: [email protected]
From 4a676142b209d3fcc08bf503b963d8ed2efc1c14 Mon Sep 17 00:00:00 2001
From: Martin Konrad <[email protected]>
Date: Thu, 8 Sep 2016 14:00:44 -0400
Subject: [PATCH] Allow special characters as first char of the PV name

Previously PVs starting with '_' and some other special characters
have not been saved. This fixes this issue [EPICS-96].
---
 ...0006-Allow-special-characters-in-PV-names.patch | 35 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 debian/patches/0006-Allow-special-characters-in-PV-names.patch

diff --git a/debian/patches/0006-Allow-special-characters-in-PV-names.patch b/debian/patches/0006-Allow-special-characters-in-PV-names.patch
new file mode 100644
index 0000000..0b8ea0b
--- /dev/null
+++ b/debian/patches/0006-Allow-special-characters-in-PV-names.patch
@@ -0,0 +1,35 @@
+From: Martin Konrad <[email protected]>
+Date: Tue, 6 Sep 2016 14:11:32 -0400
+Subject: Allow special characters in PV names
+
+---
+ asApp/src/save_restore.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/asApp/src/save_restore.c b/asApp/src/save_restore.c
+index 4a84d8c..8daaf2c 100644
+--- a/asApp/src/save_restore.c
++++ b/asApp/src/save_restore.c
+@@ -454,6 +454,13 @@ void save_restoreSet_CallbackTimeout(int t) {
+ 
+ /********************************* code *********************************/
+ 
++int isValid1stPVChar(char chr)
++{
++  return isalpha((int)chr) || isdigit((int)chr) || chr == '_' || chr == '-'
++      || chr == '+' || chr == ':' || chr == '[' || chr == ']' || chr == '<'
++      || chr == '>' || chr == ';';
++}
++
+ int isAbsolute(const char* filename)
+ {
+ 	if ( '/' == filename[0] )
+@@ -3499,7 +3506,7 @@ STATIC int readReqFile(const char *reqFile, struct chlist *plist, char *macrostr
+ 			if (save_restoreDebug >= 2) printf("save_restore:readReqFile: calling readReqFile('%s', %p,'%s')\n",
+ 				templatefile, plist, new_macro);
+ 			readReqFile(templatefile, plist, new_macro);
+-		} else if (isalpha((int)name[0]) || isdigit((int)name[0]) || name[0] == '$') {
++		} else if (isValid1stPVChar(name[0]) || name[0] == '$') {
+ 			pchannel = (struct channel *)calloc(1,sizeof (struct channel));
+ 			if (pchannel == (struct channel *)0) {
+ 				plist->status = SR_STATUS_WARN;
diff --git a/debian/patches/series b/debian/patches/series
index 68a92c5..d0bda10 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 0003-install-db-and-req-files.patch
 0004-autosave-Status-PVs-use-severity.patch
 0005-autosave-support-RTEMS-4.10-mount.patch
+0006-Allow-special-characters-in-PV-names.patch
-- 
2.7.4


Replies:
RE: Autosave ignores PVs starting with some characters Mooney, Tim M.
References:
Autosave ignores PVs starting with some characters Konrad, Martin
RE: Autosave ignores PVs starting with some characters Mooney, Tim M.
RE: Autosave ignores PVs starting with some characters Mooney, Tim M.
Re: Autosave ignores PVs starting with some characters Andrew Johnson
Re: Autosave ignores PVs starting with some characters J. Lewis Muir
Re: Autosave ignores PVs starting with some characters Konrad, Martin

Navigate by Date:
Prev: Re: Autosave ignores PVs starting with some characters Andrew Johnson
Next: RE: Autosave ignores PVs starting with some characters Mooney, Tim M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Autosave ignores PVs starting with some characters Konrad, Martin
Next: RE: Autosave ignores PVs starting with some characters Mooney, Tim M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 08 Sep 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·