Publication 1756-RM004B-EN-P - October 2000
4-24 CIP Messaging API
resetrequest_proc
Syntax:
MVICALLBACK resetrequest_proc( );
Parameters:
None
Description:
resetrequest_proc
is an optional callback function which may be passed
to the CIP API in the MVIcip_RegisterResetReqRtn call. If the
resetrequest_proc
callback has been registered, it will be called if the
backplane device driver receives a module reset request (Identity
Object reset service). This allows the application an opportunity to take
appropriate actions to prepare for the reset, or to refuse the reset.
Return Value:
MVI_SUCCESS the module will reset upon return from the
callback
MVI_ERR_INVALID the module will not be reset and will continue
normal
operation
Example:
MVIHANDLE Handle;
MVICALLBACK resetrequest_proc( void )
{
// Take whatever action is appropriate for the application:
// - Set local IO to safe state
// - Perform orderly shutdown
// - Reset special hardware
// - Refuse the reset
return(MVI_SUCCESS); // allow the reset
}