When starting a soft IOC you can set the value of iocsh variables from shell environment variables using the epicsEnvSet iocsh command like this:
epicsEnvSet(KEITHLEY2400_ETHERNET, "$(KEITHLEY2400_ETHERNET=164.54.49.10:4001)")
So, if you start the IOC like this:
./st.cmd
the iocsh KEITHLEY2400_ETHERNET variable will be set to 164.54.49.10:4001
but if you start the IOC like this:
KEITHLEY2400_ETHERNET=192.168.1.2 ./st.cmd
the iocsh KEITHLEY2400_ETHERNET variable will be set to 192.168.1.2
The '=' part to supply a default value can be omitted if you like.
On Feb 26, 2012, at 2:20 AM, <[email protected]> wrote:
> Hi,
>
> The documentation seems to imply that you can set macro values from the command line. Can anyone tell me how to do it please?
>
> Thanks
>
> Xinyu WU
> ASKAP Computing
> Australia Telescope National Facility
> CSIRO Astronomy and Space Science
> phone: +61 2 9372 4727
> postal: PO Box 76 Epping, NSW. 1710
>
>
--
Eric Norum
[email protected]
- Replies:
- Re: Setting macro value from commandline Xinyu.Wu
- References:
- Setting macro value from commandline Xinyu.Wu
- Navigate by Date:
- Prev:
RE: Setting macro value from commandline Zelazny, Michael Stanley
- Next:
Re: Setting macro value from commandline Xinyu.Wu
- 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: Setting macro value from commandline Zelazny, Michael Stanley
- Next:
Re: Setting macro value from commandline Xinyu.Wu
- 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
|