diff --git a/src/app/zap-templates/templates/app/cluster-objects.zapt b/src/app/zap-templates/templates/app/cluster-objects.zapt index cff202f6144324..247b4e6b49407a 100644 --- a/src/app/zap-templates/templates/app/cluster-objects.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects.zapt @@ -23,18 +23,22 @@ namespace Clusters { {{#zcl_clusters}} namespace {{asUpperCamelCase name}} { {{#zcl_enums}} +{{#if (isWeaklyTypedEnum label)}} // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM +{{/if}} // Enum for {{label}} enum class {{asType label}} : {{asUnderlyingZclType type}} { {{#zcl_enum_items}} k{{asUpperCamelCase label}} = {{asHex value 2}}, {{/zcl_enum_items}} }; +{{#if (isWeaklyTypedEnum label)}} #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM using {{asType label}} = EmberAf{{asType label}}; #endif +{{/if}} {{/zcl_enums}} {{#zcl_bitmaps}} diff --git a/src/app/zap-templates/templates/app/enums.zapt b/src/app/zap-templates/templates/app/enums.zapt index b301702dee68c1..9046d6c9f7c425 100644 --- a/src/app/zap-templates/templates/app/enums.zapt +++ b/src/app/zap-templates/templates/app/enums.zapt @@ -10,6 +10,7 @@ {{#zcl_enums}} {{#unless (isStrEqual label "Status")}} {{#unless (isStrEqual label "ReportingDirection")}} +{{#if (isWeaklyTypedEnum label)}} // Enum for {{label}} enum EmberAf{{asType label}} : {{asUnderlyingZclType type}} { @@ -17,6 +18,7 @@ enum EmberAf{{asType label}} : {{asUnderlyingZclType type}} { {{ident}}EMBER_ZCL_{{asDelimitedMacro parent.label}}_{{asDelimitedMacro label}} = {{value}}, {{/zcl_enum_items}} }; +{{/if}} {{/unless}} {{/unless}} {{/zcl_enums}} diff --git a/src/app/zap-templates/templates/app/helper.js b/src/app/zap-templates/templates/app/helper.js index 838481f9ce437f..795eb0dbd3ae74 100644 --- a/src/app/zap-templates/templates/app/helper.js +++ b/src/app/zap-templates/templates/app/helper.js @@ -511,6 +511,87 @@ async function getResponseCommandName(responseRef, options) return queryCommand.selectCommandById(db, responseRef, pkgId).then(response => asUpperCamelCase(response.name)); } +// Allow-list of enums that we generate as enums, not enum classes. The goal is +// to drive this down to 0. +function isWeaklyTypedEnum(label) +{ + return [ + "ApplicationBasicStatus", + "ApplicationLauncherStatus", + "AttributeWritePermission", + "AudioOutputType", + "BarrierControlBarrierPosition", + "BarrierControlMovingState", + "BootReasonType", + "ChangeReasonEnum", + "ColorControlOptions", + "ColorLoopAction", + "ColorLoopDirection", + "ColorMode", + "ContentLaunchStatus", + "ContentLaunchStreamingType", + "DoorLockEventSource", + "DoorLockEventType", + "DoorLockOperatingMode", + "DoorLockOperationEventCode", + "DoorLockProgrammingEventCode", + "DoorLockState", + "DoorLockUserStatus", + "DoorLockUserType", + "DoorState", + "EnhancedColorMode", + "HardwareFaultType", + "HueDirection", + "HueMoveMode", + "HueStepMode", + "IasEnrollResponseCode", + "IasZoneState", + "IasZoneType", + "IdentifyEffectIdentifier", + "IdentifyEffectVariant", + "IdentifyIdentifyType", + "InterfaceType", + "KeypadInputCecKeyCode", + "KeypadInputStatus", + "KeypadLockout", + "LevelControlOptions", + "MediaInputType", + "MediaPlaybackState", + "MediaPlaybackStatus", + "MoveMode", + "NetworkCommissioningError", + "NetworkFaultType", + "NodeOperationalCertStatus", + "OTAAnnouncementReason", + "OTAApplyUpdateAction", + "OTADownloadProtocol", + "OTAQueryStatus", + "OnOffDelayedAllOffEffectVariant", + "OnOffDyingLightEffectVariant", + "OnOffEffectIdentifier", + "PHYRateType", + "RadioFaultType", + "RoutingRole", + "RegulatoryLocationType", + "SaturationMoveMode", + "SaturationStepMode", + "SecurityType", + "SetpointAdjustMode", + "SimpleEnum", + "StartUpOnOffValue", + "StatusCode", + "StepMode", + "TemperatureDisplayMode", + "ThermostatControlSequence", + "ThermostatRunningMode", + "ThermostatSystemMode", + "UpdateStateEnum", + "WcEndProductType", + "WcType", + "WiFiVersionType", + ].includes(label); +} + // // Module exports // @@ -527,3 +608,4 @@ exports.zapTypeToEncodableClusterObjectType = zapTypeToEncodableClusterObjectTyp exports.zapTypeToDecodableClusterObjectType = zapTypeToDecodableClusterObjectType; exports.zapTypeToPythonClusterObjectType = zapTypeToPythonClusterObjectType; exports.getResponseCommandName = getResponseCommandName; +exports.isWeaklyTypedEnum = isWeaklyTypedEnum; diff --git a/src/controller/java/templates/CHIPReadCallbacks-src.zapt b/src/controller/java/templates/CHIPReadCallbacks-src.zapt index 0f6542458d3667..b09192eb9b47a6 100644 --- a/src/controller/java/templates/CHIPReadCallbacks-src.zapt +++ b/src/controller/java/templates/CHIPReadCallbacks-src.zapt @@ -181,7 +181,7 @@ void CHIP{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallb {{/if}} {{#if isOptional}} - {{chipType}} {{asLowerCamelCase name}}Value; + {{zapTypeToDecodableClusterObjectType type forceNotOptional=true forceNotNullable=true ns=parent.parent.name}} {{asLowerCamelCase name}}Value; {{#if isNullable}} {{asLowerCamelCase name}}HasValue = entry.{{asLowerCamelCase name}}.HasValue(); if ({{asLowerCamelCase name}}HasValue) { @@ -201,7 +201,7 @@ void CHIP{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallb {{#unless isOptional}} {{#unless isNullable}} - {{chipType}} {{asLowerCamelCase name}}Value = entry.{{asLowerCamelCase name}}; + {{zapTypeToDecodableClusterObjectType type ns=parent.parent.name}} {{asLowerCamelCase name}}Value = entry.{{asLowerCamelCase name}}; {{/unless}} {{/unless}} @@ -265,13 +265,13 @@ void CHIP{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallb bool entryNull = false; {{#unless isStruct}} {{#if isNullable}} - {{chipType}} entryValue; + {{zapTypeToDecodableClusterObjectType type ns=parent.name forceNotList=true}} entryValue; entryNull = entry.IsNull(); if (!entryNull) { entryValue = entry.Value(); } {{else}} - {{chipType}} entryValue = entry; + {{zapTypeToDecodableClusterObjectType type ns=parent.name forceNotList=true}} entryValue = entry; {{/if}} {{/unless}} diff --git a/src/controller/java/templates/partials/decode_value.zapt b/src/controller/java/templates/partials/decode_value.zapt index 2f54f13450b58f..dbb89f2b03ad23 100644 --- a/src/controller/java/templates/partials/decode_value.zapt +++ b/src/controller/java/templates/partials/decode_value.zapt @@ -22,7 +22,7 @@ if ({{source}}.Value().IsNull()) { {{else}} std::string {{target}}ClassName = "java/lang/{{asJavaBasicTypeForZclType type true}}"; std::string {{target}}CtorSignature = "({{asJniSignature type false}})V"; -chip::JniReferences::GetInstance().CreateBoxedObject<{{chipType}}>({{target}}ClassName.c_str(), {{target}}CtorSignature.c_str(), {{>item}}, {{target}}); +chip::JniReferences::GetInstance().CreateBoxedObject<{{zapTypeToDecodableClusterObjectType type ns=parent.parent.name forceNotNullable=true forceNotOptional=true}}>({{target}}ClassName.c_str(), {{target}}CtorSignature.c_str(), {{>item}}, {{target}}); {{/if}} {{#if isOptional}} chip::JniReferences::GetInstance().CreateOptional({{target}}, {{target}}); diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index dec9e05de1f730..9ddca31bdd1c13 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -145,8 +145,8 @@ void CHIPApplicationLauncherClusterLaunchAppResponseCallback::CallbackFn( std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), - dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject( + statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject data; data = chip::UtfString(env, dataResponse.data).jniValue(); @@ -214,9 +214,9 @@ void CHIPContentLauncherClusterLaunchContentResponseCallback::CallbackFn( std::string contentLaunchStatusClassName = "java/lang/Integer"; std::string contentLaunchStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(contentLaunchStatusClassName.c_str(), - contentLaunchStatusCtorSignature.c_str(), - dataResponse.contentLaunchStatus, contentLaunchStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + contentLaunchStatusClassName.c_str(), contentLaunchStatusCtorSignature.c_str(), dataResponse.contentLaunchStatus, + contentLaunchStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, data, contentLaunchStatus); } @@ -280,9 +280,9 @@ void CHIPContentLauncherClusterLaunchURLResponseCallback::CallbackFn( std::string contentLaunchStatusClassName = "java/lang/Integer"; std::string contentLaunchStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(contentLaunchStatusClassName.c_str(), - contentLaunchStatusCtorSignature.c_str(), - dataResponse.contentLaunchStatus, contentLaunchStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + contentLaunchStatusClassName.c_str(), contentLaunchStatusCtorSignature.c_str(), dataResponse.contentLaunchStatus, + contentLaunchStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, data, contentLaunchStatus); } @@ -343,8 +343,8 @@ void CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::CallbackFn( std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), - dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject( + statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject content; content = chip::ByteArray(env, dataResponse.content).jniValue(); @@ -1036,14 +1036,14 @@ void CHIPDoorLockClusterGetPinResponseCallback::CallbackFn( std::string userStatusClassName = "java/lang/Integer"; std::string userStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(userStatusClassName.c_str(), userStatusCtorSignature.c_str(), - dataResponse.userStatus, userStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + userStatusClassName.c_str(), userStatusCtorSignature.c_str(), dataResponse.userStatus, userStatus); jobject userType; std::string userTypeClassName = "java/lang/Integer"; std::string userTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(userTypeClassName.c_str(), userTypeCtorSignature.c_str(), - dataResponse.userType, userType); + chip::JniReferences::GetInstance().CreateBoxedObject( + userTypeClassName.c_str(), userTypeCtorSignature.c_str(), dataResponse.userType, userType); jobject pin; pin = chip::ByteArray(env, dataResponse.pin).jniValue(); @@ -1112,14 +1112,14 @@ void CHIPDoorLockClusterGetRfidResponseCallback::CallbackFn( std::string userStatusClassName = "java/lang/Integer"; std::string userStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(userStatusClassName.c_str(), userStatusCtorSignature.c_str(), - dataResponse.userStatus, userStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + userStatusClassName.c_str(), userStatusCtorSignature.c_str(), dataResponse.userStatus, userStatus); jobject userType; std::string userTypeClassName = "java/lang/Integer"; std::string userTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(userTypeClassName.c_str(), userTypeCtorSignature.c_str(), - dataResponse.userType, userType); + chip::JniReferences::GetInstance().CreateBoxedObject( + userTypeClassName.c_str(), userTypeCtorSignature.c_str(), dataResponse.userType, userType); jobject rfid; rfid = chip::ByteArray(env, dataResponse.rfid).jniValue(); @@ -1188,8 +1188,8 @@ void CHIPDoorLockClusterGetUserTypeResponseCallback::CallbackFn( std::string userTypeClassName = "java/lang/Integer"; std::string userTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(userTypeClassName.c_str(), userTypeCtorSignature.c_str(), - dataResponse.userType, userType); + chip::JniReferences::GetInstance().CreateBoxedObject( + userTypeClassName.c_str(), userTypeCtorSignature.c_str(), dataResponse.userType, userType); env->CallVoidMethod(javaCallbackRef, javaMethod, userId, userType); } @@ -1564,8 +1564,8 @@ void CHIPDoorLockClusterSetPinResponseCallback::CallbackFn( std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), - dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject( + statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); env->CallVoidMethod(javaCallbackRef, javaMethod, status); } @@ -1624,8 +1624,8 @@ void CHIPDoorLockClusterSetRfidResponseCallback::CallbackFn( std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), - dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject( + statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); env->CallVoidMethod(javaCallbackRef, javaMethod, status); } @@ -1990,8 +1990,8 @@ void CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::CallbackFn( std::string errorCodeClassName = "java/lang/Integer"; std::string errorCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), - dataResponse.errorCode, errorCode); + chip::JniReferences::GetInstance().CreateBoxedObject( + errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), dataResponse.errorCode, errorCode); jobject debugText; debugText = chip::UtfString(env, dataResponse.debugText).jniValue(); @@ -2058,8 +2058,8 @@ void CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback::Callb std::string errorCodeClassName = "java/lang/Integer"; std::string errorCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), - dataResponse.errorCode, errorCode); + chip::JniReferences::GetInstance().CreateBoxedObject( + errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), dataResponse.errorCode, errorCode); jobject debugText; debugText = chip::UtfString(env, dataResponse.debugText).jniValue(); @@ -2126,8 +2126,8 @@ void CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback::Callbac std::string errorCodeClassName = "java/lang/Integer"; std::string errorCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), - dataResponse.errorCode, errorCode); + chip::JniReferences::GetInstance().CreateBoxedObject( + errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), dataResponse.errorCode, errorCode); jobject debugText; debugText = chip::UtfString(env, dataResponse.debugText).jniValue(); @@ -2517,8 +2517,8 @@ void CHIPKeypadInputClusterSendKeyResponseCallback::CallbackFn( std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), - dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject( + statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); env->CallVoidMethod(javaCallbackRef, javaMethod, status); } @@ -2579,9 +2579,9 @@ void CHIPMediaPlaybackClusterMediaFastForwardResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -2641,9 +2641,9 @@ void CHIPMediaPlaybackClusterMediaNextResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -2703,9 +2703,9 @@ void CHIPMediaPlaybackClusterMediaPauseResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -2765,9 +2765,9 @@ void CHIPMediaPlaybackClusterMediaPlayResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -2827,9 +2827,9 @@ void CHIPMediaPlaybackClusterMediaPreviousResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -2889,9 +2889,9 @@ void CHIPMediaPlaybackClusterMediaRewindResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -2951,9 +2951,9 @@ void CHIPMediaPlaybackClusterMediaSeekResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -3014,9 +3014,9 @@ void CHIPMediaPlaybackClusterMediaSkipBackwardResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -3077,9 +3077,9 @@ void CHIPMediaPlaybackClusterMediaSkipForwardResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -3140,9 +3140,9 @@ void CHIPMediaPlaybackClusterMediaStartOverResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -3202,9 +3202,9 @@ void CHIPMediaPlaybackClusterMediaStopResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -3806,8 +3806,8 @@ void CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::CallbackFn std::string actionClassName = "java/lang/Integer"; std::string actionCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(actionClassName.c_str(), actionCtorSignature.c_str(), - dataResponse.action, action); + chip::JniReferences::GetInstance().CreateBoxedObject( + actionClassName.c_str(), actionCtorSignature.c_str(), dataResponse.action, action); jobject delayedActionTime; std::string delayedActionTimeClassName = "java/lang/Long"; @@ -3880,8 +3880,8 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), - dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject( + statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject delayedActionTime; if (!dataResponse.delayedActionTime.HasValue()) { @@ -4746,8 +4746,8 @@ void CHIPTvChannelClusterChangeChannelResponseCallback::CallbackFn( std::string ErrorTypeClassName = "java/lang/Integer"; std::string ErrorTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(ErrorTypeClassName.c_str(), ErrorTypeCtorSignature.c_str(), - dataResponse.errorType, ErrorType); + chip::JniReferences::GetInstance().CreateBoxedObject( + ErrorTypeClassName.c_str(), ErrorTypeCtorSignature.c_str(), dataResponse.errorType, ErrorType); env->CallVoidMethod(javaCallbackRef, javaMethod, ChannelMatch, ErrorType); } @@ -4809,8 +4809,8 @@ void CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CallbackFn( std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), - dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject( + statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject data; data = chip::UtfString(env, dataResponse.data).jniValue(); @@ -5059,8 +5059,8 @@ void CHIPTestClusterClusterTestEnumsResponseCallback::CallbackFn( std::string arg2ClassName = "java/lang/Integer"; std::string arg2CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(arg2ClassName.c_str(), arg2CtorSignature.c_str(), - dataResponse.arg2, arg2); + chip::JniReferences::GetInstance().CreateBoxedObject( + arg2ClassName.c_str(), arg2CtorSignature.c_str(), dataResponse.arg2, arg2); env->CallVoidMethod(javaCallbackRef, javaMethod, arg1, arg2); } diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 5d63c7f38b3c39..91224b9f9a213f 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -762,7 +762,7 @@ void CHIPAudioOutputAudioOutputListAttributeCallback::CallbackFn( bool outputTypeNull = false; bool outputTypeHasValue = true; - uint8_t outputTypeValue = entry.outputType; + chip::app::Clusters::AudioOutput::AudioOutputType outputTypeValue = entry.outputType; jobject outputType = nullptr; if (!outputTypeNull && outputTypeHasValue) @@ -908,7 +908,7 @@ void CHIPBridgedActionsActionListAttributeCallback::CallbackFn( bool typeNull = false; bool typeHasValue = true; - uint8_t typeValue = entry.type; + chip::app::Clusters::BridgedActions::ActionTypeEnum typeValue = entry.type; jobject type = nullptr; if (!typeNull && typeHasValue) @@ -953,7 +953,7 @@ void CHIPBridgedActionsActionListAttributeCallback::CallbackFn( bool statusNull = false; bool statusHasValue = true; - uint8_t statusValue = entry.status; + chip::app::Clusters::BridgedActions::ActionStatusEnum statusValue = entry.status; jobject status = nullptr; if (!statusNull && statusHasValue) @@ -1089,7 +1089,7 @@ void CHIPBridgedActionsEndpointListAttributeCallback::CallbackFn( bool typeNull = false; bool typeHasValue = true; - uint8_t typeValue = entry.type; + chip::app::Clusters::BridgedActions::EndpointListTypeEnum typeValue = entry.type; jobject type = nullptr; if (!typeNull && typeHasValue) @@ -1267,9 +1267,9 @@ void CHIPContentLauncherSupportedStreamingTypesAttributeCallback::CallbackFn( auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - uint8_t entryValue = entry; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::app::Clusters::ContentLauncher::ContentLaunchStreamingType entryValue = entry; jobject entryObject = nullptr; if (!entryNull) @@ -2058,7 +2058,7 @@ void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( bool typeNull = false; bool typeHasValue = true; - uint8_t typeValue = entry.type; + chip::app::Clusters::GeneralDiagnostics::InterfaceType typeValue = entry.type; jobject type = nullptr; if (!typeNull && typeHasValue) @@ -2631,7 +2631,7 @@ void CHIPGroupKeyManagementGroupKeysAttributeCallback::CallbackFn( bool groupKeySecurityPolicyNull = false; bool groupKeySecurityPolicyHasValue = true; - uint8_t groupKeySecurityPolicyValue = entry.groupKeySecurityPolicy; + chip::app::Clusters::GroupKeyManagement::GroupKeySecurityPolicy groupKeySecurityPolicyValue = entry.groupKeySecurityPolicy; jobject groupKeySecurityPolicy = nullptr; if (!groupKeySecurityPolicyNull && groupKeySecurityPolicyHasValue) @@ -2997,7 +2997,7 @@ void CHIPMediaInputMediaInputListAttributeCallback::CallbackFn( bool inputTypeNull = false; bool inputTypeHasValue = true; - uint8_t inputTypeValue = entry.inputType; + chip::app::Clusters::MediaInput::MediaInputType inputTypeValue = entry.inputType; jobject inputType = nullptr; if (!inputTypeNull && inputTypeHasValue) @@ -6694,9 +6694,9 @@ void CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback::Callb auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - uint8_t entryValue = entry; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::app::Clusters::ThreadNetworkDiagnostics::NetworkFault entryValue = entry; jobject entryObject = nullptr; if (!entryNull) diff --git a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt index a4580e134c94b4..25db00bf195547 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt @@ -5,6 +5,8 @@ #import "CHIPStructsObjc.h" #import "CHIPCommandPayloadsObjc.h" +#include + {{#>CHIPCallbackBridge partial-type="Status" }}DefaultSuccessCallback{{/CHIPCallbackBridge}} {{#>CHIPCallbackBridge partial-type="CommandStatus" }}CommandSuccessCallback{{/CHIPCallbackBridge}} {{#>CHIPCallbackBridge type="Octet_String" isNullable=false ns="chip"}}OctetStringAttributeCallback{{/CHIPCallbackBridge}} diff --git a/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt b/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt index be60b0d8737870..5ef8dcbcf25de1 100644 --- a/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt @@ -30,14 +30,18 @@ {{>decode_value target=(concat ../target "." (asStructPropertyName label)) source=(concat ../source "." (asLowerCamelCase label)) cluster=../cluster errorCode=errorCode depth=(incrementDepth depth) }} {{/zcl_struct_items_by_struct_name}} {{else}} - {{#if_is_bitmap type}} - {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:{{source}}.Raw()]; - {{else if (isOctetString type)}} - {{target}} = [NSData dataWithBytes:{{source}}.data() length:{{source}}.size()]; - {{else if (isCharString type)}} - {{target}} = [[NSString alloc] initWithBytes:{{source}}.data() length:{{source}}.size() encoding:NSUTF8StringEncoding]; + {{#if_chip_enum type}} + {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:chip::to_underlying({{source}})]; {{else}} - {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:{{source}}]; - {{/if_is_bitmap}} + {{#if_is_bitmap type}} + {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:{{source}}.Raw()]; + {{else if (isOctetString type)}} + {{target}} = [NSData dataWithBytes:{{source}}.data() length:{{source}}.size()]; + {{else if (isCharString type)}} + {{target}} = [[NSString alloc] initWithBytes:{{source}}.data() length:{{source}}.size() encoding:NSUTF8StringEncoding]; + {{else}} + {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:{{source}}]; + {{/if_is_bitmap}} + {{/if_chip_enum}} {{/if_is_struct}} {{/if}} diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index 038c2b7e6c0f8c..72fa02c1f9f079 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -21,6 +21,8 @@ #import "CHIPCommandPayloadsObjc.h" #import "CHIPStructsObjc.h" +#include + void CHIPDefaultSuccessCallbackBridge::OnSuccessFn(void * context) { DispatchSuccess(context, nil); }; void CHIPCommandSuccessCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::NullObjectType &) @@ -231,7 +233,7 @@ void CHIPVendorIdAttributeCallbackBridge::OnSuccessFn(void * context, chip::VendorId value) { NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedShort:value]; + objCValue = [NSNumber numberWithUnsignedShort:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; @@ -242,7 +244,7 @@ if (value.IsNull()) { objCValue = nil; } else { - objCValue = [NSNumber numberWithUnsignedShort:value.Value()]; + objCValue = [NSNumber numberWithUnsignedShort:chip::to_underlying(value.Value())]; } DispatchSuccess(context, objCValue); }; @@ -278,7 +280,7 @@ CHIPAudioOutputClusterAudioOutputInfo * newElement_0; newElement_0 = [CHIPAudioOutputClusterAudioOutputInfo new]; newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; - newElement_0.outputType = [NSNumber numberWithUnsignedChar:entry_0.outputType]; + newElement_0.outputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.outputType)]; newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() length:entry_0.name.size() encoding:NSUTF8StringEncoding]; @@ -306,10 +308,10 @@ newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() length:entry_0.name.size() encoding:NSUTF8StringEncoding]; - newElement_0.type = [NSNumber numberWithUnsignedChar:entry_0.type]; + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; newElement_0.supportedCommands = [NSNumber numberWithUnsignedShort:entry_0.supportedCommands]; - newElement_0.status = [NSNumber numberWithUnsignedChar:entry_0.status]; + newElement_0.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.status)]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -335,7 +337,7 @@ newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() length:entry_0.name.size() encoding:NSUTF8StringEncoding]; - newElement_0.type = [NSNumber numberWithUnsignedChar:entry_0.type]; + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; auto * array_NaN = [NSMutableArray new]; auto iter_NaN = entry_0.endpoints.begin(); while (iter_NaN.Next()) { @@ -386,7 +388,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -545,7 +547,7 @@ newElement_0.offPremiseServicesReachableIPv4 = [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv4]; newElement_0.offPremiseServicesReachableIPv6 = [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv6]; newElement_0.hardwareAddress = [NSData dataWithBytes:entry_0.hardwareAddress.data() length:entry_0.hardwareAddress.size()]; - newElement_0.type = [NSNumber numberWithUnsignedChar:entry_0.type]; + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -653,7 +655,7 @@ newElement_0.groupKeyIndex = [NSNumber numberWithUnsignedShort:entry_0.groupKeyIndex]; newElement_0.groupKeyRoot = [NSData dataWithBytes:entry_0.groupKeyRoot.data() length:entry_0.groupKeyRoot.size()]; newElement_0.groupKeyEpochStartTime = [NSNumber numberWithUnsignedLongLong:entry_0.groupKeyEpochStartTime]; - newElement_0.groupKeySecurityPolicy = [NSNumber numberWithUnsignedChar:entry_0.groupKeySecurityPolicy]; + newElement_0.groupKeySecurityPolicy = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.groupKeySecurityPolicy)]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -675,7 +677,7 @@ CHIPMediaInputClusterMediaInputInfo * newElement_0; newElement_0 = [CHIPMediaInputClusterMediaInputInfo new]; newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; - newElement_0.inputType = [NSNumber numberWithUnsignedChar:entry_0.inputType]; + newElement_0.inputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.inputType)]; newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() length:entry_0.name.size() encoding:NSUTF8StringEncoding]; @@ -995,7 +997,7 @@ newElement_0.nullableStruct = [CHIPTestClusterClusterSimpleStruct new]; newElement_0.nullableStruct.a = [NSNumber numberWithUnsignedChar:entry_0.nullableStruct.Value().a]; newElement_0.nullableStruct.b = [NSNumber numberWithBool:entry_0.nullableStruct.Value().b]; - newElement_0.nullableStruct.c = [NSNumber numberWithUnsignedChar:entry_0.nullableStruct.Value().c]; + newElement_0.nullableStruct.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.nullableStruct.Value().c)]; newElement_0.nullableStruct.d = [NSData dataWithBytes:entry_0.nullableStruct.Value().d.data() length:entry_0.nullableStruct.Value().d.size()]; newElement_0.nullableStruct.e = [[NSString alloc] initWithBytes:entry_0.nullableStruct.Value().e.data() @@ -1009,7 +1011,7 @@ newElement_0.optionalStruct = [CHIPTestClusterClusterSimpleStruct new]; newElement_0.optionalStruct.a = [NSNumber numberWithUnsignedChar:entry_0.optionalStruct.Value().a]; newElement_0.optionalStruct.b = [NSNumber numberWithBool:entry_0.optionalStruct.Value().b]; - newElement_0.optionalStruct.c = [NSNumber numberWithUnsignedChar:entry_0.optionalStruct.Value().c]; + newElement_0.optionalStruct.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.optionalStruct.Value().c)]; newElement_0.optionalStruct.d = [NSData dataWithBytes:entry_0.optionalStruct.Value().d.data() length:entry_0.optionalStruct.Value().d.size()]; newElement_0.optionalStruct.e = [[NSString alloc] initWithBytes:entry_0.optionalStruct.Value().e.data() @@ -1030,7 +1032,7 @@ [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalStruct.Value().Value().a]; newElement_0.nullableOptionalStruct.b = [NSNumber numberWithBool:entry_0.nullableOptionalStruct.Value().Value().b]; newElement_0.nullableOptionalStruct.c = - [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalStruct.Value().Value().c]; + [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.nullableOptionalStruct.Value().Value().c)]; newElement_0.nullableOptionalStruct.d = [NSData dataWithBytes:entry_0.nullableOptionalStruct.Value().Value().d.data() length:entry_0.nullableOptionalStruct.Value().Value().d.size()]; @@ -1055,7 +1057,7 @@ while (iter_NaN.Next()) { auto & entry_NaN = iter_NaN.GetValue(); NSNumber * newElement_NaN; - newElement_NaN = [NSNumber numberWithUnsignedChar:entry_NaN]; + newElement_NaN = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_NaN)]; [array_NaN addObject:newElement_NaN]; } if (iter_NaN.GetStatus() != CHIP_NO_ERROR) { @@ -1068,7 +1070,7 @@ while (iter_NaN.Next()) { auto & entry_NaN = iter_NaN.GetValue(); NSNumber * newElement_NaN; - newElement_NaN = [NSNumber numberWithUnsignedChar:entry_NaN]; + newElement_NaN = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_NaN)]; [array_NaN addObject:newElement_NaN]; } if (iter_NaN.GetStatus() != CHIP_NO_ERROR) { @@ -1086,7 +1088,7 @@ while (iter_NaN.Next()) { auto & entry_NaN = iter_NaN.GetValue(); NSNumber * newElement_NaN; - newElement_NaN = [NSNumber numberWithUnsignedChar:entry_NaN]; + newElement_NaN = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_NaN)]; [array_NaN addObject:newElement_NaN]; } if (iter_NaN.GetStatus() != CHIP_NO_ERROR) { @@ -1237,7 +1239,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -1266,7 +1268,7 @@ auto * response = [CHIPApplicationLauncherClusterLaunchAppResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.status]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; response.status = value; } { @@ -1288,7 +1290,7 @@ } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.contentLaunchStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.contentLaunchStatus)]; response.contentLaunchStatus = value; } DispatchSuccess(context, response); @@ -1305,7 +1307,7 @@ } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.contentLaunchStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.contentLaunchStatus)]; response.contentLaunchStatus = value; } DispatchSuccess(context, response); @@ -1317,7 +1319,7 @@ auto * response = [CHIPDiagnosticLogsClusterRetrieveLogsResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.status]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; response.status = value; } { @@ -1507,12 +1509,12 @@ } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.userStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.userStatus)]; response.userStatus = value; } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.userType]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.userType)]; response.userType = value; } { @@ -1534,12 +1536,12 @@ } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.userStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.userStatus)]; response.userStatus = value; } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.userType]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.userType)]; response.userType = value; } { @@ -1561,7 +1563,7 @@ } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.userType]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.userType)]; response.userType = value; } DispatchSuccess(context, response); @@ -1676,7 +1678,7 @@ auto * response = [CHIPDoorLockClusterSetPinResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.status]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; response.status = value; } DispatchSuccess(context, response); @@ -1688,7 +1690,7 @@ auto * response = [CHIPDoorLockClusterSetRfidResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.status]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; response.status = value; } DispatchSuccess(context, response); @@ -1760,7 +1762,7 @@ auto * response = [CHIPGeneralCommissioningClusterArmFailSafeResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.errorCode]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.errorCode)]; response.errorCode = value; } { @@ -1777,7 +1779,7 @@ auto * response = [CHIPGeneralCommissioningClusterCommissioningCompleteResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.errorCode]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.errorCode)]; response.errorCode = value; } { @@ -1794,7 +1796,7 @@ auto * response = [CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.errorCode]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.errorCode)]; response.errorCode = value; } { @@ -1908,7 +1910,7 @@ auto * response = [CHIPKeypadInputClusterSendKeyResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.status]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; response.status = value; } DispatchSuccess(context, response); @@ -1920,7 +1922,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaFastForwardResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -1932,7 +1934,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaNextResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -1944,7 +1946,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaPauseResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -1956,7 +1958,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaPlayResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -1968,7 +1970,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaPreviousResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -1980,7 +1982,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaRewindResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -1992,7 +1994,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaSeekResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -2004,7 +2006,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaSkipBackwardResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -2016,7 +2018,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaSkipForwardResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -2028,7 +2030,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaStartOverResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -2040,7 +2042,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaStopResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -2229,7 +2231,7 @@ auto * response = [CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.action]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.action)]; response.action = value; } { @@ -2246,7 +2248,7 @@ auto * response = [CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.status]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; response.status = value; } { @@ -2600,7 +2602,7 @@ } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.errorType]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.errorType)]; response.errorType = value; } DispatchSuccess(context, response); @@ -2612,7 +2614,7 @@ auto * response = [CHIPTargetNavigatorClusterNavigateTargetResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.status]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; response.status = value; } { @@ -2644,7 +2646,7 @@ value = [CHIPTestClusterClusterSimpleStruct new]; value.a = [NSNumber numberWithUnsignedChar:data.arg1.a]; value.b = [NSNumber numberWithBool:data.arg1.b]; - value.c = [NSNumber numberWithUnsignedChar:data.arg1.c]; + value.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.arg1.c)]; value.d = [NSData dataWithBytes:data.arg1.d.data() length:data.arg1.d.size()]; value.e = [[NSString alloc] initWithBytes:data.arg1.e.data() length:data.arg1.e.size() encoding:NSUTF8StringEncoding]; value.f = [NSNumber numberWithUnsignedChar:data.arg1.f.Raw()]; @@ -2673,12 +2675,12 @@ auto * response = [CHIPTestClusterClusterTestEnumsResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedShort:data.arg1]; + value = [NSNumber numberWithUnsignedShort:chip::to_underlying(data.arg1)]; response.arg1 = value; } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.arg2]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.arg2)]; response.arg2 = value; } DispatchSuccess(context, response); diff --git a/src/lib/support/JniReferences.h b/src/lib/support/JniReferences.h index a45cb3f0d15004..32a8e6d497d35f 100644 --- a/src/lib/support/JniReferences.h +++ b/src/lib/support/JniReferences.h @@ -20,6 +20,7 @@ #include #include #include +#include #include namespace chip { @@ -105,7 +106,7 @@ class JniReferences * Creates a boxed type (e.g. java.lang.Integer) based on the the class name ("java/lang/Integer"), constructor JNI signature * ("(I)V"), and value. */ - template + template ::value, int> = 0> CHIP_ERROR CreateBoxedObject(std::string boxedTypeClsName, std::string constructorSignature, T value, jobject & outObj) { JNIEnv * env = GetEnvForCurrentThread(); @@ -121,6 +122,15 @@ class JniReferences return err; } + /** + * Handling for strongly-typed enums. + */ + template ::value, int> = 0> + CHIP_ERROR CreateBoxedObject(std::string boxedTypeClsName, std::string constructorSignature, T value, jobject & outObj) + { + return CreateBoxedObject(boxedTypeClsName, constructorSignature, chip::to_underlying(value), outObj); + } + private: JniReferences() {} diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index d7c494ecbb02b1..74f46c31b4fd85 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -832,7 +832,7 @@ enum class IdentifyEffectIdentifier : uint8_t kStopEffect = 0xFF, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IdentifyEffectIdentifier = EmberAfIdentifyEffectIdentifier; +using IdentifyEffectIdentifier = EmberAfIdentifyEffectIdentifier; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -843,7 +843,7 @@ enum class IdentifyEffectVariant : uint8_t kDefault = 0x00, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IdentifyEffectVariant = EmberAfIdentifyEffectVariant; +using IdentifyEffectVariant = EmberAfIdentifyEffectVariant; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -859,7 +859,7 @@ enum class IdentifyIdentifyType : uint8_t kActuator = 0x05, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IdentifyIdentifyType = EmberAfIdentifyIdentifyType; +using IdentifyIdentifyType = EmberAfIdentifyIdentifyType; #endif namespace Commands { @@ -2407,7 +2407,7 @@ enum class OnOffDelayedAllOffEffectVariant : uint8_t k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using OnOffDelayedAllOffEffectVariant = EmberAfOnOffDelayedAllOffEffectVariant; +using OnOffDelayedAllOffEffectVariant = EmberAfOnOffDelayedAllOffEffectVariant; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -2418,7 +2418,7 @@ enum class OnOffDyingLightEffectVariant : uint8_t k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0x00, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using OnOffDyingLightEffectVariant = EmberAfOnOffDyingLightEffectVariant; +using OnOffDyingLightEffectVariant = EmberAfOnOffDyingLightEffectVariant; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -2430,7 +2430,7 @@ enum class OnOffEffectIdentifier : uint8_t kDyingLight = 0x01, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using OnOffEffectIdentifier = EmberAfOnOffEffectIdentifier; +using OnOffEffectIdentifier = EmberAfOnOffEffectIdentifier; #endif // Bitmap for OnOffControl @@ -2790,7 +2790,7 @@ enum class MoveMode : uint8_t kDown = 0x01, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MoveMode = EmberAfMoveMode; +using MoveMode = EmberAfMoveMode; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -2802,7 +2802,7 @@ enum class StepMode : uint8_t kDown = 0x01, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using StepMode = EmberAfStepMode; +using StepMode = EmberAfStepMode; #endif namespace Commands { @@ -4818,9 +4818,6 @@ struct TypeInfo } // namespace Attributes } // namespace PowerProfile namespace ApplianceControl { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for ApplianceStatus enum class ApplianceStatus : uint8_t { @@ -4840,12 +4837,6 @@ enum class ApplianceStatus : uint8_t kSupercooling = 0x0E, kSuperheating = 0x0F, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ApplianceStatus = EmberAfApplianceStatus; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for CommandIdentification enum class CommandIdentification : uint8_t { @@ -4861,12 +4852,6 @@ enum class CommandIdentification : uint8_t kEnableEnergyControl = 0x0A, kDisableEnergyControl = 0x0B, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using CommandIdentification = EmberAfCommandIdentification; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for WarningEvent enum class WarningEvent : uint8_t { @@ -4876,9 +4861,6 @@ enum class WarningEvent : uint8_t kWarning4OverallPowerBackBelowThePowerThresholdLevel = 0x03, kWarning5OverallPowerWillBePotentiallyAboveAvailablePowerLevelIfTheApplianceStarts = 0x04, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using WarningEvent = EmberAfWarningEvent; -#endif // Bitmap for RemoteEnableFlagsAndDeviceStatus2 enum class RemoteEnableFlagsAndDeviceStatus2 : uint8_t @@ -5616,21 +5598,12 @@ struct TypeInfo } // namespace Attributes } // namespace PollControl namespace BridgedActions { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for ActionErrorEnum enum class ActionErrorEnum : uint8_t { kUnknown = 0x00, kInterrupted = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ActionErrorEnum = EmberAfActionErrorEnum; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for ActionStatusEnum enum class ActionStatusEnum : uint8_t { @@ -5639,12 +5612,6 @@ enum class ActionStatusEnum : uint8_t kPaused = 0x02, kDisabled = 0x03, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ActionStatusEnum = EmberAfActionStatusEnum; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for ActionTypeEnum enum class ActionTypeEnum : uint8_t { @@ -5656,12 +5623,6 @@ enum class ActionTypeEnum : uint8_t kNotification = 0x05, kAlarm = 0x06, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ActionTypeEnum = EmberAfActionTypeEnum; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for EndpointListTypeEnum enum class EndpointListTypeEnum : uint8_t { @@ -5669,9 +5630,6 @@ enum class EndpointListTypeEnum : uint8_t kRoom = 0x01, kZone = 0x02, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using EndpointListTypeEnum = EmberAfEndpointListTypeEnum; -#endif // Bitmap for CommandBits enum class CommandBits : uint16_t @@ -6793,7 +6751,7 @@ enum class OTAApplyUpdateAction : uint8_t kDiscontinue = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using OTAApplyUpdateAction = EmberAfOTAApplyUpdateAction; +using OTAApplyUpdateAction = EmberAfOTAApplyUpdateAction; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -6807,7 +6765,7 @@ enum class OTADownloadProtocol : uint8_t kVendorSpecific = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using OTADownloadProtocol = EmberAfOTADownloadProtocol; +using OTADownloadProtocol = EmberAfOTADownloadProtocol; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -6820,7 +6778,7 @@ enum class OTAQueryStatus : uint8_t kNotAvailable = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using OTAQueryStatus = EmberAfOTAQueryStatus; +using OTAQueryStatus = EmberAfOTAQueryStatus; #endif namespace Commands { @@ -7096,7 +7054,7 @@ enum class ChangeReasonEnum : uint8_t kDelayByProvider = 0x04, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ChangeReasonEnum = EmberAfChangeReasonEnum; +using ChangeReasonEnum = EmberAfChangeReasonEnum; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -7109,7 +7067,7 @@ enum class OTAAnnouncementReason : uint8_t kUrgentUpdateAvailable = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using OTAAnnouncementReason = EmberAfOTAAnnouncementReason; +using OTAAnnouncementReason = EmberAfOTAAnnouncementReason; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -7128,7 +7086,7 @@ enum class UpdateStateEnum : uint8_t kDelayedOnUserConsent = 0x08, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using UpdateStateEnum = EmberAfUpdateStateEnum; +using UpdateStateEnum = EmberAfUpdateStateEnum; #endif namespace Commands { @@ -7829,9 +7787,6 @@ struct TypeInfo } // namespace Attributes } // namespace PowerSource namespace GeneralCommissioning { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for GeneralCommissioningError enum class GeneralCommissioningError : uint8_t { @@ -7839,9 +7794,6 @@ enum class GeneralCommissioningError : uint8_t kValueOutsideRange = 0x01, kInvalidAuthentication = 0x02, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using GeneralCommissioningError = EmberAfGeneralCommissioningError; -#endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM @@ -7853,7 +7805,7 @@ enum class RegulatoryLocationType : uint8_t kIndoorOutdoor = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using RegulatoryLocationType = EmberAfRegulatoryLocationType; +using RegulatoryLocationType = EmberAfRegulatoryLocationType; #endif namespace Structs { @@ -8213,7 +8165,7 @@ enum class NetworkCommissioningError : uint8_t kUnknownError = 0x13, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using NetworkCommissioningError = EmberAfNetworkCommissioningError; +using NetworkCommissioningError = EmberAfNetworkCommissioningError; #endif namespace Structs { @@ -8941,9 +8893,6 @@ struct TypeInfo } // namespace Attributes } // namespace NetworkCommissioning namespace DiagnosticLogs { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for LogsIntent enum class LogsIntent : uint8_t { @@ -8951,12 +8900,6 @@ enum class LogsIntent : uint8_t kNetworkDiag = 0x01, kCrashLogs = 0x02, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using LogsIntent = EmberAfLogsIntent; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for LogsStatus enum class LogsStatus : uint8_t { @@ -8966,21 +8909,12 @@ enum class LogsStatus : uint8_t kBusy = 0x03, kDenied = 0x04, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using LogsStatus = EmberAfLogsStatus; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for LogsTransferProtocol enum class LogsTransferProtocol : uint8_t { kResponsePayload = 0x00, kBdx = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using LogsTransferProtocol = EmberAfLogsTransferProtocol; -#endif namespace Commands { // Forward-declarations so we can reference these later. @@ -9116,7 +9050,7 @@ enum class BootReasonType : uint8_t kSoftwareReset = 0x06, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using BootReasonType = EmberAfBootReasonType; +using BootReasonType = EmberAfBootReasonType; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -9137,7 +9071,7 @@ enum class HardwareFaultType : uint8_t kTamperDetected = 0x0A, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using HardwareFaultType = EmberAfHardwareFaultType; +using HardwareFaultType = EmberAfHardwareFaultType; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -9152,7 +9086,7 @@ enum class InterfaceType : uint8_t kThread = 0x04, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using InterfaceType = EmberAfInterfaceType; +using InterfaceType = EmberAfInterfaceType; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -9166,7 +9100,7 @@ enum class NetworkFaultType : uint8_t kConnectionFailed = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using NetworkFaultType = EmberAfNetworkFaultType; +using NetworkFaultType = EmberAfNetworkFaultType; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -9183,7 +9117,7 @@ enum class RadioFaultType : uint8_t kEthernetFault = 0x06, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using RadioFaultType = EmberAfRadioFaultType; +using RadioFaultType = EmberAfRadioFaultType; #endif namespace Structs { @@ -9670,9 +9604,6 @@ struct DecodableType } // namespace Events } // namespace SoftwareDiagnostics namespace ThreadNetworkDiagnostics { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for NetworkFault enum class NetworkFault : uint8_t { @@ -9681,9 +9612,6 @@ enum class NetworkFault : uint8_t kHardwareFailure = 0x02, kNetworkJammed = 0x03, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using NetworkFault = EmberAfNetworkFault; -#endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM @@ -9699,20 +9627,14 @@ enum class RoutingRole : uint8_t kLeader = 0x06, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using RoutingRole = EmberAfRoutingRole; +using RoutingRole = EmberAfRoutingRole; #endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for ThreadConnectionStatus enum class ThreadConnectionStatus : uint8_t { kConnected = 0x00, kNotConnected = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ThreadConnectionStatus = EmberAfThreadConnectionStatus; -#endif namespace Structs { namespace NeighborTable { @@ -10650,9 +10572,6 @@ struct DecodableType } // namespace Events } // namespace ThreadNetworkDiagnostics namespace WiFiNetworkDiagnostics { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for AssociationFailureCause enum class AssociationFailureCause : uint8_t { @@ -10661,9 +10580,6 @@ enum class AssociationFailureCause : uint8_t kAuthenticationFailed = 0x02, kSsidNotFound = 0x03, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using AssociationFailureCause = EmberAfAssociationFailureCause; -#endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM @@ -10678,20 +10594,14 @@ enum class SecurityType : uint8_t kWpa3 = 0x05, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using SecurityType = EmberAfSecurityType; +using SecurityType = EmberAfSecurityType; #endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for WiFiConnectionStatus enum class WiFiConnectionStatus : uint8_t { kConnected = 0x00, kNotConnected = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using WiFiConnectionStatus = EmberAfWiFiConnectionStatus; -#endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM @@ -10706,7 +10616,7 @@ enum class WiFiVersionType : uint8_t k80211ax = 0x05, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using WiFiVersionType = EmberAfWiFiVersionType; +using WiFiVersionType = EmberAfWiFiVersionType; #endif namespace Commands { @@ -11039,7 +10949,7 @@ enum class PHYRateType : uint8_t k400g = 0x09, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using PHYRateType = EmberAfPHYRateType; +using PHYRateType = EmberAfPHYRateType; #endif namespace Commands { @@ -11867,7 +11777,7 @@ enum class StatusCode : uint8_t kWindowNotOpen = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using StatusCode = EmberAfStatusCode; +using StatusCode = EmberAfStatusCode; #endif namespace Commands { @@ -12038,7 +11948,7 @@ enum class NodeOperationalCertStatus : uint8_t kInvalidFabricIndex = 0x0B, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using NodeOperationalCertStatus = EmberAfNodeOperationalCertStatus; +using NodeOperationalCertStatus = EmberAfNodeOperationalCertStatus; #endif namespace Structs { @@ -13072,7 +12982,7 @@ enum class DoorLockOperationEventCode : uint8_t kManualUnlock = 0x0E, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using DoorLockOperationEventCode = EmberAfDoorLockOperationEventCode; +using DoorLockOperationEventCode = EmberAfDoorLockOperationEventCode; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -13089,11 +12999,8 @@ enum class DoorLockProgrammingEventCode : uint8_t kIdDeleted = 0x06, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using DoorLockProgrammingEventCode = EmberAfDoorLockProgrammingEventCode; +using DoorLockProgrammingEventCode = EmberAfDoorLockProgrammingEventCode; #endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for DoorLockSetPinOrIdStatus enum class DoorLockSetPinOrIdStatus : uint8_t { @@ -13102,9 +13009,6 @@ enum class DoorLockSetPinOrIdStatus : uint8_t kMemoryFull = 0x02, kDuplicateCodeError = 0x03, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using DoorLockSetPinOrIdStatus = EmberAfDoorLockSetPinOrIdStatus; -#endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM @@ -13117,7 +13021,7 @@ enum class DoorLockUserStatus : uint8_t kNotSupported = 0xFF, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using DoorLockUserStatus = EmberAfDoorLockUserStatus; +using DoorLockUserStatus = EmberAfDoorLockUserStatus; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -13133,7 +13037,7 @@ enum class DoorLockUserType : uint8_t kNotSupported = 0xFF, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using DoorLockUserType = EmberAfDoorLockUserType; +using DoorLockUserType = EmberAfDoorLockUserType; #endif // Bitmap for DoorLockDayOfWeek @@ -16563,9 +16467,6 @@ struct TypeInfo } // namespace Attributes } // namespace BarrierControl namespace PumpConfigurationAndControl { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for PumpControlMode enum class PumpControlMode : uint8_t { @@ -16576,12 +16477,6 @@ enum class PumpControlMode : uint8_t kConstantTemperature = 0x05, kAutomatic = 0x07, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using PumpControlMode = EmberAfPumpControlMode; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for PumpOperationMode enum class PumpOperationMode : uint8_t { @@ -16590,9 +16485,6 @@ enum class PumpOperationMode : uint8_t kMaximum = 0x02, kLocal = 0x03, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using PumpOperationMode = EmberAfPumpOperationMode; -#endif // Bitmap for PumpStatus enum class PumpStatus : uint16_t @@ -17387,7 +17279,7 @@ enum class SetpointAdjustMode : uint8_t kHeatAndCoolSetpoints = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using SetpointAdjustMode = EmberAfSetpointAdjustMode; +using SetpointAdjustMode = EmberAfSetpointAdjustMode; #endif // Bitmap for DayOfWeek @@ -18428,7 +18320,7 @@ enum class ColorLoopAction : uint8_t kActivateFromEnhancedCurrentHue = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ColorLoopAction = EmberAfColorLoopAction; +using ColorLoopAction = EmberAfColorLoopAction; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -18440,7 +18332,7 @@ enum class ColorLoopDirection : uint8_t kIncrementHue = 0x01, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ColorLoopDirection = EmberAfColorLoopDirection; +using ColorLoopDirection = EmberAfColorLoopDirection; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -18453,7 +18345,7 @@ enum class ColorMode : uint8_t kColorTemperature = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ColorMode = EmberAfColorMode; +using ColorMode = EmberAfColorMode; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -18467,7 +18359,7 @@ enum class HueDirection : uint8_t kDown = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using HueDirection = EmberAfHueDirection; +using HueDirection = EmberAfHueDirection; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -18480,7 +18372,7 @@ enum class HueMoveMode : uint8_t kDown = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using HueMoveMode = EmberAfHueMoveMode; +using HueMoveMode = EmberAfHueMoveMode; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -18492,7 +18384,7 @@ enum class HueStepMode : uint8_t kDown = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using HueStepMode = EmberAfHueStepMode; +using HueStepMode = EmberAfHueStepMode; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -18505,7 +18397,7 @@ enum class SaturationMoveMode : uint8_t kDown = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using SaturationMoveMode = EmberAfSaturationMoveMode; +using SaturationMoveMode = EmberAfSaturationMoveMode; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -18517,7 +18409,7 @@ enum class SaturationStepMode : uint8_t kDown = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using SaturationStepMode = EmberAfSaturationStepMode; +using SaturationStepMode = EmberAfSaturationStepMode; #endif // Bitmap for ColorCapabilities @@ -20229,18 +20121,12 @@ struct TypeInfo } // namespace Attributes } // namespace BallastConfiguration namespace IlluminanceMeasurement { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for LightSensorType enum class LightSensorType : uint8_t { kPhotodiode = 0x00, kCmos = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using LightSensorType = EmberAfLightSensorType; -#endif namespace Attributes { namespace MeasuredValue { @@ -22963,7 +22849,7 @@ enum class IasEnrollResponseCode : uint8_t kTooManyZones = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasEnrollResponseCode = EmberAfIasEnrollResponseCode; +using IasEnrollResponseCode = EmberAfIasEnrollResponseCode; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -22989,7 +22875,7 @@ enum class IasZoneType : uint16_t kInvalidZoneType = 0xFFFF, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasZoneType = EmberAfIasZoneType; +using IasZoneType = EmberAfIasZoneType; #endif // Bitmap for IasZoneStatus @@ -23369,9 +23255,6 @@ struct TypeInfo } // namespace Attributes } // namespace IasZone namespace IasAce { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for IasAceAlarmStatus enum class IasAceAlarmStatus : uint8_t { @@ -23383,12 +23266,6 @@ enum class IasAceAlarmStatus : uint8_t kFirePanic = 0x05, kEmergencyPanic = 0x06, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasAceAlarmStatus = EmberAfIasAceAlarmStatus; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for IasAceArmMode enum class IasAceArmMode : uint8_t { @@ -23397,12 +23274,6 @@ enum class IasAceArmMode : uint8_t kArmNightSleepZonesOnly = 0x02, kArmAllZones = 0x03, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasAceArmMode = EmberAfIasAceArmMode; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for IasAceArmNotification enum class IasAceArmNotification : uint8_t { @@ -23414,24 +23285,12 @@ enum class IasAceArmNotification : uint8_t kNotReadyToArm = 0x05, kAlreadyDisarmed = 0x06, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasAceArmNotification = EmberAfIasAceArmNotification; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for IasAceAudibleNotification enum class IasAceAudibleNotification : uint8_t { kMute = 0x00, kDefaultSound = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasAceAudibleNotification = EmberAfIasAceAudibleNotification; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for IasAceBypassResult enum class IasAceBypassResult : uint8_t { @@ -23442,12 +23301,6 @@ enum class IasAceBypassResult : uint8_t kUnknownZoneId = 0x04, kInvalidArmDisarmCode = 0x05, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasAceBypassResult = EmberAfIasAceBypassResult; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for IasAcePanelStatus enum class IasAcePanelStatus : uint8_t { @@ -23463,9 +23316,6 @@ enum class IasAcePanelStatus : uint8_t kArmingNight = 0x09, kArmingAway = 0x0A, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasAcePanelStatus = EmberAfIasAcePanelStatus; -#endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM @@ -23490,7 +23340,7 @@ enum class IasZoneType : uint16_t kInvalidZoneType = 0xFFFF, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasZoneType = EmberAfIasZoneType; +using IasZoneType = EmberAfIasZoneType; #endif // Bitmap for IasZoneStatus @@ -24499,29 +24349,17 @@ struct TypeInfo } // namespace Attributes } // namespace WakeOnLan namespace TvChannel { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for TvChannelErrorType enum class TvChannelErrorType : uint8_t { kMultipleMatches = 0x00, kNoMatches = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using TvChannelErrorType = EmberAfTvChannelErrorType; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for TvChannelLineupInfoType enum class TvChannelLineupInfoType : uint8_t { kMso = 0x00, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using TvChannelLineupInfoType = EmberAfTvChannelLineupInfoType; -#endif namespace Structs { namespace TvChannelInfo { @@ -24789,9 +24627,6 @@ struct TypeInfo } // namespace Attributes } // namespace TvChannel namespace TargetNavigator { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for NavigateTargetStatus enum class NavigateTargetStatus : uint8_t { @@ -24799,9 +24634,6 @@ enum class NavigateTargetStatus : uint8_t kAppNotAvailable = 0x01, kSystemBusy = 0x02, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using NavigateTargetStatus = EmberAfNavigateTargetStatus; -#endif namespace Structs { namespace NavigateTargetTargetInfo { @@ -24970,7 +24802,7 @@ enum class MediaPlaybackState : uint8_t kBuffering = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MediaPlaybackState = EmberAfMediaPlaybackState; +using MediaPlaybackState = EmberAfMediaPlaybackState; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -24986,7 +24818,7 @@ enum class MediaPlaybackStatus : uint8_t kSeekOutOfRange = 0x05, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MediaPlaybackStatus = EmberAfMediaPlaybackStatus; +using MediaPlaybackStatus = EmberAfMediaPlaybackStatus; #endif namespace Structs { @@ -25892,7 +25724,7 @@ enum class MediaInputType : uint8_t kOther = 0x0B, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MediaInputType = EmberAfMediaInputType; +using MediaInputType = EmberAfMediaInputType; #endif namespace Structs { @@ -26273,7 +26105,7 @@ enum class KeypadInputCecKeyCode : uint8_t kData = 0x76, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using KeypadInputCecKeyCode = EmberAfKeypadInputCecKeyCode; +using KeypadInputCecKeyCode = EmberAfKeypadInputCecKeyCode; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -26286,7 +26118,7 @@ enum class KeypadInputStatus : uint8_t kInvalidKeyInCurrentState = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using KeypadInputStatus = EmberAfKeypadInputStatus; +using KeypadInputStatus = EmberAfKeypadInputStatus; #endif namespace Commands { @@ -26393,21 +26225,12 @@ struct TypeInfo } // namespace Attributes } // namespace KeypadInput namespace ContentLauncher { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for ContentLaunchMetricType enum class ContentLaunchMetricType : uint8_t { kPixels = 0x00, kPercentage = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ContentLaunchMetricType = EmberAfContentLaunchMetricType; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for ContentLaunchParameterEnum enum class ContentLaunchParameterEnum : uint8_t { @@ -26423,9 +26246,6 @@ enum class ContentLaunchParameterEnum : uint8_t kSportsTeam = 0x09, kVideo = 0x0A, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ContentLaunchParameterEnum = EmberAfContentLaunchParameterEnum; -#endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM @@ -26437,7 +26257,7 @@ enum class ContentLaunchStatus : uint8_t kAuthFailed = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ContentLaunchStatus = EmberAfContentLaunchStatus; +using ContentLaunchStatus = EmberAfContentLaunchStatus; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -26449,7 +26269,7 @@ enum class ContentLaunchStreamingType : uint8_t kHls = 0x01, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ContentLaunchStreamingType = EmberAfContentLaunchStreamingType; +using ContentLaunchStreamingType = EmberAfContentLaunchStreamingType; #endif namespace Structs { @@ -26797,7 +26617,7 @@ enum class AudioOutputType : uint8_t kOther = 0x05, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using AudioOutputType = EmberAfAudioOutputType; +using AudioOutputType = EmberAfAudioOutputType; #endif namespace Structs { @@ -26965,7 +26785,7 @@ enum class ApplicationLauncherStatus : uint8_t kSystemBusy = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ApplicationLauncherStatus = EmberAfApplicationLauncherStatus; +using ApplicationLauncherStatus = EmberAfApplicationLauncherStatus; #endif namespace Structs { @@ -27149,7 +26969,7 @@ enum class ApplicationBasicStatus : uint8_t kActiveVisibleNotFocus = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ApplicationBasicStatus = EmberAfApplicationBasicStatus; +using ApplicationBasicStatus = EmberAfApplicationBasicStatus; #endif namespace Commands { @@ -27453,7 +27273,7 @@ enum class SimpleEnum : uint8_t kValueC = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using SimpleEnum = EmberAfSimpleEnum; +using SimpleEnum = EmberAfSimpleEnum; #endif // Bitmap for SimpleBitmap @@ -29352,9 +29172,6 @@ struct DecodableType } // namespace Events } // namespace TestCluster namespace Messaging { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for EventId enum class EventId : uint8_t { @@ -29440,36 +29257,18 @@ enum class EventId : uint8_t kManufacturerSpecificH = 0xE7, kManufacturerSpecificI = 0xE8, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using EventId = EmberAfEventId; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for MessagingControlConfirmation enum class MessagingControlConfirmation : uint8_t { kNotRequired = 0x00, kRequired = 0x80, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MessagingControlConfirmation = EmberAfMessagingControlConfirmation; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for MessagingControlEnhancedConfirmation enum class MessagingControlEnhancedConfirmation : uint8_t { kNotRequired = 0x00, kRequired = 0x20, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MessagingControlEnhancedConfirmation = EmberAfMessagingControlEnhancedConfirmation; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for MessagingControlImportance enum class MessagingControlImportance : uint8_t { @@ -29478,12 +29277,6 @@ enum class MessagingControlImportance : uint8_t kHigh = 0x08, kCritical = 0x0C, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MessagingControlImportance = EmberAfMessagingControlImportance; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for MessagingControlTransmission enum class MessagingControlTransmission : uint8_t { @@ -29492,9 +29285,6 @@ enum class MessagingControlTransmission : uint8_t kAnonymous = 0x02, kReserved = 0x03, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MessagingControlTransmission = EmberAfMessagingControlTransmission; -#endif // Bitmap for MessagingConfirmationControl enum class MessagingConfirmationControl : uint8_t @@ -30153,9 +29943,6 @@ struct TypeInfo } // namespace Attributes } // namespace MeterIdentification namespace ApplianceEventsAndAlert { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for EventIdentification enum class EventIdentification : uint8_t { @@ -30165,9 +29952,6 @@ enum class EventIdentification : uint8_t kSwitchingOff = 0x06, kWrongData = 0x07, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using EventIdentification = EmberAfEventIdentification; -#endif // Bitmap for AlertCount enum class AlertCount : uint8_t @@ -32382,18 +32166,12 @@ struct TypeInfo } // namespace Attributes } // namespace Binding namespace GroupKeyManagement { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for GroupKeySecurityPolicy enum class GroupKeySecurityPolicy : uint8_t { kStandard = 0x00, kLowLatency = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using GroupKeySecurityPolicy = EmberAfGroupKeySecurityPolicy; -#endif namespace Structs { namespace GroupKey { diff --git a/zzz_generated/app-common/app-common/zap-generated/enums.h b/zzz_generated/app-common/app-common/zap-generated/enums.h index 26501d1cfbeac6..bf4ca18310ea12 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -24,94 +24,6 @@ // ZCL enums -// Enum for ActionErrorEnum -enum EmberAfActionErrorEnum : uint8_t -{ - EMBER_ZCL_ACTION_ERROR_ENUM_UNKNOWN = 0, - EMBER_ZCL_ACTION_ERROR_ENUM_INTERRUPTED = 1, -}; - -// Enum for ActionStatusEnum -enum EmberAfActionStatusEnum : uint8_t -{ - EMBER_ZCL_ACTION_STATUS_ENUM_INACTIVE = 0, - EMBER_ZCL_ACTION_STATUS_ENUM_ACTIVE = 1, - EMBER_ZCL_ACTION_STATUS_ENUM_PAUSED = 2, - EMBER_ZCL_ACTION_STATUS_ENUM_DISABLED = 3, -}; - -// Enum for ActionTypeEnum -enum EmberAfActionTypeEnum : uint8_t -{ - EMBER_ZCL_ACTION_TYPE_ENUM_OTHER = 0, - EMBER_ZCL_ACTION_TYPE_ENUM_SCENE = 1, - EMBER_ZCL_ACTION_TYPE_ENUM_SEQUENCE = 2, - EMBER_ZCL_ACTION_TYPE_ENUM_AUTOMATION = 3, - EMBER_ZCL_ACTION_TYPE_ENUM_EXCEPTION = 4, - EMBER_ZCL_ACTION_TYPE_ENUM_NOTIFICATION = 5, - EMBER_ZCL_ACTION_TYPE_ENUM_ALARM = 6, -}; - -// Enum for AlertCountType -enum EmberAfAlertCountType : uint8_t -{ - EMBER_ZCL_ALERT_COUNT_TYPE_UNSTRUCTURED = 0, -}; - -// Enum for AlertStructureCategory -enum EmberAfAlertStructureCategory : uint16_t -{ - EMBER_ZCL_ALERT_STRUCTURE_CATEGORY_WARNING = 256, - EMBER_ZCL_ALERT_STRUCTURE_CATEGORY_DANGER = 512, - EMBER_ZCL_ALERT_STRUCTURE_CATEGORY_FAILURE = 768, -}; - -// Enum for AlertStructurePresenceRecovery -enum EmberAfAlertStructurePresenceRecovery : uint16_t -{ - EMBER_ZCL_ALERT_STRUCTURE_PRESENCE_RECOVERY_RECOVERY = 0, - EMBER_ZCL_ALERT_STRUCTURE_PRESENCE_RECOVERY_PRESENCE = 4096, -}; - -// Enum for AmiRegistrationState -enum EmberAfAmiRegistrationState : uint8_t -{ - EMBER_ZCL_AMI_REGISTRATION_STATE_UNREGISTERED = 0, - EMBER_ZCL_AMI_REGISTRATION_STATE_JOINING_NETWORK = 1, - EMBER_ZCL_AMI_REGISTRATION_STATE_JOINED_NETWORK = 2, - EMBER_ZCL_AMI_REGISTRATION_STATE_SUBMITTED_REGISTRATION_REQUEST = 3, - EMBER_ZCL_AMI_REGISTRATION_STATE_REGISTRATION_REJECTED = 4, - EMBER_ZCL_AMI_REGISTRATION_STATE_REGISTERED = 5, - EMBER_ZCL_AMI_REGISTRATION_STATE_REGISTERATION_NOT_POSSIBLE = 6, -}; - -// Enum for AnonymousDataState -enum EmberAfAnonymousDataState : uint8_t -{ - EMBER_ZCL_ANONYMOUS_DATA_STATE_NO_SOURCE_FOUND = 0, - EMBER_ZCL_ANONYMOUS_DATA_STATE_SOURCE_FOUND = 1, -}; - -// Enum for ApplianceStatus -enum EmberAfApplianceStatus : uint8_t -{ - EMBER_ZCL_APPLIANCE_STATUS_OFF = 1, - EMBER_ZCL_APPLIANCE_STATUS_STAND_BY = 2, - EMBER_ZCL_APPLIANCE_STATUS_PROGRAMMED = 3, - EMBER_ZCL_APPLIANCE_STATUS_PROGRAMMED_WAITING_TO_START = 4, - EMBER_ZCL_APPLIANCE_STATUS_RUNNING = 5, - EMBER_ZCL_APPLIANCE_STATUS_PAUSE = 6, - EMBER_ZCL_APPLIANCE_STATUS_END_PROGRAMMED = 7, - EMBER_ZCL_APPLIANCE_STATUS_FAILURE = 8, - EMBER_ZCL_APPLIANCE_STATUS_PROGRAMME_INTERRUPTED = 9, - EMBER_ZCL_APPLIANCE_STATUS_IDLE = 10, - EMBER_ZCL_APPLIANCE_STATUS_RINSE_HOLD = 11, - EMBER_ZCL_APPLIANCE_STATUS_SERVICE = 12, - EMBER_ZCL_APPLIANCE_STATUS_SUPERFREEZING = 13, - EMBER_ZCL_APPLIANCE_STATUS_SUPERCOOLING = 14, - EMBER_ZCL_APPLIANCE_STATUS_SUPERHEATING = 15, -}; - // Enum for ApplicationBasicStatus enum EmberAfApplicationBasicStatus : uint8_t { @@ -129,15 +41,6 @@ enum EmberAfApplicationLauncherStatus : uint8_t EMBER_ZCL_APPLICATION_LAUNCHER_STATUS_SYSTEM_BUSY = 2, }; -// Enum for AssociationFailureCause -enum EmberAfAssociationFailureCause : uint8_t -{ - EMBER_ZCL_ASSOCIATION_FAILURE_CAUSE_UNKNOWN = 0, - EMBER_ZCL_ASSOCIATION_FAILURE_CAUSE_ASSOCIATION_FAILED = 1, - EMBER_ZCL_ASSOCIATION_FAILURE_CAUSE_AUTHENTICATION_FAILED = 2, - EMBER_ZCL_ASSOCIATION_FAILURE_CAUSE_SSID_NOT_FOUND = 3, -}; - // Enum for AttributeWritePermission enum EmberAfAttributeWritePermission : uint8_t { @@ -177,69 +80,6 @@ enum EmberAfBarrierControlMovingState : uint8_t EMBER_ZCL_BARRIER_CONTROL_MOVING_STATE_OPENING = 2, }; -// Enum for BatChargeFaultType -enum EmberAfBatChargeFaultType : uint8_t -{ - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_UNSPECFIED = 0, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_AMBIENT_TOO_HOT = 1, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_AMBIENT_TOO_COLD = 2, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_BATTERY_TOO_HOT = 3, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_BATTERY_TOO_COLD = 4, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_BATTERY_ABSENT = 5, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_BATTERY_OVER_VOLTAGE = 6, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_BATTERY_UNDER_VOLTAGE = 7, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_CHARGER_OVER_VOLTAGE = 8, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_CHARGER_UNDER_VOLTAGE = 9, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_SAFETY_TIMEOUT = 10, -}; - -// Enum for BatChargeLevel -enum EmberAfBatChargeLevel : uint8_t -{ - EMBER_ZCL_BAT_CHARGE_LEVEL_OK = 0, - EMBER_ZCL_BAT_CHARGE_LEVEL_WARNING = 1, - EMBER_ZCL_BAT_CHARGE_LEVEL_CRITICAL = 2, -}; - -// Enum for BatChargeState -enum EmberAfBatChargeState : uint8_t -{ - EMBER_ZCL_BAT_CHARGE_STATE_UNKNOWN = 0, - EMBER_ZCL_BAT_CHARGE_STATE_IS_CHARGING = 1, - EMBER_ZCL_BAT_CHARGE_STATE_IS_AT_FULL_CHARGE = 2, - EMBER_ZCL_BAT_CHARGE_STATE_IS_NOT_CHARGING = 3, -}; - -// Enum for BatFaultType -enum EmberAfBatFaultType : uint8_t -{ - EMBER_ZCL_BAT_FAULT_TYPE_UNSPECFIED = 0, - EMBER_ZCL_BAT_FAULT_TYPE_OVER_TEMP = 1, - EMBER_ZCL_BAT_FAULT_TYPE_UNDER_TEMP = 2, -}; - -// Enum for BatReplaceability -enum EmberAfBatReplaceability : uint8_t -{ - EMBER_ZCL_BAT_REPLACEABILITY_UNSPECIFIED = 0, - EMBER_ZCL_BAT_REPLACEABILITY_NOT_REPLACEABLE = 1, - EMBER_ZCL_BAT_REPLACEABILITY_USER_REPLACEABLE = 2, - EMBER_ZCL_BAT_REPLACEABILITY_FACTORY_REPLACEABLE = 3, -}; - -// Enum for BatterySize -enum EmberAfBatterySize : uint8_t -{ - EMBER_ZCL_BATTERY_SIZE_NO_BATTERY = 0, - EMBER_ZCL_BATTERY_SIZE_BUILT_IN = 1, - EMBER_ZCL_BATTERY_SIZE_OTHER = 2, - EMBER_ZCL_BATTERY_SIZE_AA = 3, - EMBER_ZCL_BATTERY_SIZE_AAA = 4, - EMBER_ZCL_BATTERY_SIZE_C = 5, - EMBER_ZCL_BATTERY_SIZE_D = 6, - EMBER_ZCL_BATTERY_SIZE_UNKNOWN = 255, -}; - // Enum for BootReasonType enum EmberAfBootReasonType : uint8_t { @@ -252,13 +92,6 @@ enum EmberAfBootReasonType : uint8_t EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_RESET = 6, }; -// Enum for CecedSpecificationVersion -enum EmberAfCecedSpecificationVersion : uint8_t -{ - EMBER_ZCL_CECED_SPECIFICATION_VERSION_COMPLIANT_WITH_V10_NOT_CERTIFIED = 16, - EMBER_ZCL_CECED_SPECIFICATION_VERSION_COMPLIANT_WITH_V10_CERTIFIED = 26, -}; - // Enum for ChangeReasonEnum enum EmberAfChangeReasonEnum : uint8_t { @@ -298,45 +131,6 @@ enum EmberAfColorMode : uint8_t EMBER_ZCL_COLOR_MODE_COLOR_TEMPERATURE = 2, }; -// Enum for CommandIdentification -enum EmberAfCommandIdentification : uint8_t -{ - EMBER_ZCL_COMMAND_IDENTIFICATION_START = 1, - EMBER_ZCL_COMMAND_IDENTIFICATION_STOP = 2, - EMBER_ZCL_COMMAND_IDENTIFICATION_PAUSE = 3, - EMBER_ZCL_COMMAND_IDENTIFICATION_START_SUPERFREEZING = 4, - EMBER_ZCL_COMMAND_IDENTIFICATION_STOP_SUPERFREEZING = 5, - EMBER_ZCL_COMMAND_IDENTIFICATION_START_SUPERCOOLING = 6, - EMBER_ZCL_COMMAND_IDENTIFICATION_STOP_SUPERCOOLING = 7, - EMBER_ZCL_COMMAND_IDENTIFICATION_DISABLE_GAS = 8, - EMBER_ZCL_COMMAND_IDENTIFICATION_ENABLE_GAS = 9, - EMBER_ZCL_COMMAND_IDENTIFICATION_ENABLE_ENERGY_CONTROL = 10, - EMBER_ZCL_COMMAND_IDENTIFICATION_DISABLE_ENERGY_CONTROL = 11, -}; - -// Enum for ContentLaunchMetricType -enum EmberAfContentLaunchMetricType : uint8_t -{ - EMBER_ZCL_CONTENT_LAUNCH_METRIC_TYPE_PIXELS = 0, - EMBER_ZCL_CONTENT_LAUNCH_METRIC_TYPE_PERCENTAGE = 1, -}; - -// Enum for ContentLaunchParameterEnum -enum EmberAfContentLaunchParameterEnum : uint8_t -{ - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_ACTOR = 0, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_CHANNEL = 1, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_CHARACTER = 2, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_EVENT = 3, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_FRANCHISE = 4, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_GENRE = 5, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_LEAGUE = 6, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_POPULARITY = 7, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_SPORT = 8, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_SPORTS_TEAM = 9, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_VIDEO = 10, -}; - // Enum for ContentLaunchStatus enum EmberAfContentLaunchStatus : uint8_t { @@ -352,28 +146,6 @@ enum EmberAfContentLaunchStreamingType : uint8_t EMBER_ZCL_CONTENT_LAUNCH_STREAMING_TYPE_HLS = 1, }; -// Enum for DataQualityId -enum EmberAfDataQualityId : uint16_t -{ - EMBER_ZCL_DATA_QUALITY_ID_ALL_DATA_CERTIFIED = 0, - EMBER_ZCL_DATA_QUALITY_ID_ONLY_INSTANTANEOUS_POWER_NOT_CERTIFIED = 1, - EMBER_ZCL_DATA_QUALITY_ID_ONLY_CUMULATED_CONSUMPTION_NOT_CERTIFIED = 2, - EMBER_ZCL_DATA_QUALITY_ID_NOT_CERTIFIED_DATA = 3, -}; - -// Enum for DehumidifcationLockout -enum EmberAfDehumidifcationLockout : uint8_t -{ - EMBER_ZCL_DEHUMIDIFCATION_LOCKOUT_NOT_ALLOWED = 0, - EMBER_ZCL_DEHUMIDIFCATION_LOCKOUT_ALLOWED = 1, -}; - -// Enum for DeviceStatus2Structure -enum EmberAfDeviceStatus2Structure : uint8_t -{ - EMBER_ZCL_DEVICE_STATUS2_STRUCTURE_IRIS_SYMPTOM_CODE = 32, -}; - // Enum for DoorLockEventSource enum EmberAfDoorLockEventSource : uint8_t { @@ -435,30 +207,6 @@ enum EmberAfDoorLockProgrammingEventCode : uint8_t EMBER_ZCL_DOOR_LOCK_PROGRAMMING_EVENT_CODE_ID_DELETED = 6, }; -// Enum for DoorLockSecurityLevel -enum EmberAfDoorLockSecurityLevel : uint8_t -{ - EMBER_ZCL_DOOR_LOCK_SECURITY_LEVEL_NETWORK_SECURITY = 0, - EMBER_ZCL_DOOR_LOCK_SECURITY_LEVEL_APS_SECURITY = 1, -}; - -// Enum for DoorLockSetPinOrIdStatus -enum EmberAfDoorLockSetPinOrIdStatus : uint8_t -{ - EMBER_ZCL_DOOR_LOCK_SET_PIN_OR_ID_STATUS_SUCCESS = 0, - EMBER_ZCL_DOOR_LOCK_SET_PIN_OR_ID_STATUS_GENERAL_FAILURE = 1, - EMBER_ZCL_DOOR_LOCK_SET_PIN_OR_ID_STATUS_MEMORY_FULL = 2, - EMBER_ZCL_DOOR_LOCK_SET_PIN_OR_ID_STATUS_DUPLICATE_CODE_ERROR = 3, -}; - -// Enum for DoorLockSoundVolume -enum EmberAfDoorLockSoundVolume : uint8_t -{ - EMBER_ZCL_DOOR_LOCK_SOUND_VOLUME_SILENT = 0, - EMBER_ZCL_DOOR_LOCK_SOUND_VOLUME_LOW = 1, - EMBER_ZCL_DOOR_LOCK_SOUND_VOLUME_HIGH = 2, -}; - // Enum for DoorLockState enum EmberAfDoorLockState : uint8_t { @@ -467,21 +215,6 @@ enum EmberAfDoorLockState : uint8_t EMBER_ZCL_DOOR_LOCK_STATE_UNLOCKED = 2, }; -// Enum for DoorLockType -enum EmberAfDoorLockType : uint8_t -{ - EMBER_ZCL_DOOR_LOCK_TYPE_DEAD_BOLT = 0, - EMBER_ZCL_DOOR_LOCK_TYPE_MAGNETIC = 1, - EMBER_ZCL_DOOR_LOCK_TYPE_MORTISE = 2, - EMBER_ZCL_DOOR_LOCK_TYPE_RIM = 3, - EMBER_ZCL_DOOR_LOCK_TYPE_LATCH_BOLT = 4, - EMBER_ZCL_DOOR_LOCK_TYPE_CYLINDRICAL = 5, - EMBER_ZCL_DOOR_LOCK_TYPE_TUBULAR = 6, - EMBER_ZCL_DOOR_LOCK_TYPE_INTERCONNECTED = 7, - EMBER_ZCL_DOOR_LOCK_TYPE_DEAD_LATCH = 8, - EMBER_ZCL_DOOR_LOCK_TYPE_OTHER = 9, -}; - // Enum for DoorLockUserStatus enum EmberAfDoorLockUserStatus : uint8_t { @@ -512,14 +245,6 @@ enum EmberAfDoorState : uint8_t EMBER_ZCL_DOOR_STATE_ERROR_UNSPECIFIED = 4, }; -// Enum for EndpointListTypeEnum -enum EmberAfEndpointListTypeEnum : uint8_t -{ - EMBER_ZCL_ENDPOINT_LIST_TYPE_ENUM_OTHER = 0, - EMBER_ZCL_ENDPOINT_LIST_TYPE_ENUM_ROOM = 1, - EMBER_ZCL_ENDPOINT_LIST_TYPE_ENUM_ZONE = 2, -}; - // Enum for EnhancedColorMode enum EmberAfEnhancedColorMode : uint8_t { @@ -529,171 +254,6 @@ enum EmberAfEnhancedColorMode : uint8_t EMBER_ZCL_ENHANCED_COLOR_MODE_ENHANCED_CURRENT_HUE_AND_CURRENT_SATURATION = 3, }; -// Enum for EventId -enum EmberAfEventId : uint8_t -{ - EMBER_ZCL_EVENT_ID_METER_COVER_REMOVED = 0, - EMBER_ZCL_EVENT_ID_METER_COVER_CLOSED = 1, - EMBER_ZCL_EVENT_ID_STRONG_MAGNETIC_FIELD = 2, - EMBER_ZCL_EVENT_ID_NO_STRONG_MAGNETIC_FIELD = 3, - EMBER_ZCL_EVENT_ID_BATTERY_FAILURE = 4, - EMBER_ZCL_EVENT_ID_LOW_BATTERY = 5, - EMBER_ZCL_EVENT_ID_PROGRAM_MEMORY_ERROR = 6, - EMBER_ZCL_EVENT_ID_RAM_ERROR = 7, - EMBER_ZCL_EVENT_ID_NV_MEMORY_ERROR = 8, - EMBER_ZCL_EVENT_ID_MEASUREMENT_SYSTEM_ERROR = 9, - EMBER_ZCL_EVENT_ID_WATCHDOG_ERROR = 10, - EMBER_ZCL_EVENT_ID_SUPPLY_DISCONNECT_FAILURE = 11, - EMBER_ZCL_EVENT_ID_SUPPLY_CONNECT_FAILURE = 12, - EMBER_ZCL_EVENT_ID_MEASURMENT_SOFTWARE_CHANGED = 13, - EMBER_ZCL_EVENT_ID_DST_ENABLED = 14, - EMBER_ZCL_EVENT_ID_DST_DISABLED = 15, - EMBER_ZCL_EVENT_ID_CLOCK_ADJ_BACKWARD = 16, - EMBER_ZCL_EVENT_ID_CLOCK_ADJ_FORWARD = 17, - EMBER_ZCL_EVENT_ID_CLOCK_INVALID = 18, - EMBER_ZCL_EVENT_ID_COMMS_ERROR_HAN = 19, - EMBER_ZCL_EVENT_ID_COMMS_OK_HAN = 20, - EMBER_ZCL_EVENT_ID_FRAUD_ATTEMPT = 21, - EMBER_ZCL_EVENT_ID_POWER_LOSS = 22, - EMBER_ZCL_EVENT_ID_INCORRECT_PROTOCOL = 23, - EMBER_ZCL_EVENT_ID_UNUSUAL_HAN_TRAFFIC = 24, - EMBER_ZCL_EVENT_ID_UNEXPECTED_CLOCK_CHANGE = 25, - EMBER_ZCL_EVENT_ID_COMMS_USING_UNAUTHENTICATED_COMPONENT = 26, - EMBER_ZCL_EVENT_ID_ERROR_REG_CLEAR = 27, - EMBER_ZCL_EVENT_ID_ALARM_REG_CLEAR = 28, - EMBER_ZCL_EVENT_ID_UNEXPECTED_HW_RESET = 29, - EMBER_ZCL_EVENT_ID_UNEXPECTED_PROGRAM_EXECUTION = 30, - EMBER_ZCL_EVENT_ID_EVENT_LOG_CLEARED = 31, - EMBER_ZCL_EVENT_ID_MANUAL_DISCONNECT = 32, - EMBER_ZCL_EVENT_ID_MANUAL_CONNECT = 33, - EMBER_ZCL_EVENT_ID_REMOTE_DISCONNECTION = 34, - EMBER_ZCL_EVENT_ID_LOCAL_DISCONNECTION = 35, - EMBER_ZCL_EVENT_ID_LIMIT_THRESHOLD_EXCEEDED = 36, - EMBER_ZCL_EVENT_ID_LIMIT_THRESHOLD_OK = 37, - EMBER_ZCL_EVENT_ID_LIMIT_THRESHOLD_CHANGED = 38, - EMBER_ZCL_EVENT_ID_MAXIMUM_DEMAND_EXCEEDED = 39, - EMBER_ZCL_EVENT_ID_PROFILE_CLEARED = 40, - EMBER_ZCL_EVENT_ID_FIRMWARE_READY_FOR_ACTIVATION = 41, - EMBER_ZCL_EVENT_ID_FIRMWARE_ACTIVATED = 42, - EMBER_ZCL_EVENT_ID_PATCH_FAILURE = 43, - EMBER_ZCL_EVENT_ID_TOU_TARIFF_ACTIVATION = 44, - EMBER_ZCL_EVENT_ID_8X8_TARIFFACTIVATED = 45, - EMBER_ZCL_EVENT_ID_SINGLE_TARIFF_RATE_ACTIVATED = 46, - EMBER_ZCL_EVENT_ID_ASYNCHRONOUS_BILLING_OCCURRED = 47, - EMBER_ZCL_EVENT_ID_SYNCHRONOUS_BILLING_OCCURRED = 48, - EMBER_ZCL_EVENT_ID_INCORRECT_POLARITY = 128, - EMBER_ZCL_EVENT_ID_CURRENT_NO_VOLTAGE = 129, - EMBER_ZCL_EVENT_ID_UNDER_VOLTAGE = 130, - EMBER_ZCL_EVENT_ID_OVER_VOLTAGE = 131, - EMBER_ZCL_EVENT_ID_NORMAL_VOLTAGE = 132, - EMBER_ZCL_EVENT_ID_PF_BELOW_THRESHOLD = 133, - EMBER_ZCL_EVENT_ID_PF_ABOVE_THRESHOLD = 134, - EMBER_ZCL_EVENT_ID_TERMINAL_COVER_REMOVED = 135, - EMBER_ZCL_EVENT_ID_TERMINAL_COVER_CLOSED = 136, - EMBER_ZCL_EVENT_ID_REVERSE_FLOW = 160, - EMBER_ZCL_EVENT_ID_TILT_TAMPER = 161, - EMBER_ZCL_EVENT_ID_BATTERY_COVER_REMOVED = 162, - EMBER_ZCL_EVENT_ID_BATTERY_COVER_CLOSED = 163, - EMBER_ZCL_EVENT_ID_EXCESS_FLOW = 164, - EMBER_ZCL_EVENT_ID_CREDIT_OK = 192, - EMBER_ZCL_EVENT_ID_LOW_CREDIT = 193, - EMBER_ZCL_EVENT_ID_EMERGENCY_CREDIT_IN_USE = 192, - EMBER_ZCL_EVENT_ID_EMERGENCY_CREDIT_EXHAUSTED = 193, - EMBER_ZCL_EVENT_ID_ZERO_CREDIT_EC_NOT_SELECTED = 194, - EMBER_ZCL_EVENT_ID_SUPPLY_ON = 195, - EMBER_ZCL_EVENT_ID_SUPPLY_OFF_AARMED = 196, - EMBER_ZCL_EVENT_ID_SUPPLY_OFF = 197, - EMBER_ZCL_EVENT_ID_DISCOUNT_APPLIED = 198, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_A = 224, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_B = 225, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_C = 226, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_D = 227, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_E = 228, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_F = 229, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_G = 230, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_H = 231, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_I = 232, -}; - -// Enum for EventIdentification -enum EmberAfEventIdentification : uint8_t -{ - EMBER_ZCL_EVENT_IDENTIFICATION_END_OF_CYCLE = 1, - EMBER_ZCL_EVENT_IDENTIFICATION_TEMPERATURE_REACHED = 4, - EMBER_ZCL_EVENT_IDENTIFICATION_END_OF_COOKING = 5, - EMBER_ZCL_EVENT_IDENTIFICATION_SWITCHING_OFF = 6, - EMBER_ZCL_EVENT_IDENTIFICATION_WRONG_DATA = 7, -}; - -// Enum for FanMode -enum EmberAfFanMode : uint8_t -{ - EMBER_ZCL_FAN_MODE_OFF = 0, - EMBER_ZCL_FAN_MODE_LOW = 1, - EMBER_ZCL_FAN_MODE_MEDIUM = 2, - EMBER_ZCL_FAN_MODE_HIGH = 3, - EMBER_ZCL_FAN_MODE_ON = 4, - EMBER_ZCL_FAN_MODE_AUTO = 5, - EMBER_ZCL_FAN_MODE_SMART = 6, -}; - -// Enum for FanModeSequence -enum EmberAfFanModeSequence : uint8_t -{ - EMBER_ZCL_FAN_MODE_SEQUENCE_LOW_MED_HIGH = 0, - EMBER_ZCL_FAN_MODE_SEQUENCE_LOW_HIGH = 1, - EMBER_ZCL_FAN_MODE_SEQUENCE_LOW_MED_HIGH_AUTO = 2, - EMBER_ZCL_FAN_MODE_SEQUENCE_LOW_HIGH_AUTO = 3, - EMBER_ZCL_FAN_MODE_SEQUENCE_ON_AUTO = 4, -}; - -// Enum for GeneralCommissioningError -enum EmberAfGeneralCommissioningError : uint8_t -{ - EMBER_ZCL_GENERAL_COMMISSIONING_ERROR_OK = 0, - EMBER_ZCL_GENERAL_COMMISSIONING_ERROR_VALUE_OUTSIDE_RANGE = 1, - EMBER_ZCL_GENERAL_COMMISSIONING_ERROR_INVALID_AUTHENTICATION = 2, -}; - -// Enum for GenericDeviceClass -enum EmberAfGenericDeviceClass : uint8_t -{ - EMBER_ZCL_GENERIC_DEVICE_CLASS_LIGHTING = 0, -}; - -// Enum for GenericDeviceType -enum EmberAfGenericDeviceType : uint8_t -{ - EMBER_ZCL_GENERIC_DEVICE_TYPE_INCANDESCENT = 0, - EMBER_ZCL_GENERIC_DEVICE_TYPE_SPOTLIGHT_HALOGEN = 1, - EMBER_ZCL_GENERIC_DEVICE_TYPE_HALOGEN_BULB = 2, - EMBER_ZCL_GENERIC_DEVICE_TYPE_CFL = 3, - EMBER_ZCL_GENERIC_DEVICE_TYPE_LINEAR_FLOURESCENT = 4, - EMBER_ZCL_GENERIC_DEVICE_TYPE_LED_BULB = 5, - EMBER_ZCL_GENERIC_DEVICE_TYPE_SPOTLIGHT_LED = 6, - EMBER_ZCL_GENERIC_DEVICE_TYPE_LED_STRIP = 7, - EMBER_ZCL_GENERIC_DEVICE_TYPE_LED_TUBE = 8, - EMBER_ZCL_GENERIC_DEVICE_TYPE_GENERIC_INDOOR_FIXTURE = 9, - EMBER_ZCL_GENERIC_DEVICE_TYPE_GENERIC_OUTDOOR_FIXTURE = 10, - EMBER_ZCL_GENERIC_DEVICE_TYPE_PENDANT_FIXTURE = 11, - EMBER_ZCL_GENERIC_DEVICE_TYPE_FLOOR_STANDING_FIXTURE = 12, - EMBER_ZCL_GENERIC_DEVICE_TYPE_GENERIC_CONTROLLER = 224, - EMBER_ZCL_GENERIC_DEVICE_TYPE_WALL_SWITCH = 225, - EMBER_ZCL_GENERIC_DEVICE_TYPE_PORTABLE_REMOTE_CONTROLLER = 226, - EMBER_ZCL_GENERIC_DEVICE_TYPE_MOTION_OR_LIGHT_SENSOR = 227, - EMBER_ZCL_GENERIC_DEVICE_TYPE_GENERIC_ACTUATOR = 240, - EMBER_ZCL_GENERIC_DEVICE_TYPE_PLUGIN_UNIT = 241, - EMBER_ZCL_GENERIC_DEVICE_TYPE_RETROFIT_ACTUATOR = 242, - EMBER_ZCL_GENERIC_DEVICE_TYPE_UNSPECIFIED = 255, -}; - -// Enum for GroupKeySecurityPolicy -enum EmberAfGroupKeySecurityPolicy : uint8_t -{ - EMBER_ZCL_GROUP_KEY_SECURITY_POLICY_STANDARD = 0, - EMBER_ZCL_GROUP_KEY_SECURITY_POLICY_LOW_LATENCY = 1, -}; - // Enum for HardwareFaultType enum EmberAfHardwareFaultType : uint8_t { @@ -734,73 +294,6 @@ enum EmberAfHueStepMode : uint8_t EMBER_ZCL_HUE_STEP_MODE_DOWN = 3, }; -// Enum for IasAceAlarmStatus -enum EmberAfIasAceAlarmStatus : uint8_t -{ - EMBER_ZCL_IAS_ACE_ALARM_STATUS_NO_ALARM = 0, - EMBER_ZCL_IAS_ACE_ALARM_STATUS_BURGLAR = 1, - EMBER_ZCL_IAS_ACE_ALARM_STATUS_FIRE = 2, - EMBER_ZCL_IAS_ACE_ALARM_STATUS_EMERGENCY = 3, - EMBER_ZCL_IAS_ACE_ALARM_STATUS_POLICE_PANIC = 4, - EMBER_ZCL_IAS_ACE_ALARM_STATUS_FIRE_PANIC = 5, - EMBER_ZCL_IAS_ACE_ALARM_STATUS_EMERGENCY_PANIC = 6, -}; - -// Enum for IasAceArmMode -enum EmberAfIasAceArmMode : uint8_t -{ - EMBER_ZCL_IAS_ACE_ARM_MODE_DISARM = 0, - EMBER_ZCL_IAS_ACE_ARM_MODE_ARM_DAY_HOME_ZONES_ONLY = 1, - EMBER_ZCL_IAS_ACE_ARM_MODE_ARM_NIGHT_SLEEP_ZONES_ONLY = 2, - EMBER_ZCL_IAS_ACE_ARM_MODE_ARM_ALL_ZONES = 3, -}; - -// Enum for IasAceArmNotification -enum EmberAfIasAceArmNotification : uint8_t -{ - EMBER_ZCL_IAS_ACE_ARM_NOTIFICATION_ALL_ZONES_DISARMED = 0, - EMBER_ZCL_IAS_ACE_ARM_NOTIFICATION_ONLY_DAY_HOME_ZONES_ARMED = 1, - EMBER_ZCL_IAS_ACE_ARM_NOTIFICATION_ONLY_NIGHT_SLEEP_ZONES_ARMED = 2, - EMBER_ZCL_IAS_ACE_ARM_NOTIFICATION_ALL_ZONES_ARMED = 3, - EMBER_ZCL_IAS_ACE_ARM_NOTIFICATION_INVALID_ARM_DISARM_CODE = 4, - EMBER_ZCL_IAS_ACE_ARM_NOTIFICATION_NOT_READY_TO_ARM = 5, - EMBER_ZCL_IAS_ACE_ARM_NOTIFICATION_ALREADY_DISARMED = 6, -}; - -// Enum for IasAceAudibleNotification -enum EmberAfIasAceAudibleNotification : uint8_t -{ - EMBER_ZCL_IAS_ACE_AUDIBLE_NOTIFICATION_MUTE = 0, - EMBER_ZCL_IAS_ACE_AUDIBLE_NOTIFICATION_DEFAULT_SOUND = 1, -}; - -// Enum for IasAceBypassResult -enum EmberAfIasAceBypassResult : uint8_t -{ - EMBER_ZCL_IAS_ACE_BYPASS_RESULT_ZONE_BYPASSED = 0, - EMBER_ZCL_IAS_ACE_BYPASS_RESULT_ZONE_NOT_BYPASSED = 1, - EMBER_ZCL_IAS_ACE_BYPASS_RESULT_NOT_ALLOWED = 2, - EMBER_ZCL_IAS_ACE_BYPASS_RESULT_INVALID_ZONE_ID = 3, - EMBER_ZCL_IAS_ACE_BYPASS_RESULT_UNKNOWN_ZONE_ID = 4, - EMBER_ZCL_IAS_ACE_BYPASS_RESULT_INVALID_ARM_DISARM_CODE = 5, -}; - -// Enum for IasAcePanelStatus -enum EmberAfIasAcePanelStatus : uint8_t -{ - EMBER_ZCL_IAS_ACE_PANEL_STATUS_PANEL_DISARMED = 0, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_ARMED_STAY = 1, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_ARMED_NIGHT = 2, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_ARMED_AWAY = 3, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_EXIT_DELAY = 4, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_ENTRY_DELAY = 5, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_NOT_READY_TO_ARM = 6, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_IN_ALARM = 7, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_ARMING_STAY = 8, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_ARMING_NIGHT = 9, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_ARMING_AWAY = 10, -}; - // Enum for IasEnrollResponseCode enum EmberAfIasEnrollResponseCode : uint8_t { @@ -993,46 +486,6 @@ enum EmberAfLevelControlOptions : uint8_t EMBER_ZCL_LEVEL_CONTROL_OPTIONS_COUPLE_COLOR_TEMP_TO_LEVEL = 2, }; -// Enum for LevelStatus -enum EmberAfLevelStatus : uint8_t -{ - EMBER_ZCL_LEVEL_STATUS_ON_TARGET = 0, - EMBER_ZCL_LEVEL_STATUS_BELOW_TARGET = 1, - EMBER_ZCL_LEVEL_STATUS_ABOVE_TARGET = 2, -}; - -// Enum for LightSensorType -enum EmberAfLightSensorType : uint8_t -{ - EMBER_ZCL_LIGHT_SENSOR_TYPE_PHOTODIODE = 0, - EMBER_ZCL_LIGHT_SENSOR_TYPE_CMOS = 1, -}; - -// Enum for LogsIntent -enum EmberAfLogsIntent : uint8_t -{ - EMBER_ZCL_LOGS_INTENT_END_USER_SUPPORT = 0, - EMBER_ZCL_LOGS_INTENT_NETWORK_DIAG = 1, - EMBER_ZCL_LOGS_INTENT_CRASH_LOGS = 2, -}; - -// Enum for LogsStatus -enum EmberAfLogsStatus : uint8_t -{ - EMBER_ZCL_LOGS_STATUS_SUCCESS = 0, - EMBER_ZCL_LOGS_STATUS_EXHAUSTED = 1, - EMBER_ZCL_LOGS_STATUS_NO_LOGS = 2, - EMBER_ZCL_LOGS_STATUS_BUSY = 3, - EMBER_ZCL_LOGS_STATUS_DENIED = 4, -}; - -// Enum for LogsTransferProtocol -enum EmberAfLogsTransferProtocol : uint8_t -{ - EMBER_ZCL_LOGS_TRANSFER_PROTOCOL_RESPONSE_PAYLOAD = 0, - EMBER_ZCL_LOGS_TRANSFER_PROTOCOL_BDX = 1, -}; - // Enum for MediaInputType enum EmberAfMediaInputType : uint8_t { @@ -1070,50 +523,6 @@ enum EmberAfMediaPlaybackStatus : uint8_t EMBER_ZCL_MEDIA_PLAYBACK_STATUS_SEEK_OUT_OF_RANGE = 5, }; -// Enum for MessagingControlConfirmation -enum EmberAfMessagingControlConfirmation : uint8_t -{ - EMBER_ZCL_MESSAGING_CONTROL_CONFIRMATION_NOT_REQUIRED = 0, - EMBER_ZCL_MESSAGING_CONTROL_CONFIRMATION_REQUIRED = 128, -}; - -// Enum for MessagingControlEnhancedConfirmation -enum EmberAfMessagingControlEnhancedConfirmation : uint8_t -{ - EMBER_ZCL_MESSAGING_CONTROL_ENHANCED_CONFIRMATION_NOT_REQUIRED = 0, - EMBER_ZCL_MESSAGING_CONTROL_ENHANCED_CONFIRMATION_REQUIRED = 32, -}; - -// Enum for MessagingControlImportance -enum EmberAfMessagingControlImportance : uint8_t -{ - EMBER_ZCL_MESSAGING_CONTROL_IMPORTANCE_LOW = 0, - EMBER_ZCL_MESSAGING_CONTROL_IMPORTANCE_MEDIUM = 4, - EMBER_ZCL_MESSAGING_CONTROL_IMPORTANCE_HIGH = 8, - EMBER_ZCL_MESSAGING_CONTROL_IMPORTANCE_CRITICAL = 12, -}; - -// Enum for MessagingControlTransmission -enum EmberAfMessagingControlTransmission : uint8_t -{ - EMBER_ZCL_MESSAGING_CONTROL_TRANSMISSION_NORMAL = 0, - EMBER_ZCL_MESSAGING_CONTROL_TRANSMISSION_NORMAL_AND_ANONYMOUS = 1, - EMBER_ZCL_MESSAGING_CONTROL_TRANSMISSION_ANONYMOUS = 2, - EMBER_ZCL_MESSAGING_CONTROL_TRANSMISSION_RESERVED = 3, -}; - -// Enum for MeterTypeId -enum EmberAfMeterTypeId : uint16_t -{ - EMBER_ZCL_METER_TYPE_ID_UTILITY_PRIMARY_METER = 0, - EMBER_ZCL_METER_TYPE_ID_UTILITY_PRODUCTION_METER = 1, - EMBER_ZCL_METER_TYPE_ID_UTILITY_SECONDARY_METER = 2, - EMBER_ZCL_METER_TYPE_ID_PRIVATE_PRIMARY_METER = 256, - EMBER_ZCL_METER_TYPE_ID_PRIVATE_PRODUCTION_METER = 257, - EMBER_ZCL_METER_TYPE_ID_PRIVATE_SECONDARY_METERS = 258, - EMBER_ZCL_METER_TYPE_ID_GENERIC_METER = 272, -}; - // Enum for MoveMode enum EmberAfMoveMode : uint8_t { @@ -1121,14 +530,6 @@ enum EmberAfMoveMode : uint8_t EMBER_ZCL_MOVE_MODE_DOWN = 1, }; -// Enum for NavigateTargetStatus -enum EmberAfNavigateTargetStatus : uint8_t -{ - EMBER_ZCL_NAVIGATE_TARGET_STATUS_SUCCESS = 0, - EMBER_ZCL_NAVIGATE_TARGET_STATUS_APP_NOT_AVAILABLE = 1, - EMBER_ZCL_NAVIGATE_TARGET_STATUS_SYSTEM_BUSY = 2, -}; - // Enum for NetworkCommissioningError enum EmberAfNetworkCommissioningError : uint8_t { @@ -1154,15 +555,6 @@ enum EmberAfNetworkCommissioningError : uint8_t EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, }; -// Enum for NetworkFault -enum EmberAfNetworkFault : uint8_t -{ - EMBER_ZCL_NETWORK_FAULT_UNSPECIFIED = 0, - EMBER_ZCL_NETWORK_FAULT_LINK_DOWN = 1, - EMBER_ZCL_NETWORK_FAULT_HARDWARE_FAILURE = 2, - EMBER_ZCL_NETWORK_FAULT_NETWORK_JAMMED = 3, -}; - // Enum for NetworkFaultType enum EmberAfNetworkFaultType : uint8_t { @@ -1220,15 +612,6 @@ enum EmberAfOTAQueryStatus : uint8_t EMBER_ZCL_OTA_QUERY_STATUS_NOT_AVAILABLE = 2, }; -// Enum for OccupancySensorType -enum EmberAfOccupancySensorType : uint8_t -{ - EMBER_ZCL_OCCUPANCY_SENSOR_TYPE_PIR = 0, - EMBER_ZCL_OCCUPANCY_SENSOR_TYPE_ULTRASONIC = 1, - EMBER_ZCL_OCCUPANCY_SENSOR_TYPE_PIR_AND_ULTRASONIC = 2, - EMBER_ZCL_OCCUPANCY_SENSOR_TYPE_PHYSICAL_CONTACT = 3, -}; - // Enum for OnOffDelayedAllOffEffectVariant enum EmberAfOnOffDelayedAllOffEffectVariant : uint8_t { @@ -1250,13 +633,6 @@ enum EmberAfOnOffEffectIdentifier : uint8_t EMBER_ZCL_ON_OFF_EFFECT_IDENTIFIER_DYING_LIGHT = 1, }; -// Enum for OperatingMode -enum EmberAfOperatingMode : uint8_t -{ - EMBER_ZCL_OPERATING_MODE_NORMAL = 0, - EMBER_ZCL_OPERATING_MODE_CONFIGURE = 1, -}; - // Enum for PHYRateType enum EmberAfPHYRateType : uint8_t { @@ -1272,96 +648,6 @@ enum EmberAfPHYRateType : uint8_t EMBER_ZCL_PHY_RATE_TYPE_400_G = 9, }; -// Enum for PhysicalEnvironment -enum EmberAfPhysicalEnvironment : uint8_t -{ - EMBER_ZCL_PHYSICAL_ENVIRONMENT_UNSPECIFIED = 0, - EMBER_ZCL_PHYSICAL_ENVIRONMENT_FIRST_PROFILE_SPECIFIED_VALUE = 1, - EMBER_ZCL_PHYSICAL_ENVIRONMENT_LAST_PROFILE_SPECIFIED_VALUE = 127, - EMBER_ZCL_PHYSICAL_ENVIRONMENT_UNKNOWN = 255, -}; - -// Enum for PowerProfileState -enum EmberAfPowerProfileState : uint8_t -{ - EMBER_ZCL_POWER_PROFILE_STATE_POWER_PROFILE_WAITING_TO_START = 1, - EMBER_ZCL_POWER_PROFILE_STATE_POWER_PROFILE_STARTED = 2, - EMBER_ZCL_POWER_PROFILE_STATE_ENERGY_PHASE_RUNNING = 3, - EMBER_ZCL_POWER_PROFILE_STATE_ENERGY_PHASE_ENDED = 4, - EMBER_ZCL_POWER_PROFILE_STATE_ENERGY_PHASE_WAITING_TO_START = 5, - EMBER_ZCL_POWER_PROFILE_STATE_ENERGY_PHASE_STARTED = 6, - EMBER_ZCL_POWER_PROFILE_STATE_POWER_PROFILE_ENDED = 7, - EMBER_ZCL_POWER_PROFILE_STATE_PROFILE_READY_FOR_SCHEDULING = 8, - EMBER_ZCL_POWER_PROFILE_STATE_POWER_PROFILE_SCHEDULED = 9, -}; - -// Enum for PowerSource -enum EmberAfPowerSource : uint8_t -{ - EMBER_ZCL_POWER_SOURCE_UNKNOWN = 0, - EMBER_ZCL_POWER_SOURCE_SINGLE_PHASE_MAINS = 1, - EMBER_ZCL_POWER_SOURCE_THREE_PHASE_MAINS = 2, - EMBER_ZCL_POWER_SOURCE_BATTERY = 3, - EMBER_ZCL_POWER_SOURCE_DC_SOURCE = 4, - EMBER_ZCL_POWER_SOURCE_EMERGENCY_MAINS_CONSTANT_POWER = 5, - EMBER_ZCL_POWER_SOURCE_EMERGENCY_MAINS_TRANSFER_SWITCH = 6, - EMBER_ZCL_POWER_SOURCE_BATTERY_BACKUP = 128, -}; - -// Enum for PowerSourceStatus -enum EmberAfPowerSourceStatus : uint8_t -{ - EMBER_ZCL_POWER_SOURCE_STATUS_UNSPECFIED = 0, - EMBER_ZCL_POWER_SOURCE_STATUS_ACTIVE = 1, - EMBER_ZCL_POWER_SOURCE_STATUS_STANDBY = 2, - EMBER_ZCL_POWER_SOURCE_STATUS_UNAVAILABLE = 3, -}; - -// Enum for ProductCode -enum EmberAfProductCode : uint8_t -{ - EMBER_ZCL_PRODUCT_CODE_MANUFACTURER_DEFINED = 0, - EMBER_ZCL_PRODUCT_CODE_ITERNATIONAL_ARTICLE_NUMBER = 1, - EMBER_ZCL_PRODUCT_CODE_GLOBAL_TRADE_ITEM_NUMBER = 2, - EMBER_ZCL_PRODUCT_CODE_UNIVERSAL_PRODUCT_CODE = 3, - EMBER_ZCL_PRODUCT_CODE_STOCK_KEEPING_UNIT = 4, -}; - -// Enum for ProductTypeId -enum EmberAfProductTypeId : uint16_t -{ - EMBER_ZCL_PRODUCT_TYPE_ID_WHITE_GOODS = 0, - EMBER_ZCL_PRODUCT_TYPE_ID_DISHWASHER = 22017, - EMBER_ZCL_PRODUCT_TYPE_ID_TUMBLE_DRYER = 22018, - EMBER_ZCL_PRODUCT_TYPE_ID_WASHER_DRYER = 22019, - EMBER_ZCL_PRODUCT_TYPE_ID_WASHING_MACHINE = 22020, - EMBER_ZCL_PRODUCT_TYPE_ID_HOBS = 24067, - EMBER_ZCL_PRODUCT_TYPE_ID_INDUCTION_HOBS = 24073, - EMBER_ZCL_PRODUCT_TYPE_ID_OVEN = 24065, - EMBER_ZCL_PRODUCT_TYPE_ID_ELECTRICAL_OVEN = 24070, - EMBER_ZCL_PRODUCT_TYPE_ID_REFRIGERATOR_FREEZER = 26113, -}; - -// Enum for PumpControlMode -enum EmberAfPumpControlMode : uint8_t -{ - EMBER_ZCL_PUMP_CONTROL_MODE_CONSTANT_SPEED = 0, - EMBER_ZCL_PUMP_CONTROL_MODE_CONSTANT_PRESSURE = 1, - EMBER_ZCL_PUMP_CONTROL_MODE_PROPORTIONAL_PRESSURE = 2, - EMBER_ZCL_PUMP_CONTROL_MODE_CONSTANT_FLOW = 3, - EMBER_ZCL_PUMP_CONTROL_MODE_CONSTANT_TEMPERATURE = 5, - EMBER_ZCL_PUMP_CONTROL_MODE_AUTOMATIC = 7, -}; - -// Enum for PumpOperationMode -enum EmberAfPumpOperationMode : uint8_t -{ - EMBER_ZCL_PUMP_OPERATION_MODE_NORMAL = 0, - EMBER_ZCL_PUMP_OPERATION_MODE_MINIMUM = 1, - EMBER_ZCL_PUMP_OPERATION_MODE_MAXIMUM = 2, - EMBER_ZCL_PUMP_OPERATION_MODE_LOCAL = 3, -}; - // Enum for RadioFaultType enum EmberAfRadioFaultType : uint8_t { @@ -1382,29 +668,6 @@ enum EmberAfRegulatoryLocationType : uint8_t EMBER_ZCL_REGULATORY_LOCATION_TYPE_INDOOR_OUTDOOR = 2, }; -// Enum for RelativeHumidityDisplay -enum EmberAfRelativeHumidityDisplay : uint8_t -{ - EMBER_ZCL_RELATIVE_HUMIDITY_DISPLAY_NOT_DISPLAYED = 0, - EMBER_ZCL_RELATIVE_HUMIDITY_DISPLAY_DISPLAYED = 1, -}; - -// Enum for RelativeHumidityMode -enum EmberAfRelativeHumidityMode : uint8_t -{ - EMBER_ZCL_RELATIVE_HUMIDITY_MODE_MEASURE_LOCALLY = 0, - EMBER_ZCL_RELATIVE_HUMIDITY_MODE_UPDATED_OVER_THE_NETWORK = 1, -}; - -// Enum for RemoteEnableFlags -enum EmberAfRemoteEnableFlags : uint8_t -{ - EMBER_ZCL_REMOTE_ENABLE_FLAGS_DISABLED = 0, - EMBER_ZCL_REMOTE_ENABLE_FLAGS_TEMPORARILY_LOCKED_DISABLED = 7, - EMBER_ZCL_REMOTE_ENABLE_FLAGS_ENABLED_REMOTE_CONTROL = 15, - EMBER_ZCL_REMOTE_ENABLE_FLAGS_ENABLED_REMOTE_AND_ENERGY_CONTROL = 1, -}; - // Enum for RoutingRole enum EmberAfRoutingRole : uint8_t { @@ -1460,41 +723,6 @@ enum EmberAfSimpleEnum : uint8_t EMBER_ZCL_SIMPLE_ENUM_VALUE_C = 3, }; -// Enum for SquawkLevel -enum EmberAfSquawkLevel : uint8_t -{ - EMBER_ZCL_SQUAWK_LEVEL_LOW_LEVEL = 0, - EMBER_ZCL_SQUAWK_LEVEL_MEDIUM_LEVEL = 1, - EMBER_ZCL_SQUAWK_LEVEL_HIGH_LEVEL = 2, - EMBER_ZCL_SQUAWK_LEVEL_VERY_HIGH_LEVEL = 2, -}; - -// Enum for SquawkMode -enum EmberAfSquawkMode : uint8_t -{ - EMBER_ZCL_SQUAWK_MODE_SYSTEM_IS_ARMED = 0, - EMBER_ZCL_SQUAWK_MODE_SYSTEM_IS_DISARMED = 1, -}; - -// Enum for SquawkStobe -enum EmberAfSquawkStobe : uint8_t -{ - EMBER_ZCL_SQUAWK_STOBE_NO_STROBE = 0, - EMBER_ZCL_SQUAWK_STOBE_USE_STROBE = 1, -}; - -// Enum for StartOfWeek -enum EmberAfStartOfWeek : uint8_t -{ - EMBER_ZCL_START_OF_WEEK_SUNDAY = 0, - EMBER_ZCL_START_OF_WEEK_MONDAY = 1, - EMBER_ZCL_START_OF_WEEK_TUESDAY = 2, - EMBER_ZCL_START_OF_WEEK_WEDNESDAY = 3, - EMBER_ZCL_START_OF_WEEK_THURSDAY = 4, - EMBER_ZCL_START_OF_WEEK_FRIDAY = 5, - EMBER_ZCL_START_OF_WEEK_SATURDAY = 6, -}; - // Enum for StartUpOnOffValue enum EmberAfStartUpOnOffValue : uint8_t { @@ -1519,22 +747,6 @@ enum EmberAfStepMode : uint8_t EMBER_ZCL_STEP_MODE_DOWN = 1, }; -// Enum for SwitchActions -enum EmberAfSwitchActions : uint8_t -{ - EMBER_ZCL_SWITCH_ACTIONS_ON = 0, - EMBER_ZCL_SWITCH_ACTIONS_OFF = 1, - EMBER_ZCL_SWITCH_ACTIONS_TOGGLE = 2, -}; - -// Enum for SwitchType -enum EmberAfSwitchType : uint8_t -{ - EMBER_ZCL_SWITCH_TYPE_TOGGLE = 0, - EMBER_ZCL_SWITCH_TYPE_MOMENTARY = 1, - EMBER_ZCL_SWITCH_TYPE_MULTI_FUNCTION = 2, -}; - // Enum for TemperatureDisplayMode enum EmberAfTemperatureDisplayMode : uint8_t { @@ -1542,13 +754,6 @@ enum EmberAfTemperatureDisplayMode : uint8_t EMBER_ZCL_TEMPERATURE_DISPLAY_MODE_FAHRENHEIT = 1, }; -// Enum for TemperatureSetpointHold -enum EmberAfTemperatureSetpointHold : uint8_t -{ - EMBER_ZCL_TEMPERATURE_SETPOINT_HOLD_SETPOINT_HOLD_OFF = 0, - EMBER_ZCL_TEMPERATURE_SETPOINT_HOLD_SETPOINT_HOLD_ON = 1, -}; - // Enum for ThermostatControlSequence enum EmberAfThermostatControlSequence : uint8_t { @@ -1580,33 +785,6 @@ enum EmberAfThermostatSystemMode : uint8_t EMBER_ZCL_THERMOSTAT_SYSTEM_MODE_FAN_ONLY = 7, }; -// Enum for ThreadConnectionStatus -enum EmberAfThreadConnectionStatus : uint8_t -{ - EMBER_ZCL_THREAD_CONNECTION_STATUS_CONNECTED = 0, - EMBER_ZCL_THREAD_CONNECTION_STATUS_NOT_CONNECTED = 1, -}; - -// Enum for TimeEncoding -enum EmberAfTimeEncoding : uint8_t -{ - EMBER_ZCL_TIME_ENCODING_RELATIVE = 0, - EMBER_ZCL_TIME_ENCODING_ABSOLUTE = 64, -}; - -// Enum for TvChannelErrorType -enum EmberAfTvChannelErrorType : uint8_t -{ - EMBER_ZCL_TV_CHANNEL_ERROR_TYPE_MULTIPLE_MATCHES = 0, - EMBER_ZCL_TV_CHANNEL_ERROR_TYPE_NO_MATCHES = 1, -}; - -// Enum for TvChannelLineupInfoType -enum EmberAfTvChannelLineupInfoType : uint8_t -{ - EMBER_ZCL_TV_CHANNEL_LINEUP_INFO_TYPE_MSO = 0, -}; - // Enum for UpdateStateEnum enum EmberAfUpdateStateEnum : uint8_t { @@ -1621,35 +799,6 @@ enum EmberAfUpdateStateEnum : uint8_t EMBER_ZCL_UPDATE_STATE_ENUM_DELAYED_ON_USER_CONSENT = 8, }; -// Enum for WarningEvent -enum EmberAfWarningEvent : uint8_t -{ - EMBER_ZCL_WARNING_EVENT_WARNING1_OVERALL_POWER_ABOVE_AVAILABLE_POWER_LEVEL = 0, - EMBER_ZCL_WARNING_EVENT_WARNING2_OVERALL_POWER_ABOVE_POWER_THRESHOLD_LEVEL = 1, - EMBER_ZCL_WARNING_EVENT_WARNING3_OVERALL_POWER_BACK_BELOW_THE_AVAILABLE_POWER_LEVEL = 2, - EMBER_ZCL_WARNING_EVENT_WARNING4_OVERALL_POWER_BACK_BELOW_THE_POWER_THRESHOLD_LEVEL = 3, - EMBER_ZCL_WARNING_EVENT_WARNING5_OVERALL_POWER_WILL_BE_POTENTIALLY_ABOVE_AVAILABLE_POWER_LEVEL_IF_THE_APPLIANCE_STARTS = 4, -}; - -// Enum for WarningMode -enum EmberAfWarningMode : uint8_t -{ - EMBER_ZCL_WARNING_MODE_STOP = 0, - EMBER_ZCL_WARNING_MODE_BURGLAR = 1, - EMBER_ZCL_WARNING_MODE_FIRE = 2, - EMBER_ZCL_WARNING_MODE_EMERGENCY = 3, - EMBER_ZCL_WARNING_MODE_POLICE_PANIC = 4, - EMBER_ZCL_WARNING_MODE_FIRE_PANIC = 5, - EMBER_ZCL_WARNING_MODE_EMERGENCY_PANIC = 6, -}; - -// Enum for WarningStobe -enum EmberAfWarningStobe : uint8_t -{ - EMBER_ZCL_WARNING_STOBE_NO_STROBE = 0, - EMBER_ZCL_WARNING_STOBE_USE_STROBE = 1, -}; - // Enum for WcEndProductType enum EmberAfWcEndProductType : uint8_t { @@ -1696,13 +845,6 @@ enum EmberAfWcType : uint8_t EMBER_ZCL_WC_TYPE_UNKNOWN = 255, }; -// Enum for WiFiConnectionStatus -enum EmberAfWiFiConnectionStatus : uint8_t -{ - EMBER_ZCL_WI_FI_CONNECTION_STATUS_CONNECTED = 0, - EMBER_ZCL_WI_FI_CONNECTION_STATUS_NOT_CONNECTED = 1, -}; - // Enum for WiFiVersionType enum EmberAfWiFiVersionType : uint8_t { @@ -1714,21 +856,6 @@ enum EmberAfWiFiVersionType : uint8_t EMBER_ZCL_WI_FI_VERSION_TYPE_802__11AX = 5, }; -// Enum for WiredCurrentType -enum EmberAfWiredCurrentType : uint8_t -{ - EMBER_ZCL_WIRED_CURRENT_TYPE_AC = 0, - EMBER_ZCL_WIRED_CURRENT_TYPE_DC = 1, -}; - -// Enum for WiredFaultType -enum EmberAfWiredFaultType : uint8_t -{ - EMBER_ZCL_WIRED_FAULT_TYPE_UNSPECFIED = 0, - EMBER_ZCL_WIRED_FAULT_TYPE_OVER_VOLTAGE = 1, - EMBER_ZCL_WIRED_FAULT_TYPE_UNDER_VOLTAGE = 2, -}; - #define EMBER_AF_ALARM_MASK_GENERAL_HW_FAULT (1) #define EMBER_AF_ALARM_MASK_GENERAL_HW_FAULT_OFFSET (0) #define EMBER_AF_ALARM_MASK_GENERAL_SW_FAULT (2)