Presentation is loading. Please wait.

Presentation is loading. Please wait.

IOC SHELL ADDITIONS Eric Norum September 3, 2003.

Similar presentations


Presentation on theme: "IOC SHELL ADDITIONS Eric Norum September 3, 2003."— Presentation transcript:

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


Download ppt "IOC SHELL ADDITIONS Eric Norum September 3, 2003."

Similar presentations


Ads by Google