Publication 1756-RM004B-EN-P - October 2000
CIP Messaging API 4-27
MVIcip_RegisterFlashUpdateRtn
Syntax:
int MVIcip_RegisterFlashUpdateRtn(MVIHANDLE apiHandle,
MVICALLBACK (*flashupdate_proc)( ) );
Parameters:
apiHandle handle returned by previous call to MVIcip_Open
flashupdate_proc pointer to flash update callback routine
Description:
This function is used by an application to register a flash update
callback routine. Once registered, the backplane device driver will call
flashupdate_proc
if a flash update command is received. (A flash
update command is used to update the module’s firmware. It is
generated by a firmware update utility such as Control Flash.)
apiHandle
must be a valid handle returned from MVIcip_Open.
flashupdate_proc
must be a pointer to a flash update callback function.
The application may register a flash update callback in order to perform
an orderly shutdown. Once a flash update command is received, the
backplane device driver will close all open connections, and will refuse
any new connections until the update has completed. After calling the
flash update callback (if registered), the backplane device driver will
restart the module in flash update mode (no application will be loaded).
Once the flash update has completed, the module will be restarted in
normal mode.
Return Value:
MVI_SUCCESS Routine was registered successfully
MVI_ERR_NOACCESS apiHandle does not have access
Example:
MVIHANDLE apiHandle;
// Register a flash update handler
MVIcip_RegisterFlashUpdateRtn(apiHandle, flashupdate_proc);
See Also:
flashupdate_proc