EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20222023  2024  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  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Using one substitution file for multiple template files
From: "Wang, Andrew via Tech-talk" <tech-talk at aps.anl.gov>
To: Mark Rivers <rivers at cars.uchicago.edu>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Fri, 9 Dec 2022 02:04:33 +0000
Hi Mark, 

I'll take a look at the links and let you know if I have additional questions.

Thank you,
Andy

From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Monday, November 28, 2022 1:29 PM
To: Wang, Andrew <wang126 at llnl.gov>
Cc: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: RE: Using one substitution file for multiple template files
 

Hi Andrew,

 

I am not sure I understand what you are asking.  But the following are definitely possible:

 

-          Calling multiple different .template files from a single .substitutions file

-          If there are macro arguments that are common to more than one of the .template files you can omit them from the substitutions file and pass them in the dbLoadTemplate file.

 

Here is an example of a .substitutions file that loads 9 different .template files:

https://github.com/epics-modules/LabJack/blob/master/LabJackApp/Db/LabJack_T7.substitutions

 

That substitutions file gets loaded from this st.cmd, which passes 4 macro arguments in the dbLoadTemplate command.  These are used by many of the .template files, and are not contained in the .substitutions file.

https://github.com/epics-mdules/LabJack/blob/c32fae7e1c4b72a8ba7d317f54d45d1e6c1a507f/iocBoot/iocLabJack_T8/st.cmd#L26

 

Mark

 

 

 

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Wang, Andrew via Tech-talk
Sent: Monday, November 28, 2022 12:16 PM
To: EPICS tech-talk <tech-talk at aps.anl.gov>
Subject: Using one substitution file for multiple template files

 

Hi,

 

I was curious if there is an option to allow macros in multiple template files to be replaced using just one substitution file.

 

Like, suppose we have three template files named test1.template, test2.template, and test3.template. Is it possible for there to be just one substitution file so that the macros in those templates can be correctly substituted during the build process?

 

Thanks,

Andy


References:
Using one substitution file for multiple template files Wang, Andrew via Tech-talk
RE: Using one substitution file for multiple template files Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: A simple EPICS driver example for PCI devices using asynPortDriver on Linux Michael Davidsaver via Tech-talk
Next: Ways to know if instrument connected via TCP/IP through StreamDevice has lost connection Wang, Andrew via Tech-talk
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  <20222023  2024 
Navigate by Thread:
Prev: RE: Using one substitution file for multiple template files Mark Rivers via Tech-talk
Next: Job opportunities at TIFR Sandeep Kumar Malu via Tech-talk
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  <20222023  2024 
ANJ, 08 Dec 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·