MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Instrukcja Obsługi Strona 111

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 282
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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
Przeglądanie stron 110
1 2 ... 106 107 108 109 110 111 112 113 114 115 116 ... 281 282

Komentarze do niniejszej Instrukcji

Brak uwag