ProSoft Technology MVI69-ADM User Manual

Page 291

Advertising
background image

MVI-ADM ♦ 'C' Programmable

CIP Messaging Library Functions

'C' Programmable Application Development Module

Developer's Guide

ProSoft Technology, Inc.

Page 291 of 342

February 20, 2013

MVIcip_RegisterFlashUpdateRtn

Syntax

int MVIcip_RegisterFlashUpdateRtn(MVIHANDLE handle, MVICALLBACK
(*flashupdate_proc)( ) );

Parameters

handle

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 updates the module's
firmware. It is generated by a firmware update utility such as Control Flash).

handle 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).

After the flash update has completed, the module will be restarted in normal
mode.

Return Value

MVI_SUCCESS

Routine was registered successfully

MVI_ERR_NOACCESS

handle does not have access

Example

MVIHANDLE handle;
// Register a flash update handler
MVIcip_RegisterFlashUpdateRtn(handle, flashupdate_proc);

See Also
flashupdate_proc (page 287)

Advertising