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 |
---|---|
Specify whether to replace built-in data type names with user-defined data type names in generated code. | |
Specify a name for | |
Specify a name for | |
Specify a name for | |
Specify a name for | |
Specify a name for | |
Specify a name for | |
Specify a name for | |
Specify a name for | |
Specify a name for | |
Specify a name for | |
Specify a name for | |
Specify a name for | |
Specify a name for | |
Specify a name for |
To programmatically replace the built-in 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);