メインコンテンツ

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

coder.descriptor.types.Enum クラス

名前空間: coder.descriptor.types
スーパークラス: coder.descriptor.types.Scalar

Return information about variable of enum type

R2024b 以降

Description

An object of the coder.descriptor.types.Enum class describes a variable in the generated code that is of an enumeration type.

プロパティ

すべて展開する

Name of the variable in the generated code for the corresponding modeling element, specified as a character vector.

データ型: char

Name of the data type that is represented in Simulink for the corresponding modeling element, specified as a character vector.

データ型: char

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 contains const.

  • 0 — The type qualifier does not contain const.

データ型: logical

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 contains volatile.

  • 0 — The type qualifier does not contain volatile.

データ型: logical

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.

データ型: logical

Data type used to store the integer values of the enumeration in the generated code, specified as a coder.descriptor.types.Type object.

データ型: coder.descriptor.types.Type

Identifiers representing enumeration variants in the generated code, specified as a cell array of character vectors.

データ型: cell

Integer values for enumeration variants in the generated code, specified as an integer vector.

データ型: int32

バージョン履歴

R2024b で導入