Main Content
mdlSimStatusChange
Respond to a pause or resumption of the simulation of the model that contains this C MEX S-function
Required
No
Languages
C, C++
Syntax
#define MDL_SIM_STATUS_CHANGE
void mdlSimStatusChange(SimStruct *S,
ssSimStatusChangeType simStatus)
Arguments
S
SimStruct representing an S-Function block.
simStatus
Status of the simulation, either
SIM_PAUSE
orSIM_CONTINUE
.
Description
The Simulink® engine calls this routine when a simulation
of the model containing S
pauses or resumes. This
method is only valid for simulation. C MEX S-functions must enclose
the method in a #if defined(MATLAB_MEX_FILE)
statement.
Examples
#if defined(MATLAB_MEX_FILE) #define MDL_SIM_STATUS_CHANGE static void mdlSimStatusChange(SimStruct *S, ssSimStatusChangeType simStatus) { if (simStatus == SIM_PAUSE) { ssPrintf("Pause has been called! \n"); } else if (simStatus == SIM_CONTINUE) { ssPrintf("Continue has been called! \n"); } } #endif
See Also
Version History
Introduced before R2006a