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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: dbLoadRecord or dbLoadTemplate |
From: | Ralph Lange <[email protected]> |
To: | Emmanuel Mayssat <[email protected]> |
Cc: | EPICS Tech Talk <[email protected]> |
Date: | Thu, 12 Jul 2007 11:59:15 +0200 |
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:
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? |