Table A-22: Model.rtw Model Hierarchy (Blocks, Signals, and Subsystems)
Variable/Record Name
|
Description
|
SignalDefaults {
|
Default fields for Signal
|
SigLabel
|
"" : Signal label
|
OutputPort
|
[0,1]: [outputPortIndex , outputPortWidth ].
|
SignalOffset
|
[0]: Vector whose length is the width of the output port. Needs to be used with the corresponding element in SignalSrc to identify the correct signal location within the record identified by SignalSrc .
|
}
|
|
RootSignals {
|
Signal and block information in the root window.
|
|
The contents of this record is identical to Subsystem record, except the SysId , Name , SLName , and Virtual fields are not present.
|
}
|
|
NumSubsystems
|
Total number of (non-empty) subsystems in the model. To obtain the number of virtual subsystems, use
CompiledModel.NumSubsystems - CompiledModel.NumSystems - 1.
|
Subsystem {
|
One record for each subsystem.
|
SysId
|
System identifier. Each subsystem in the model is given a unique identifier of the form S# (e.g., S3 ).
|
Name
|
Block name preceded with a <root> or <S#> token. The ID/Name values define an associative pair giving a complete mapping to the blocks full path name (e.g., <s2/gain1> ).
|
SLName
|
Unmodified Simulink name. This is only written if it is not equal to Name . This will occur when generating code using the rtwgen StringMapings argument. For the Real-Time Workshop C targets, any block name that contains a new-line, '/*' , or '*/' will have these characters remapped. For example, suppose the Simulink block name is
|
Virtual
|
yes/no : Whether or not the subsystem is virtual.
|
ChildSubsystemIndices
|
Vector of integers specifying the subsystems that are directly contained within this subsystem. The indices index into the CompiledModel.Subsystem record list.
|
NumSignals
|
Number of block output signals (including virtual) blocks.
|
Signal {
|
One record for each block output signal (i.e., length of this list is NumSignals ).
|
Block
|
[ systemIdx, callsiteIdx, blockIdx ] or block name string if a virtual block.
|
OutportName
|
This field is written only if the signal is emanating from a subsystem. It is the Outport block name corresponding to the output signal of a subsystem block.
|
SigLabel
|
Signal label if present.
|
OutputPort
|
[outputPortIndex, outputPortWidth] of the block producing this signal.
|
Dimensions
|
Vector of the form [ nRows , nCols ] for the signal. Only written if number of dimensions is greater than 1.
|
DataTypeIdx
|
Index into the CompiledModel.DataTypes.DataType record list. Only written for nonvirtual blocks and if data type index is not 0 (i.e., real_T ).
|
ComplexSignal
|
yes : Only written for nonvirtual blocks and if signal is complex.
|
SignalSrc
|
Vector of length outputPortWith giving the location of the signal source. Used with SignalOffset , this will give an index into the block I/O vector (B), or state vector (X), or external input vector (U) or unconnected ground (G) or F indicating the source is a function call.
|
SignalOffset
|
Vector of length same as SignalSrc . Used with corresponding element in the SignalSrc field to identify the correct data offset in the record identified by SignalSrc .
|
}
|
|
NumBlocks
|
Number of nonvirtual blocks in the subsystem.
|
BlockSysIdx
|
System index for blocks in this subsystem.
|
BlockMap
|
Vector of length NumBlocks giving the blockIdx for each nonvirtual block in the subsystem.
|
}
|
|