Technical data
Inlining an S-Function
3-37
To avoid unnecessary calls to the S-function and to generate the minimum code
required for the S-function, the following TLC file is provided as an example.
%implements "foogain" "C"
%function BlockInstanceSetup(block, system) void
%<LibRenameParameter(block, P1, "Gain")>
%endfunction
%function Outputs(block, system) Output
%assign y = LibBlockOutputSignal(0, "", "", 0)
%assign u = LibBlockInputSignal(0, "", "", 0)
%assign p = LibBlockParameter(Gain, "", "", 0)
/* %<Type> block: %<Name> */
%<y> = %<u> * %<p>;
%endfunction
Note 1
foogain.tlc