MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Wartungshandbuch Seite 111

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 282
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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
Seitenansicht 110
1 2 ... 106 107 108 109 110 111 112 113 114 115 116 ... 281 282

Kommentare zu diesen Handbüchern

Keine Kommentare