Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
<== Date ==> <== Thread ==>

Subject: question about dbLoadTemplate()
From: "Liyu, Andrei" <liyua@ornl.gov>
To: tech-talk@aps.anl.gov
Date: Fri, 30 Jun 2006 13:00:28 -0400
Hi,

Standard way to use dbLoadTemplate()is
1. ***st.cmd***
cd $TOP
dbLoadTemplate( "db/Test.substitutions")

2. Test.substitutions has links to templates files
...
file db/Test1.template ...
file db/Test2.template ...

So Test.substitutions and templates (Test1.template and Test2.template)
files should be in the same directory (in this example top/db/ )

How can it be used if the files are in the different directories?

I found a way in vxWorks.
For example, Test.substitutions is in
/ade/epics/iocCommon/"IOCName"/Data
and Test.template is in /ade/epics/iocTop/R3.14.7/SystemX/R2-0/db. Then

1. st.cmd has

SubstitutionPath=malloc( 100)
sprintf SubstitutionPath, "/ade/epics/iocCommon/%s/Data",iocName
nfsMount nfsServer,SubstitutionPath,"/SubPath"

TemplatePath=malloc( 100)
sprintf TemplatePath, "/ade/epics/iocTop/R3.14.7/SystemX/R2-0/db"
nfsMount nfsServer, TemplatePath,"/TemPath"

...
cd "/SubPath"
dbLoadTemplate("Test.substitutions")

2. Test.substitutions file has

file TemPath/Test1.template ...
(!!! "file top/db/Test1.template ..." doesn't work)

It works. But that is spaghetti's way and I suppose it will not work in
Windows and Linux.

So question:
Has anyone done something similar (to have template and substitutions
files in different directories)?

Thanks, Andrei.


References:
Re: Presentations from the last collaboration meeting. Andrew Johnson

Navigate by Date:
Prev: Lesson learned: LINR, LINEAR, SLOPE, R3.13, R3.14, breakpoint tables Kay-Uwe Kasemir
Next: RE: question about dbLoadTemplate() Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
Navigate by Thread:
Prev: Re: Presentations from the last collaboration meeting. Andrew Johnson
Next: RE: Driver for SBS IP-OPTOIO-8 Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·