MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Guide de l'utilisateur Page 182

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 386
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 181
6 Program Architecture
6-20
The general content of the rapid prototyping style of code for C is shown in the
following figure.
Figure 6-3: Content of Model.c for the Rapid Prototyping Code Style
/*
* Version, Model options, TLC options,
* and code generation information are placed here.
*/
<includes>
void MdlStart(void)
{
/*
* State initialization code.
* Model start-up code - one time initialization code.
* Execute any block enable methods.
* Initialize output of any blocks with constant sample times.
*/
}
void MdlOutputs(int_T tid)
{
/* Compute: y = f0(t,xc,xd,u) for each block as needed. */
}
void MdlUpdate(int_T tid)
{
/* Compute: xd+1 = fu(t,xd,u) for each block as needed. */
}
void MdlDerivatives(void)
{
/* Compute: dxc = fd(t,xc,u) for each block as needed. */
}
void MdlTerminate(void)
{
/* Perform shutdown code for any blocks that
have a termination action */
}
/* Model registration */
#include "model.reg"
Vue de la page 181
1 2 ... 177 178 179 180 181 182 183 184 185 186 187 ... 385 386

Commentaires sur ces manuels

Pas de commentaire