Real-Time Workshop User's Guide    

Object Property Information in the model.rtw File

During code generation, the Real-Time Workshop writes property information about signal and parameter objects to the model.rtw file. An ObjectProperties record is written for each parameter or signal that meets certain conditions. These conditions are described in ObjectProperties Records For Parameters and ObjectProperties Records For Signals.

The ObjectProperties records contain all of the property information from the associated object. To access ObjectProperties records, you must write Target Language Compiler code (see Accessing Object Property Information via TLC).

ObjectProperties Records For Parameters

An ObjectProperties record is included in the in the ModelParameters section of model.rtw file for each parameter, under the following conditions:

  1. Inline parameters is on.
  2. The parameter resolves to a Simulink.Parameter object (or to a parameter object that comes from a class derived from the Simulink.Parameter class).
  3. The parameter's RTWInfo.StorageClass is set to anything but 'Auto'.

The following is an example of an ObjectProperties record for a parameter.

ObjectProperties Records For Signals

An ObjectProperties record is included in the BlockOutputs section of the model.rtw file for each signal which meets the following conditions:

  1. The signal resolves to a Simulink.Signal object (or to an object that comes from a class derived from the Simulink.Signal class).
  2. The signal's symbol is preserved in the generated code. The symbol is preserved if:

The following is an example of an ObjectProperties record for a signal.

Accessing Object Property Information via TLC

This section provides sample code to illustrate how to access object property information from the model.rtw file using TLC code. For more information on TLC and the model.rtw file, see the Target Language Compiler Reference Guide.

Accessing Parameter Object Property Records.   The following code fragment iterates over the ModelParameters section of the model.rtw file and extracts information from any parameter ObjectProperties records encountered.

Accessing Signal Object Property Records.   The following code fragment iterates over the BlockOutputs section of the model.rtw file and extracts information from any signal ObjectProperties records encountered.

Using Object Properties to Export ASAP2 Files

The ASAM-ASAP2 Data Definition Target provides special signal and parameter subclasses that support exporting of signal and parameter object property information to ASAP2 data files. For information about the ASAP2 target and its associated classes and TLC files, see Generating ASAP2 Files in the Real-Time Workshop online documentation.


 Signal Objects Configuring the Generated Code via TLC