Experimental Physics and Industrial Control System
|
Hi Emmanuel,
Using dbLoadTemplate on the IOC to blow up template databases has two
noticeable disadvantages compared to blowing up the templates on the
host:
- You lose the ability to use macro substitution on the IOC. (Which
your mail is about.)
- The process can be slow, as the template database is re-read from
the file system for every instance. If the IOC uses remote shell or ftp
access, this adds up to half a second or so for every instance. If you
break things down to e.g. each single error bit being an instance of a
template database, this can easily add up to minutes. (That's where we
changed plans...)
We have changed all our IOC applications to blow up the templates on
the host side. When doing this, you may leave unresolved macros in the
database, which can be substituted at load time using the technique you
are describing.
I would strongly suggest blowing up templates on the host side, as it
gets you fast load times plus macro expansion on the IOC.
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. (That might rather be a core-talk issue, though.)
Hope this helps,
Ralph
ps. There is absolutely no need to push your substitutions into the
IOC's environment.
dbLoadRecord(file.db,"deviceName=toto")
does exactly the same job. (Embedded spaces can still be used: enclose
the substitution string with a pair of \"s.)
Emmanuel Mayssat wrote:
All,
Most of you must be familiar with dbLoadRecord and dbLoadTemplate.
I like the first one because you can pass parameters which are not
necessarily hard coded (i.e. you can use the same db file for different
instances).
epicsEnvSet(DEVN,"toto")
dbLoadRecord(file.db,"deviceName=$(DEVN)")
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?
|
- Replies:
- RE: dbLoadRecord or dbLoadTemplate Mark Rivers
- References:
- dbLoadRecord of dbLoadTemplate Emmanuel Mayssat
- Navigate by Date:
- Prev:
RE: Ethernet client library Mark Rivers
- Next:
RE: dbLoadRecord or dbLoadTemplate Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
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:
dbLoadRecord of dbLoadTemplate Emmanuel Mayssat
- Next:
RE: dbLoadRecord or dbLoadTemplate Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
<2007>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|
ANJ, 10 Nov 2011 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|