ssSetNeedElapseTime
Register if a block requires elapsed time
Syntax
void ssSetNeedElapseeTime(SimStruct *S, Boolean n)
Arguments
SSimStruct that represents an S-Function block.
nBoolean flag indicating whether the block must use elapse time.
1registers that the block requires elapse time.
Description
Use in mdlInitializeSizes or
mdlInitializeSampleTimes to register whether the block
requires the elapsed time and allocate an elapsed time counter for the triggered
subsystem in which the s-function executes.
Languages
C, C++
Examples
static void mdlInitializeSampleTimes(SimStruct *S)
{
ssSetSampleTime(S, 0, INHERITED_SAMPLE_TIME);
ssSetOffsetTime(S, 0, 0.0);
ssSetNeedElapseTime(S, 1);
ssSetModelReferenceSampleTimeDefaultInheritance(S);
}See Also
Version History
Introduced before R2006a