Experimental Physics and
| |||||||||||||||||
|
Yes, but how depends what variables you're trying to set, and whether this is for a particular IOC or all IOCs using a particular version of EPICS Base. The ioc shell is not intended to be a programming language, and it doesn't (and never will) provide conditional commands, so you can't just put something in the startup script that will work for any environment variable. If you're trying to set site-specific defaults for some of the standard EPICS environment variables, the way to do that is to edit them into your <base>/configure/CONFIG_SITE_ENV file (or even the CONFIG_ENV file if these are Channel Access settings). Once you've changed those files you'll have to rebuild base and all the IOC applications that use it. If the variables you're trying to set are not EPICS variables at all, or you don't want to set them for all systems using that installation of EPICS base, you'll have to write your own iocsh command in C - either to do all the work you want with the variable name(s) and value(s) burned into the code, or just write a command that takes a variable name and default setting you want which will set it if there's no current value. There is another alternative to writing C code if the IOC is running on a workstation or PC - write a shell-script wrapper around your IOC executable which does the environment variable setting before executing the real IOC program. HTH, - Andrew -- Dear God, I didn't think orange went with purple until I saw the sunset you made last night. That was really cool. - Caro
| ||||||||||||||||
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |