ssSetInputPortDirectFeedThrough
指定模块端口的直接馈通状态
语法
void ssSetInputPortDirectFeedThrough(SimStruct *S, int_T port, int_T dirFeed)
参量
S
表示 S-Function 模块的 SimStruct。
port
正在设置直接馈通属性的输入端口的索引。
dirFeed
port
指定的模块的直接馈通状态。
描述
在 mdlInitializeSizes
或 mdlSetWorkWidths
(在 ssSetNumInputPorts
之后)中使用来指定每个输入端口索引的直接馈通(0 或 1)。如果未指定,则默认直接馈通为 0。将输入端口的直接馈通设置为 0 相当于表示相应的输入端口信号未在 mdlOutputs
或 mdlGetTimeOfNextVarHit
中使用。如果使用它,您可能会或可能不会看到输入信号中一个仿真步骤的延迟。这可能会导致仿真求解器因仿真不一致而发出错误。
注意
当您在调试模式 (mex -g
) 下编译 S-Function 时,ssSetInputPortDirectFeedThrough
宏将成为函数。
语言
C、C++
示例
请参阅 sfcndemo_dtype_io
中使用的 S-Function sfun_dtype_io.c
和 sfcndemo_sdotproduct
中使用的 S-Function sdotproduct.c
。
版本历史记录
在 R2006a 之前推出