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 之前推出