Download presentation
Presentation is loading. Please wait.
Published bySheena Hancock Modified over 9 years ago
1
IOC SHELL ADDITIONS Eric Norum September 3, 2003
2
Command-line macro expansion $(var) or ${var} replaced with value of var environment variable No expansion inside single quotes or following a backslash (\) Environment variable values can be set with IOC shell epicsEnvSet command Application build creates envPaths with lines like: epicsEnvSet(IOC,"iocmyExample") epicsEnvSet(TOP,"/home/phoebus/NORUME/myExample") epicsEnvSet(EPICS_BASE,"/home/phoebus/NORUME/EPICS/base") epicsEnvSet(ASDSTD,"/home/phoebus/NORUME/EPICS/support/asdStd")
3
Fine Points Indirect definitions are possible –epicsEnvSet var1 ‘${var2}’ –epicsEnvSet var2 someName –epicsEnvSet someName someDir/Path –epicsEnvSet anotherName anotherDir/Path –cd ${var1} –epicsEnvSet var2 anotherName –cd ${var1}
4
Easier Access to ‘Debugging’ Variables In your device/record/sequencer code you have some variables you wish to set/view from the IOC shell: static double myDeviceParameter; static int myDeviceDebugFlag ;
5
Step 1 - Export variables Add #include to the list of headers included by your source Add an epicsExportAddress declaration for each variable: epicsExportAddress(int,myDeviceDebugFlag); epicsExportAddress(double,myDeviceParameter);
6
Step 2 - Add variables to database definition Add an variable declaration for each variable to some database description file included by the application: variable(myDeviceDebugFlag) variable(myDeviceParameter,double) A missing type specifier is taken to be int
7
Step 3 - Use the IOC shell var command to set/view var myDeviceDebugFlag 3 var myDeviceParameter 1.3 var myDebugFlag var
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.