ssSetOffsetTime
设置模块的偏移时间
语法
time_T ssSetOffsetTime(SimStruct *S, int_T st_index, time_T offset)
参量
S表示 S-Function 模块的 SimStruct。
st_index要设置其偏移的采样时间的索引。
offset由
st_index指定的采样时间的偏移。
返回
由 offset 指定的 time_T 偏移值。
描述
在 mdlInitializeSizes 或 mdlInitializeSampleTimes 中使用此宏以指定采样时间的偏移,其中 st_index 从 0 开始。您必须首先调用宏 ssSetNumSampleTimes 和 ssSetSampleTime 来设置采样时间,然后分配偏移量。否则,将假定为连续采样时间并忽略偏移量。
语言
C、C++
示例
请参阅 sfcndemo_mixedmex 中使用的 S-Function mixedmex.c。
版本历史记录
在 R2006a 之前推出