Target Language Compiler    

Code Data Structure Concepts

In general, a block diagram is encoded using one or more of the following model data structures:

Table A-1: Model Data Structures
Data Structure
Contents
rtB
Block I/O. This is represented in the model.rtw file via the CompiledModel.BlockOutputs record.
rtP
Parameters structure (inline on and off). This is captured in the model.rtw file via the CompileModel.ModelParameters record.
rtX
Continuous states
rtXdot
Derivatives
rtXdis
Continuous state disabled setting
rtZC
Nonsampled zero crossings. Not related to rtPZCE.
rtZCdir
Nonsampled zero crossings direction. One-to-one mapping with rtZC. Note related to rtPZCE.
rtPZCE
Previous zero crossing event state. Used to detect edges in signals.

The model data structures are layered out according to the model hierarchy and the length is limited to at most 7 characters to allow us to stay within the 31 identifier character limit.

The layout includes function-call systems that reside in a parent system of their caller. For example, in the following model, subsystems T1 and T2 are structurally the same:

For this model, we have:

This nesting of the block I/O data structure concept is applied to the other model structures (e.g., DWork). For the case of inline parameters off, the generated code will look roughly like:


  General model.rtw Concepts Inline Parameters On Code Structure