Subject: |
Re: R3.12 Environment Parameter system |
From: |
Andrew Johnson <[email protected]> |
Date: |
Tue, 14 Mar 1995 23:23:30 GMT |
Encouraged by Steve Lewis' agreement that "things could be neater", and as I now
have the Beta9 release, I have implemented an improved system for Environment
parameter defaults. It works like this:
A new configuration file, config/CONFIG_ENV contains *all* the default (site-
specific) values. A new script bldEnvData scans the base/include/envDefs.h file
for all of the ENV_PARAM declarations, and combines these with the defaults to
create a header file envData.h in the libCom target directories. envData.h is
#included by the envDefs.h file when ENV_PRIVATE_DATA is defined, and contains
all of the ENV_PARAM *definitions* with their defaults. The whole process is
automated through the libCom Makefile.* so that changes to envDefs.h or
CONFIG_ENV will result in a rebuild of the envData.h file.
As a result, I have deleted base/src/libCom/epicsEnvParams.h and removed the
routine epicsSetEnvParams from libCom/envSubr.c and db/iocInit.c where it is
called. This leaves a question - we don't really need INITHOOKafterSetParams
any more. Should it be removed, or left in?
Disadvantages: the vxWorks routine envShow now only displays those parameters
you set within the resource.def file or have changed by hand; before it also
gave the settings from epicsSetEnvParams(). However, epicsPrtEnvParams still
works as before.
CONFIG_ENV is interpreted using the Borne Shell /bin/sh so the settings are not
quite as free-format as they are with Makefile variables; you can't use spaces
inside the EPICS_ENV_PARAMETER=VALUE pair.
Advantages: Provided they were compiled with the same settings, the host tools
and IOC will always have the same defaults. To change a site-wide default, you
only need to edit config/CONFIG_ENV and rebuild.
It would be trivial to create epicsPrtEnvParams at the same time as envData.h to
guarantee it would know about all the declared variables, but I haven't done
that yet.
Any comments? Have I been wasting my time?
- Andrew
,_}\_. Andrew Johnson, Technology Division
/ \ Royal Greenwich Observatory
~~~~~~~| ,--/;. )~~~~ Madingley Road, Cambridge, UK
., |/ (/ U Phone: +44 (0)1223 374823
.`., /_\ . . Email: [email protected]
wwWWWww' WWW: http://www.ast.cam.ac.uk/~anj/
- Navigate by Date:
- Prev:
Work needing support Bob Dalesio
- Next:
beta release problems Marty Kraimer
- 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:
Re: R3.12 Environment Parameter system Steve Lewis
- Next:
CA for Windows NT Chris Timossi
- 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
|