MPIControlFlashSaveProgressFn

Definition

typedef void (MPI_DECL2 *MPIControlFlashProgressFn)(void* userData, size_t percent);
typedef MPIControlFlashProgressFn MPIControlFlashSaveProgressFn;

 

Required Header: stdmpi.h
Change History: Added in 04.00.

Description

MPIControlFlashSaveProgressFn is a type definition for callback functions to be used by mpiControlFlashSaveAll to report progress. Any function that is passed to mpiControlFlashSaveAll must have the same function signature as MPIControlFlashLoadProgressFn.

userData The user data passed into the mpiControlFlashSaveAll function. This is useful when the callback function needs to be associated with a particular C structure or C++ class instance.
percent The current completion percentage of the flash save operation. The range of the function is from 0 to 100.

Sample Code

/* This is a callback function that matches the MPIControlFlashSaveProgressFn
 * prototype. It is used as an argument to mpiControlFlashSaveAll.
 */
void MPI_DECL2 mySaveAllProgressFn (void* userData, size_t percent)
{
  printf("Firmware save progress: %2d\r", percent);
  fflush(stdout);
}

See Also

mpiControlFlashSaveAll