Simulink.defineIntEnumType
Define enumerated data type
Syntax
Description
Simulink.defineIntEnumType(
defines an enumeration named ClassName
, CellOfEnums
,IntValues
)ClassName
with enumeration values specified
with CellOfEnums
and underlying numeric values specified by
IntValues
.
Simulink.defineIntEnumType(___,'Description',
defines the enumeration with a description.ClassDesc
)
Simulink.defineIntEnumType(___,'DefaultValue',
defines a default value for the enumeration, which is one of the character vectors you
specify for DefValue
)CellOfEnums
.
Simulink.defineIntEnumType(___,'DataScope',
specifies whether the data type definition should be imported from, or exported to, a header
file during code generation.ScopeSelection
)
Simulink.defineIntEnumType(___,'HeaderFile',
specifies the name of a header file containing the enumeration class definition for use in
code generated from a model.FileName
)
Simulink.defineIntEnumType(___,'AddClassNameToEnumNames',
specifies whether the code generator applies the class name as a prefix to the enumeration
values that you specify for Flag
)CellOfEnums
. For Flag
,
specify true
or false
. For example, if you specify
true
, the code generator would use BasicColors_Red
instead of Red
to represent an enumerated value.
Simulink.defineIntEnumType(___,'StorageType',
specifies the data type used to store the enumerations’ underlying integer values in code
generated from a model.DataType
)
Examples
Input Arguments
Version History
Introduced in R2010b