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

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

Kommentare zu diesen Handbüchern

Keine Kommentare