| // Enum for {{label}} |
| enum class {{asType label}} : {{asUnderlyingZclType name}} { |
| {{#zcl_enum_items}} |
| k{{asUpperCamelCase label}} = {{asHex value 2}}, |
| {{/zcl_enum_items}} |
| {{#unless (isInConfigList (concat ns "::" label) "EnumsNotUsedAsTypeInXML")}} |
| // All received enum values that are not listed above will be mapped |
| // to kUnknownEnumValue. This is a helper enum value that should only |
| // be used by code to process how it handles receiving and unknown |
| // enum value. This specific should never be transmitted. |
| kUnknownEnumValue = {{first_unused_enum_value mode="first_unused"}}, |
| {{else}} |
| // kUnknownEnumValue intentionally not defined. This enum never goes |
| // through DataModel::Decode, likely because it is a part of a derived |
| // cluster. As a result having kUnknownEnumValue in this enum is error |
| // prone, and was removed. See |
| // src/app/common/templates/config-data.yaml. |
| {{/unless}} |
| }; |