Experimental Physics and
| |||||||||||||||||
|
Hi, I can think of three ways. 1) Call your routine from the st.cmd file Assume you have a function int initMyHook(void) { return(initHookFunction(myHookFunction)); }
2) Use a C++ static object. class initMyHook { public: initMyHook() {initHookFunction(myHookFunction);} } static initMyHook initMyHookObj; The constructor initMyHook will get called for initMyHookObj at load time. 3) For 3.14.4 or later use the registrar facility In your xxxInclude.dbd file the following must appear registrar(myHook) Your source file contains static void myHook(void) { static int firstTime = 1; if(!firstTime) return; firstTime=0; initHookFunction(myHookFunction); } epicsExportRegistrar(myHook); For 3.14.4 and later method 3) is the recommended method. Can anybody write couple words about IOC deinitialization? Has Epics similar hook here? Sorry but iocCore is currently written to run forever. There is no deinitialization. Thanks, Andrei.
| ||||||||||||||||
ANJ, 10 Aug 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |