coder.descriptor.types.Enum Class
Namespace: coder.descriptor.types
Superclasses: coder.descriptor.types.Scalar
Description
An object of the coder.descriptor.types.Enum
class describes a variable in
the generated code that is of an enumeration type.
Properties
Identifier
— Identifier used in generated code
character vector
Identifier of the data type used in generated code for the corresponding modeling element, specified as a character vector.
Data Types: char
Name
— Name of data type represented in Simulink®
character vector
Name of the data type that is represented in Simulink for the corresponding modeling element, specified as a character vector.
Data Types: char
ReadOnly
— Indication that type qualifier contains const
true
or 1
| false
or 0
Indication that the type qualifier contains const
, specified as
a numeric or logical 1
(true
) or
0
(false
). If you cannot change the value
of the variable during execution, the variable is preceded by the
const
keyword as the type qualifier in the generated code.
1
— The type qualifier containsconst
.0
— The type qualifier does not containconst
.
Data Types: logical
Volatile
— Indication that type qualifier contains volatile
true
or 1
| false
or 0
Indication that the type qualifier contains volatile
, specified
as a numeric or logical 1
(true
) or
0
(false
). If the compiler cannot apply
optimizations to the variable because its value can change due to external sources,
the variable is preceded by the volatile
keyword as the type
qualifier in the generated code.
1
— The type qualifier containsvolatile
.0
— The type qualifier does not containvolatile
.
Data Types: logical
IsCppScoped
— Indication that enumeration is scoped
false
or 0
(default) | true
or 1
Indication that the enumeration variable is a C++ scoped enumeration (enum class),
specified as a numeric or logical 1
(true
) or
0
(false
). The value of this property is
1
if the variable is a scoped enumeration, and 0
otherwise.
Data Types: logical
StorageType
— Data type of integer values
coder.descriptor.types.Type
object
Data type used to store the integer values of the enumeration in the generated code,
specified as a coder.descriptor.types.Type
object.
Data Types: coder.descriptor.types.Type
Strings
— Enumeration identifiers
cell array of character vectors
Identifiers representing enumeration variants in the generated code, specified as a cell array of character vectors.
Data Types: cell
Values
— Enumeration values
integer vector
Integer values for enumeration variants in the generated code, specified as an integer vector.
Data Types: int32
Version History
Introduced in R2024b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)