Set source of time for asynchronous task
void ssSetTimeSource(SimStruct *S, slTimeSource timeSource)
S
SimStruct representing an S-Function block.
timeSource
Source of time used by the asynchronous task created by the block.
Use this function in mdlInitializeSizes
to specify the source
of the time used by an asynchronous task created by S
. The
allowed values for timeSource
are:
SS_TIMESOURCE_BASERATE
— block reads the absolute
time from the base rate
SS_TIMESOURCE_SELF
—block sets its own time
SS_TIMESOURCE_CALLER
—block uses time from an
upstream block that triggers the asynchronous task
SS_TIMESOURCE_SELF_INTERNAL
—if the asynchronous
task also executes periodically, block maintains an internal timer by
incrementing at each execution.
C, C++
static void mdlInitializeSizes(SimStruct *S) { ssSetTimeSource(S, SS_TIMESOURCE_SELF); }