initHooks.h
Typedefs
-
typedef void (*initHookFunction)(initHookState state)
Type for application callback functions.
Application callback functions must match this typdef.
- Param state:
initHook enumeration value
Enums
-
enum initHookState
Initialization stages.
The enum states must agree with the names in the initHookName() function. New states may be added in the future if extra facilities get incorporated into the IOC. The numerical value of any state enum may change between EPICS releases; states are not guaranteed to appear in numerical order.
Some states were deprecated when iocPause() and iocRun() were added, but are still provided for backwards compatibility. These deprecated states are announced at the same point they were before, but will not be repeated if the IOC is later paused and restarted.
Values:
-
enumerator initHookAtIocBuild
Start of iocBuild() / iocInit()
-
enumerator initHookAtBeginning
Database sanity checks passed
-
enumerator initHookAfterCallbackInit
Callbacks, generalTime & taskwd init
-
enumerator initHookAfterCaLinkInit
CA links init
-
enumerator initHookAfterInitDrvSup
Driver support init
-
enumerator initHookAfterInitRecSup
Record support init
-
enumerator initHookAfterInitDevSup
Device support init pass 0 (also autosave pass 0)
-
enumerator initHookAfterInitDatabase
Records and locksets init (also autosave pass 1)
-
enumerator initHookAfterFinishDevSup
Device support init pass 1
-
enumerator initHookAfterScanInit
Scan, AS, ProcessNotify init
-
enumerator initHookAfterInitialProcess
Records with PINI = YES processsed
-
enumerator initHookAfterCaServerInit
RSRV init
-
enumerator initHookAfterIocBuilt
End of iocBuild()
-
enumerator initHookAtIocRun
Start of iocRun()
-
enumerator initHookAfterDatabaseRunning
Scan tasks and CA links running
-
enumerator initHookAfterCaServerRunning
RSRV running
-
enumerator initHookAfterIocRunning
End of iocRun() / iocInit()
-
enumerator initHookAtIocPause
Start of iocPause()
-
enumerator initHookAfterCaServerPaused
RSRV paused
-
enumerator initHookAfterDatabasePaused
CA links and scan tasks paused
-
enumerator initHookAfterIocPaused
End of iocPause()
-
enumerator initHookAtShutdown
Start of iocShutdown() (unit tests only)
- Since
7.0.3.1 Added
-
enumerator initHookAfterCloseLinks
Links disabled/deleted.
- Since
7.0.3.1 Added
-
enumerator initHookAfterStopScan
Scan tasks stopped.
- Since
7.0.8 Triggered during normal IOC shutdown
- Since
7.0.3.1 Added, triggered only by unittest code.
-
enumerator initHookAfterStopCallback
Callback tasks stopped.
- Since
7.0.3.1 Added
-
enumerator initHookAfterStopLinks
CA links stopped.
- Since
7.0.8 Triggered during normal IOC shutdown
- Since
7.0.3.1 Added, triggered only by unittest code.
-
enumerator initHookBeforeFree
Resource cleanup about to happen.
- Since
7.0.3.1 Added
-
enumerator initHookAfterShutdown
End of iocShutdown()
- Since
7.0.3.1 Added
-
enumerator initHookAfterPrepareDatabase
Called during testdbPrepare() Use this hook to repeat actions each time an empty test database is initialized.
- Since
7.0.8 Added, triggered only by unittest code.
-
enumerator initHookBeforeCleanupDatabase
Called during testdbCleanup() Use this hook to perform cleanup each time before a test database is free()’d.
- Since
7.0.8 Added, triggered only by unittest code.
-
enumerator initHookAfterInterruptAccept
Only announced once. Deprecated in favor of initHookAfterDatabaseRunning
-
enumerator initHookAtEnd
Only announced once. Deprecated in favor of initHookAfterIocRunning
-
enumerator initHookAtIocBuild
Functions
-
int initHookRegister(initHookFunction func)
Register a function for initHook notifications.
Registers
func
for initHook notifications- Parameters:
func – Pointer to application’s notification function.
- Returns:
0 if Ok, -1 on error (memory allocation failure).
-
void initHookAnnounce(initHookState state)
Routine called by iocInit() to trigger notifications.
Calls registered callbacks announcing
state
- Parameters:
state – initHook enumeration value
-
const char *initHookName(int state)
Returns printable representation of
state
.Static string representation of
state
for printing- Parameters:
state – enum value of an initHook
- Returns:
Pointer to name string
-
void initHookFree(void)
Forget all registered application functions.
This cleanup routine is called by unit test programs between IOC runs.