EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  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  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: dbLoadRecord or dbLoadTemplate
From: Andrew Johnson <[email protected]>
To: Mark Rivers <[email protected]>
Cc: EPICS Tech Talk <[email protected]>, Ralph Lange <[email protected]>
Date: Thu, 12 Jul 2007 10:20:26 -0500
Ralph Lange wrote:
Personally, I would even go as far as setting dbLoadTemplate on the
IOC to "deprecated" status. I don't see an advantage over host side
expansion.

To which Mark Rivers replied:
I strongly disagree with this.  Doing host-side expansion requires an
EPICS build system.

... which just goes to show how being flexible makes the EPICS community bigger and better. We're not going to deprecate dbLoadTemplate() since it is essential to a significant part of our user-base, but obviously not to all sites.


Emmanuel Mayssat asked:
I like the dbLoadTemplate
because of the clarity, but then for each device instantiation you
need to create a complete substitution file. Is there a way to do
something like this: dbLoadTemplate(file.sub,"deviceName=$(DEVN)") Where the db files is generated and then parsed once again with macro
provided in command line?

Not at the moment, although it should be possible to do something like that if there is sufficient demand or someone wants to just implement it, i.e. allow additional macros to be provided on the dbLoadTemplate command line that would be included in the list of macros expanded in the template. The relevant code is in base/src/dbtools/dbLoadTemplate.y


There is an additional trick both dbLoadRecords() and dbLoadTemplate() already do that may not be well documented, although I'm not sure that it will help you: File pathnames given in a .substitutions file or in include statements in a .db file will also have environment variable macros expanded. This only applies to the file path/name though, not to the contents of the files themselves, and the values are taken from the environment variables at the time the file is loaded.

- Andrew
--
The right to be heard does not automatically include
the right to be taken seriously. -- Hubert H. Humphrey

References:
dbLoadRecord of dbLoadTemplate Emmanuel Mayssat
Re: dbLoadRecord or dbLoadTemplate Ralph Lange
RE: dbLoadRecord or dbLoadTemplate Mark Rivers

Navigate by Date:
Prev: Scan question Heinrich du Toit
Next: Re: Scan question Emmanuel Mayssat
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: dbLoadRecord or dbLoadTemplate Mark Rivers
Next: Ethernet client library Emmanuel Mayssat
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·