Download Real-Time Workshop

Transcript
Storage Classes for Data Store Memory Blocks
The following table shows code generated for the Data Store Memory block in
this model, depending on the setting of RTW storage class. The table gives
the variable declarations and MdlOutputs code generated for the myData block.
Storage Class
Declaration
Auto
In model.h
Code
model_DWork.myData =
typedef struct
rtb_SineWave;
D_Work_tag
{
real_T myData;
}
D_Work;
In model.c or model.cpp
/* Block states (auto storage) */
D_Work model_DWork;
5-63