Real-Time Workshop User's Guide    

Overview

Within the class hierarchy of Simulink data objects, Simulink provides two classes that are designed as base classes for signal and parameter storage. These are:

The RTWInfo properties of parameter and signal objects are used by the Real-Time Workshop during code generation. These properties let you assign storage classes and storage type qualifiers to the objects, thereby controlling how the generated code stores and represents signals and parameters.

The Real-Time Workshop also writes information about the properties of parameter and signal objects to the model.rtw file. This information, formatted as ObjectProperties records, is accessible to Target Language Compiler programs. For general information on ObjectProperties records, see Object Property Information in the model.rtw File.

The general procedure for using Simulink data objects in code generation is as follows:

  1. Define a subclass of one of the built-in Simulink.Data classes.
  2. Instantiate parameter or signal objects from your subclass and set their properties appropriately, using the Simulink Explorer.
  3. Use the objects as parameters or signals within your model.
  4. Generate code and build your target executable.

The following sections describe the relationship between Simulink data objects and code generation in the Real-Time Workshop.


 Simulink Data Objects and Code Generation Parameter Objects