EPICS Base  7.0.8.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
IOC lifecycle callback hooks.

initHookRegister() allows external code to be called at certains points (initHookState) during IOC startup and shutdown.

The overall states (see getIocState() ) of an IOC are:

The following C++ example shows how to use this facility:

#include <initHooks.h>
#include <epicsExport.h>
static void myHookFunction(initHookState state)
{
if(state == initHookAfterDatabaseRunning) {
// a good point for driver worker threads to be started.
}
}
static void myRegistrar(void) {
initHookRegister(&myHookFunction);
}
extern "C" {
epicsExportRegistrar(myRegistrar);
}
// in some .dbd file add "registrar(myRegistrar)".