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

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 282
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 108
Inlining an S-Function
3-35
void
MdlDerivatives()
{
/* S-Function block: foo */
{
Simstruct *s = ssGetSFunction(S, 0);
real_T *sfcnU = ssGetU(s);
real_T *sfcnX = ssGetX(s);
real_T *sfcndX = ssGetdX(s);
sfcnDerivatives(sfcndX, sfcnX,
sfcnU, s, tid);
}
}
void
MdlTerminate()
{
/* S-Function block: foo */
{
Simstruct *s = ssGetSFunction(S, 0);
sfcnTerminate(s);
}
}
/* function to register model in
SimStruct */
Simstruct *
foogain()
{
:
:/* Normal model initialization code independent of
S-functions */
:
/* S-function initialization code required for all S-functions
without corresponding TLC files */
/* set number of children S-Functions */
ssSetNumSFunctions(S, 1);
Unnecessary call to
empty function
mdlDerivatives in
foogain.c.
Unnecessary call to
empty function
mdlTerminate in
foogain.c.
Vedere la pagina 108
1 2 ... 104 105 106 107 108 109 110 111 112 113 114 ... 281 282

Commenti su questo manuale

Nessun commento