Model Configuration Parameters: Code Generation Data Type Replacement
The Code Generation > Data Type Replacement category includes parameters for replacing built-in data type names with user-defined names in the generated code. On the Configuration Parameters dialog box, the following configuration parameters are on the Code Generation > Data Type Replacement pane.
Parameter | Description |
---|---|
Method for replacing Simulink® data types in generated code. | |
Option to replace data type names determined by code generation settings with user-defined data type names in generated code. | |
Replacement name for | |
Replacement name for | |
Replacement name for | |
Replacement name for | |
Replacement name for | |
Replacement name for | |
Replacement name for | |
Replacement name for | |
Replacement name for | |
Replacement name for | |
Replacement name for | |
Replacement name for | |
Replacement name for | |
Replacement name for |
These parameters belong to the Advanced parameters category.
Parameter | Description |
---|---|
Boolean false identifier | Identifier for Boolean false value |
Boolean true identifier | Identifier for Boolean true value |
64-bit integer maximum identifier | Identifier for 64-bit integer data limit maximum |
16-bit integer maximum identifier | Identifier for 16-bit integer data limit maximum |
32-bit integer maximum identifier | Identifier for 32-bit integer data limit maximum |
8-bit integer maximum identifier | Identifier for 8-bit integer data limit maximum |
64-bit unsigned integer maximum identifier | Identifier for 64-bit unsigned integer data limit maximum |
16-bit unsigned integer maximum identifier | Identifier for 16-bit unsigned integer data limit maximum |
32-bit unsigned integer maximum identifier | Identifier for 32-bit unsigned integer data limit maximum |
8-bit unsigned integer maximum identifier | Identifier for 8-bit unsigned integer data limit maximum |
64-bit integer minimum identifier | Identifier for 64-bit integer data limit minimum |
16-bit integer minimum identifier | Identifier for 16-bit integer data limit minimum |
32-bit integer minimum identifier | Identifier for 32-bit integer data limit minimum |
8-bit integer minimum identifier | Identifier for 8-bit integer data limit minimum |
Type limit identifier replacement header file | Header file that defines Boolean and data type limit identifiers |
Option to represent images as OpenCV class
| |
Option to force generation of
|
Configure Simulink Coder Data Type Replacements Programmatically
To programmatically replace the Simulink
Coder™ data type names for your model, adjust the
ReplacementTypes
model parameter, which is a structure. This
example code shows how to modify the ReplacementTypes
parameter
to replace the built-in data type names int8
,
uint8
, and boolean
with the custom data
type names my_T_S8
, my_T_U8
, and
my_T_BOOL
.
model = bdroot; cs = getActiveConfigSet(model); set_param(cs,'EnableUserReplacementTypes','on'); struc = get_param(cs,'ReplacementTypes'); struc.int8 = 'my_T_S8'; struc.uint8 = 'my_T_U8'; struc.boolean = 'my_T_BOOL'; set_param(cs,'ReplacementTypes',struc);