MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Manuel de service Page 111

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 282
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 110
1 2 ... 106 107 108 109 110 111 112 113 114 115 116 ... 281 282

Commentaires sur ces manuels

Pas de commentaire