ssIsSpecialSampleHit
确定是否命中了采样时间
语法
(SimStruct *S, int_T sti1, int_T sti2, int_T tid)
参数
-
年代
-
SimStruct表示S-Function块。
-
sti1
-
样本时间的索引。
-
sti2
-
样本时间的索引。
-
tid
-
任务ID。
返回
布尔值真正的
如果样本命中发生在sti1
还有一个样本也出现在sti2
同样的时间步长。否则,返回假
.
描述
使用此宏mdlUpdate
而且mdlOutputs
确保不同速率运行的多个任务共享数据的有效性。有关更多信息,请参见同步多速率S-Function块.
当使用ssIsSpecialSampleHit
宏,较慢的采样时间必须是较快采样时间的整数倍。
语言
C, c++
例子
参见s函数mixedm.c
中使用的sfcndemo_mixedm
和s函数sfun_multirate.c
中使用的sfcndemo_sfun_multirate
.