EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: strange behaviour of dbLoadtemplate
From: Luedeke Andreas WSLA/209 <[email protected]>
To: [email protected]
Date: Fri, 19 Apr 2002 12:08:56 +0200
Hi,
the problem can be solved by replacing the single quotes in the substitution file with double
quotes.

Is there any "lex" expert listening who knows why?

Andreas

PS: is it a desired feature, that escaped characters are only handled in substitution files but not
in templates?

--
Dr. Andreas Luedeke, PSI/SLS, phone: +41-56-310-4002 fax: -4413
mailto:[email protected], http://people.web.psi.ch/luedeke

> dear EPICS gurus
>
> (if somebody prefers to make the experience rather than reading
> do first  dbLoadtemplate test1.subs
> second    dbLoadtemplate test2.subs
> the short files are at the end of this longer mail)
>
> recentely I found a very strange behaviour of dbLoadtemplate.
> For a special device the result of dbLoadtemplate had to look like:
>    record(mbbo,"test:CON-FUNC") {
>       field(ZSTR,""CURR:DC"")
>       .....
> It is important that there are 2 qoutation marks just one after
> the other at the beginning and at the end. I found no other solution
> than to have a template file with
>      field(ZRST,"$(qm)CURR:DC$(qm)")
>
> and in the substitution file I put
>    qm = '\"'
>
> This worked perfectely, the whole substituion file test1.subs is
> at the end of this mail:
>
> I got the request to add an other record, an easy job, I thought,
> but ....
> test2.subs is at the end of the mail, too
>
> and the result of dbLoadtemplate:
> in words: it did not substitute qm with " but with the
> rest of the file!
> (I put ">" to show that this is the output)
>  >.....
>  >
>  >
>         field(ZRST, ""'}
>  >
>  >{ NAME    = X09LA-KCUR2
>  >  GPNR    = 11
>  >  qm      = '"CURR:DC"'}>
>  >
>  >{ NAME    = X09LA-KCUR2
>  >  GPNR    = 11
>  >  qm      = '"")
>  >
>         field(ONVL, "1")
>  >....
> After playing around I found no other solution than to have
> 2 dbLoadtemplates, each one loding one record.
>
> Thanks for any hints
> Werner
>
> ************** files ************
> test1.subs
>  >file test.template {
>  >{ NAME    = X09LA-KCUR
>  >  ADDR    = L38940
>  >  GPNR    = 10
>  >  qm      = '\"'}
>  >}
>
> test2.subs
>  >file test.template {
>  >{ NAME    = X09LA-KCUR
>  >  GPNR    = 10
>  >  qm     = '\"'}
>  >
>  >{ NAME    = X09LA-KCUR2
>  >  GPNR    = 11
>  >  qm     = '\"'}
>  >}
>
> test.template
>  >record(mbbo,"$(NAME):CON-FUNC") {
>  >    field(ZRVL,"0")
>  >    field(ZRST,"$(qm)CURR:DC$(qm)")
>  >    field(ONVL,"1")
>  >    field(ONST,"$(qm)VOLT:DC$(qm)")
>  >}
>
>
> --
> Dr. Werner Portmann, SLS computing and controls
> Paul Scherrer Institut,    CH-5232 Villigen PSI
> tel + 41- 56 3104061 fax + 41 - 56 310 4413
> e-mail:
> [email protected]  http://people.web.psi.ch/portmann/
>
>


Replies:
Re: strange behaviour of dbLoadtemplate Marty Kraimer

Navigate by Date:
Prev: Re: drvAscii - termintor strategy Allan Honey
Next: RE: drvAscii - terminator strategy Porter, Rodney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: strange behaviour of dbLoadtemplate Werner Portmann
Next: Re: strange behaviour of dbLoadtemplate Marty Kraimer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·