Experimental Physics and
| |||||||||||||||||
|
On Monday, August 19, 2002, at 08:52 AM, S. Joshua Stein wrote: I would like to set a (global) debugging variable which is part of my device Non-vxWorks IOCs don't have access to the executable symbol table (at the moment) so this trick of assigning to variables doesn't work. About the only thing I can suggest for now is to register a command to set the variable: /* setDebug */ static const iocshArg setDebugArg0 = { "level",iocshArgInt}; static const iocshArg * const setDebugArgs[1] = {&setDebugArg0}; static const iocshFuncDef setDebugFuncDef = {"setDebug",1,setDebugArgs}; static void setDebugCallFunc(const iocshArgBuf *args) { deviceDebugVar( args[0].ival); }
Or, you can use a C++ static constructor to register the command for you when the application starts. For example, class SetDebugRegister { public: SetDebugRegister() { iocshRegister(&setDebugFuncDef,setDebugCallFunc); } }; static SetDebugRegister setDebugRegisterObj;
| ||||||||||||||||
ANJ, 10 Aug 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |