MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Manuale di Servizio Pagina 111

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 282
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 110
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
Vedere la pagina 110
1 2 ... 106 107 108 109 110 111 112 113 114 115 116 ... 281 282

Commenti su questo manuale

Nessun commento