Set the period of a sample time
time_T ssSetSampleTime(SimStruct *S, int_T st_index, time_T period)
S
SimStruct representing an S-Function block.
st_index
Index of the sample time whose period is to be set.
period
Period of the sample time specified by
st_index
.
The time_T
sample time value specified by
period
.
Use this macro in mdlInitializeSizes
or
mdlInitializeSampleTimes
after calling ssSetNumSampleTimes
to specify
the period of the sample time where st_index
starts at 0.
See Setting Sample Times and Offsets for more
information. Use ssSetOffsetTime
if the sample
time has an associated offset.
C, C++
See the following S-functions for examples that use this function:
mixedmex.c
used in sfcndemo_mixedmex
sfun_dtype_io.c
used in sfcndemo_dtype_io
stvdtf.c
used in sfcndemo_stvdtf