Real-Time Workshop Embedded Coder    

Properties of Predefined Custom Storage Classes

The Real-Time Workshop Embedded Coder defines two classes of custom data objects:

Predefined Custom Storage Class Summaries

The following tables summarize the predefined custom storage classes. The entry for each class indicates

The first three classes, shown in Table 4-1, insert type qualifiers in the data declaration.

Table 4-1: Const, ConstVolatile, and Volatile Storage Classes  
Class
Name

Purpose
Parameters
Signals
Data
Types

Complex
Wide
Const
Use const
type qualifier
in declaration
Y
N
any
Y
Y
ConstVolatile
Use
const volatile
type qualifier
in declaration
Y
N
any
Y
Y
Volatile
Use volatile
type qualifier
in declaration
Y
Y
any
Y
Y

The second set of three classes, shown in Table 4-2, handles issues of data scope and file partitioning.

Table 4-2: ExportToFile, ImportFromFile, and Internal Storage Classes  
Class
Name

Purpose
Parameters
Signals
Data
Types

Complex
Wide
ExportToFile
Generate and include
files, with user-specified
name, containing global
variable declarations and
definitions
Y
Y
any
Y
Y
ImportFromFile
Include predefined
header files containing
global variable
declarations
Y
Y
any
Y
Y
Internal
Declare and define global
variables whose scope is
limited to the code
generated by the
Real-Time Workshop
Y
Y
any
Y
Y

The final three classes, shown in Table 4-3, specify the data structure or construct used to represent the data.

Table 4-3: BitField, Define, and Struct Storage Classes  
Class
Name

Purpose
Parameters
Signals
Data
types

Complex
Wide
BitField
Embed Boolean data
in a named bit field
Y
Y
Boolean
N
N
Define
Represent parameters
with a #define macro
Y
N
any
N
N
Struct
Embed data in a named
struct to encapsulate
sets of data
Y
Y
any
N
Y

Table 4-4: Data Access Storage Classes 
Class
Name

Purpose
Parameters
Signals
Data
types

Complex
Wide
GetSet
Read and write data using access functions. See GetSet Custom Storage Class for Data Store Memory
N
Y
any
N
Y


  Introduction to Custom Storage Classes Class-Specific Storage Class Attributes