From 93d83d79ca9b40e94fa588e08ec6e9c9d4092004 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 22 Mar 2023 15:55:41 -0400 Subject: [PATCH] Regenerate generated code. --- .../all-clusters-app.matter | 2 +- ...tnode_extendedcolorlight_8lcaaYJVAa.matter | 2 +- .../light-switch-app.matter | 2 +- .../lighting-common/lighting-app.matter | 2 +- examples/lighting-app/qpg/zap/light.matter | 2 +- .../data_model/lighting-thread-app.matter | 2 +- .../efr32/data_model/lighting-wifi-app.matter | 2 +- .../app-templates/endpoint_config.h | 2 +- .../app-templates/endpoint_config.h | 2 +- .../data_model/controller-clusters.matter | 2 +- .../CHIPAttributeTLVValueDecoder.cpp | 2 +- .../python/chip/clusters/Objects.py | 8 +++---- .../MTRAttributeTLVValueDecoder.mm | 2 +- .../CHIP/zap-generated/MTRBaseClusters.mm | 14 +++++------ .../zap-generated/attributes/Accessors.cpp | 10 ++++---- .../zap-generated/attributes/Accessors.h | 4 ++-- .../zap-generated/cluster-enums-check.h | 15 ------------ .../app-common/zap-generated/cluster-enums.h | 14 ----------- .../zap-generated/cluster-objects.h | 15 ++++++------ .../app-common/zap-generated/enums.h | 23 ------------------- .../zap-generated/cluster/Commands.h | 5 ++-- .../cluster/logging/DataModelLogger.cpp | 2 +- .../chip-tool/zap-generated/test/Commands.h | 18 +++++++-------- .../zap-generated/test/Commands.h | 2 +- 24 files changed, 52 insertions(+), 102 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 99acb67bc867a9..333b8c157808a5 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -3221,7 +3221,7 @@ server cluster ColorControl = 768 { readonly attribute int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; + readonly attribute ColorLoopDirection colorLoopDirection = 16387; readonly attribute int16u colorLoopTime = 16388; readonly attribute int16u colorLoopStartEnhancedHue = 16389; readonly attribute int16u colorLoopStoredEnhancedHue = 16390; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 8e42c417cef86f..4cd75d40bc6744 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -1324,7 +1324,7 @@ server cluster ColorControl = 768 { readonly attribute int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; + readonly attribute ColorLoopDirection colorLoopDirection = 16387; readonly attribute int16u colorLoopTime = 16388; readonly attribute int16u colorLoopStartEnhancedHue = 16389; readonly attribute int16u colorLoopStoredEnhancedHue = 16390; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 4a92de568eadd7..7492a3b3309320 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -1675,7 +1675,7 @@ client cluster ColorControl = 768 { readonly attribute int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; + readonly attribute ColorLoopDirection colorLoopDirection = 16387; readonly attribute int16u colorLoopTime = 16388; readonly attribute int16u colorLoopStartEnhancedHue = 16389; readonly attribute int16u colorLoopStoredEnhancedHue = 16390; diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 73f3b486a12dbd..49caa98102f5b0 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1629,7 +1629,7 @@ server cluster ColorControl = 768 { readonly attribute int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; + readonly attribute ColorLoopDirection colorLoopDirection = 16387; readonly attribute int16u colorLoopTime = 16388; readonly attribute int16u colorLoopStartEnhancedHue = 16389; readonly attribute int16u colorLoopStoredEnhancedHue = 16390; diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index 27e8f79439d858..a265d6c21f6049 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -1432,7 +1432,7 @@ server cluster ColorControl = 768 { readonly attribute int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; + readonly attribute ColorLoopDirection colorLoopDirection = 16387; readonly attribute int16u colorLoopTime = 16388; readonly attribute int16u colorLoopStartEnhancedHue = 16389; readonly attribute int16u colorLoopStoredEnhancedHue = 16390; diff --git a/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter index 34ecc1a58681f0..186c74537c0eb2 100644 --- a/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter @@ -1470,7 +1470,7 @@ server cluster ColorControl = 768 { readonly attribute int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; + readonly attribute ColorLoopDirection colorLoopDirection = 16387; readonly attribute int16u colorLoopTime = 16388; readonly attribute int16u colorLoopStartEnhancedHue = 16389; readonly attribute int16u colorLoopStoredEnhancedHue = 16390; diff --git a/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.matter index 0ca16845849b6a..b4b556b4b56c91 100644 --- a/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.matter @@ -1380,7 +1380,7 @@ server cluster ColorControl = 768 { readonly attribute int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; + readonly attribute ColorLoopDirection colorLoopDirection = 16387; readonly attribute int16u colorLoopTime = 16388; readonly attribute int16u colorLoopStartEnhancedHue = 16389; readonly attribute int16u colorLoopStoredEnhancedHue = 16390; diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index befeed9758c537..84cba35daad495 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -1120,7 +1120,7 @@ { ZAP_SIMPLE_DEFAULT(0x0000), 0x00004000, 2, ZAP_TYPE(INT16U), 0 }, /* EnhancedCurrentHue */ \ { ZAP_SIMPLE_DEFAULT(0x01), 0x00004001, 1, ZAP_TYPE(ENUM8), 0 }, /* EnhancedColorMode */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00004002, 1, ZAP_TYPE(INT8U), 0 }, /* ColorLoopActive */ \ - { ZAP_SIMPLE_DEFAULT(0x00), 0x00004003, 1, ZAP_TYPE(INT8U), 0 }, /* ColorLoopDirection */ \ + { ZAP_SIMPLE_DEFAULT(0x00), 0x00004003, 1, ZAP_TYPE(ENUM8), 0 }, /* ColorLoopDirection */ \ { ZAP_SIMPLE_DEFAULT(0x0019), 0x00004004, 2, ZAP_TYPE(INT16U), 0 }, /* ColorLoopTime */ \ { ZAP_SIMPLE_DEFAULT(0x2300), 0x00004005, 2, ZAP_TYPE(INT16U), 0 }, /* ColorLoopStartEnhancedHue */ \ { ZAP_SIMPLE_DEFAULT(0x0000), 0x00004006, 2, ZAP_TYPE(INT16U), 0 }, /* ColorLoopStoredEnhancedHue */ \ diff --git a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h index 43598a42835cd6..2abed2bf5cc6bd 100644 --- a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h @@ -503,7 +503,7 @@ { ZAP_SIMPLE_DEFAULT(0x0000), 0x00004000, 2, ZAP_TYPE(INT16U), 0 }, /* EnhancedCurrentHue */ \ { ZAP_SIMPLE_DEFAULT(0x01), 0x00004001, 1, ZAP_TYPE(ENUM8), 0 }, /* EnhancedColorMode */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00004002, 1, ZAP_TYPE(INT8U), 0 }, /* ColorLoopActive */ \ - { ZAP_SIMPLE_DEFAULT(0x00), 0x00004003, 1, ZAP_TYPE(INT8U), 0 }, /* ColorLoopDirection */ \ + { ZAP_SIMPLE_DEFAULT(0x00), 0x00004003, 1, ZAP_TYPE(ENUM8), 0 }, /* ColorLoopDirection */ \ { ZAP_SIMPLE_DEFAULT(0x0019), 0x00004004, 2, ZAP_TYPE(INT16U), 0 }, /* ColorLoopTime */ \ { ZAP_SIMPLE_DEFAULT(0x2300), 0x00004005, 2, ZAP_TYPE(INT16U), 0 }, /* ColorLoopStartEnhancedHue */ \ { ZAP_SIMPLE_DEFAULT(0x0000), 0x00004006, 2, ZAP_TYPE(INT16U), 0 }, /* ColorLoopStoredEnhancedHue */ \ diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 69c0d930e81436..a001ea2df61251 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3439,7 +3439,7 @@ client cluster ColorControl = 768 { readonly attribute int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; readonly attribute int8u colorLoopActive = 16386; - readonly attribute int8u colorLoopDirection = 16387; + readonly attribute ColorLoopDirection colorLoopDirection = 16387; readonly attribute int16u colorLoopTime = 16388; readonly attribute int16u colorLoopStartEnhancedHue = 16389; readonly attribute int16u colorLoopStoredEnhancedHue = 16390; diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index c58f7ab0e26bbf..dd0f231ad1bd39 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -14682,7 +14682,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + static_cast(cppValue), value); return value; } case Attributes::ColorLoopTime::Id: { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 61079f4c51d42f..48fe0618b97009 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -19875,7 +19875,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="enhancedCurrentHue", Tag=0x00004000, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="enhancedColorMode", Tag=0x00004001, Type=uint), ClusterObjectFieldDescriptor(Label="colorLoopActive", Tag=0x00004002, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="colorLoopDirection", Tag=0x00004003, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="colorLoopDirection", Tag=0x00004003, Type=typing.Optional[ColorControl.Enums.ColorLoopDirection]), ClusterObjectFieldDescriptor(Label="colorLoopTime", Tag=0x00004004, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="colorLoopStartEnhancedHue", Tag=0x00004005, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="colorLoopStoredEnhancedHue", Tag=0x00004006, Type=typing.Optional[uint]), @@ -19935,7 +19935,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: enhancedCurrentHue: 'typing.Optional[uint]' = None enhancedColorMode: 'uint' = None colorLoopActive: 'typing.Optional[uint]' = None - colorLoopDirection: 'typing.Optional[uint]' = None + colorLoopDirection: 'typing.Optional[ColorControl.Enums.ColorLoopDirection]' = None colorLoopTime: 'typing.Optional[uint]' = None colorLoopStartEnhancedHue: 'typing.Optional[uint]' = None colorLoopStoredEnhancedHue: 'typing.Optional[uint]' = None @@ -21201,9 +21201,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[ColorControl.Enums.ColorLoopDirection]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[ColorControl.Enums.ColorLoopDirection]' = None @dataclass class ColorLoopTime(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 568ea996ca72d5..01a82b86fd365b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -11066,7 +11066,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ColorLoopTime::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 86a9e2d3c69d75..1d61a9c9ce933b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -70884,7 +70884,7 @@ - (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Null { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70894,9 +70894,9 @@ - (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams * _No (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeColorLoopDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -70905,9 +70905,9 @@ + (void)readAttributeColorLoopDirectionWithClusterStateCache:(MTRClusterStateCac completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ColorControlClusterColorLoopDirectionAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index ebd102aded5e53..b42f800e3e0eaf 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -19175,9 +19175,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ColorLoopDirection { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::ColorLoopDirection * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); @@ -19189,9 +19189,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::ColorLoopDirection value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -19199,7 +19199,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } } // namespace ColorLoopDirection diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 510d8bd4cc582b..a9188fa3978d63 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -3239,8 +3239,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace ColorLoopActive namespace ColorLoopDirection { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::ColorLoopDirection * value); // ColorLoopDirection +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::ColorLoopDirection value); } // namespace ColorLoopDirection namespace ColorLoopTime { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index e94f6982e1904a..2a71da8a24ce08 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -1701,17 +1701,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::ColorLoop using EnumType = ColorControl::ColorLoopAction; switch (val) { -// 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 case EnumType::kDeactivate: case EnumType::kActivateFromColorLoopStartEnhancedHue: case EnumType::kActivateFromEnhancedCurrentHue: -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM - case EMBER_ZCL_COLOR_LOOP_ACTION_DEACTIVATE: - case EMBER_ZCL_COLOR_LOOP_ACTION_ACTIVATE_FROM_COLOR_LOOP_START_ENHANCED_HUE: - case EMBER_ZCL_COLOR_LOOP_ACTION_ACTIVATE_FROM_ENHANCED_CURRENT_HUE: -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM return val; default: return static_cast(3); @@ -1722,15 +1714,8 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::ColorLoop using EnumType = ColorControl::ColorLoopDirection; switch (val) { -// 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 case EnumType::kDecrementHue: case EnumType::kIncrementHue: -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM - case EMBER_ZCL_COLOR_LOOP_DIRECTION_DECREMENT_HUE: - case EMBER_ZCL_COLOR_LOOP_DIRECTION_INCREMENT_HUE: -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM return val; default: return static_cast(2); diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 387ce5239b3dc9..dea6a250b6984b 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -2219,9 +2219,6 @@ namespace ThermostatUserInterfaceConfiguration {} // namespace ThermostatUserInt namespace ColorControl { -// 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 ColorLoopAction enum class ColorLoopAction : uint8_t { @@ -2234,14 +2231,7 @@ enum class ColorLoopAction : uint8_t // enum value. This specific should never be transmitted. kUnknownEnumValue = 3, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ColorLoopAction = EmberAfColorLoopAction; -static ColorLoopAction __attribute__((unused)) kColorLoopActionkUnknownEnumValue = static_cast(3); -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -// 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 ColorLoopDirection enum class ColorLoopDirection : uint8_t { @@ -2253,10 +2243,6 @@ enum class ColorLoopDirection : uint8_t // enum value. This specific should never be transmitted. kUnknownEnumValue = 2, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ColorLoopDirection = EmberAfColorLoopDirection; -static ColorLoopDirection __attribute__((unused)) kColorLoopDirectionkUnknownEnumValue = static_cast(2); -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. 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 076c4097b13647..579924582deebc 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 @@ -19599,9 +19599,9 @@ struct TypeInfo namespace ColorLoopDirection { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::ColorControl::ColorLoopDirection; + using DecodableType = chip::app::Clusters::ColorControl::ColorLoopDirection; + using DecodableArgType = chip::app::Clusters::ColorControl::ColorLoopDirection; static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ColorLoopDirection::Id; } @@ -19789,10 +19789,11 @@ struct TypeInfo Attributes::ColorPointBX::TypeInfo::DecodableType colorPointBX = static_cast(0); Attributes::ColorPointBY::TypeInfo::DecodableType colorPointBY = static_cast(0); Attributes::ColorPointBIntensity::TypeInfo::DecodableType colorPointBIntensity; - Attributes::EnhancedCurrentHue::TypeInfo::DecodableType enhancedCurrentHue = static_cast(0); - Attributes::EnhancedColorMode::TypeInfo::DecodableType enhancedColorMode = static_cast(0); - Attributes::ColorLoopActive::TypeInfo::DecodableType colorLoopActive = static_cast(0); - Attributes::ColorLoopDirection::TypeInfo::DecodableType colorLoopDirection = static_cast(0); + Attributes::EnhancedCurrentHue::TypeInfo::DecodableType enhancedCurrentHue = static_cast(0); + Attributes::EnhancedColorMode::TypeInfo::DecodableType enhancedColorMode = static_cast(0); + Attributes::ColorLoopActive::TypeInfo::DecodableType colorLoopActive = static_cast(0); + Attributes::ColorLoopDirection::TypeInfo::DecodableType colorLoopDirection = + static_cast(0); Attributes::ColorLoopTime::TypeInfo::DecodableType colorLoopTime = static_cast(0); Attributes::ColorLoopStartEnhancedHue::TypeInfo::DecodableType colorLoopStartEnhancedHue = static_cast(0); Attributes::ColorLoopStoredEnhancedHue::TypeInfo::DecodableType colorLoopStoredEnhancedHue = static_cast(0); 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 a0a01e89515e8a..f5db3095fa6e28 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -46,21 +46,6 @@ enum EmberAfColorControlOptions : uint8_t EMBER_ZCL_COLOR_CONTROL_OPTIONS_EXECUTE_IF_OFF = 1, }; -// Enum for ColorLoopAction -enum EmberAfColorLoopAction : uint8_t -{ - EMBER_ZCL_COLOR_LOOP_ACTION_DEACTIVATE = 0, - EMBER_ZCL_COLOR_LOOP_ACTION_ACTIVATE_FROM_COLOR_LOOP_START_ENHANCED_HUE = 1, - EMBER_ZCL_COLOR_LOOP_ACTION_ACTIVATE_FROM_ENHANCED_CURRENT_HUE = 2, -}; - -// Enum for ColorLoopDirection -enum EmberAfColorLoopDirection : uint8_t -{ - EMBER_ZCL_COLOR_LOOP_DIRECTION_DECREMENT_HUE = 0, - EMBER_ZCL_COLOR_LOOP_DIRECTION_INCREMENT_HUE = 1, -}; - // Enum for ColorMode enum EmberAfColorMode : uint8_t { @@ -204,11 +189,3 @@ enum EmberAfStepMode : uint8_t #define EMBER_AF_BARRIER_CONTROL_SAFETY_STATUS_FAILED_COMMUNICATION_OFFSET (2) #define EMBER_AF_BARRIER_CONTROL_SAFETY_STATUS_POSITION_FAILURE (8) #define EMBER_AF_BARRIER_CONTROL_SAFETY_STATUS_POSITION_FAILURE_OFFSET (3) -#define EMBER_AF_COLOR_LOOP_UPDATE_FLAGS_UPDATE_ACTION (1) -#define EMBER_AF_COLOR_LOOP_UPDATE_FLAGS_UPDATE_ACTION_OFFSET (0) -#define EMBER_AF_COLOR_LOOP_UPDATE_FLAGS_UPDATE_DIRECTION (2) -#define EMBER_AF_COLOR_LOOP_UPDATE_FLAGS_UPDATE_DIRECTION_OFFSET (1) -#define EMBER_AF_COLOR_LOOP_UPDATE_FLAGS_UPDATE_TIME (4) -#define EMBER_AF_COLOR_LOOP_UPDATE_FLAGS_UPDATE_TIME_OFFSET (2) -#define EMBER_AF_COLOR_LOOP_UPDATE_FLAGS_UPDATE_START_HUE (8) -#define EMBER_AF_COLOR_LOOP_UPDATE_FLAGS_UPDATE_START_HUE_OFFSET (3) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 98e822796ecc4a..2241c6abe07fa8 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -13320,8 +13320,9 @@ void registerClusterColorControl(Commands & commands, CredentialIssuerCommands * WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "color-loop-active", 0, UINT8_MAX, Attributes::ColorLoopActive::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "color-loop-direction", 0, UINT8_MAX, Attributes::ColorLoopDirection::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "color-loop-direction", 0, UINT8_MAX, Attributes::ColorLoopDirection::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>(Id, "color-loop-time", 0, UINT16_MAX, Attributes::ColorLoopTime::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "color-loop-start-enhanced-hue", 0, UINT16_MAX, diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 578944136f8fdd..62c96dd829cc09 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -8137,7 +8137,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("ColorLoopActive", 1, value); } case ColorControl::Attributes::ColorLoopDirection::Id: { - uint8_t value; + chip::app::Clusters::ColorControl::ColorLoopDirection value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ColorLoopDirection", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 7b7fbf2a205390..48002daa114bd4 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -10448,9 +10448,9 @@ class Test_TC_CC_2_1Suite : public TestCommand case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::ColorControl::ColorLoopDirection value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } @@ -105562,7 +105562,7 @@ class Test_TC_CC_9_1Suite : public TestCommand case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::ColorControl::ColorLoopDirection value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } @@ -105677,7 +105677,7 @@ class Test_TC_CC_9_1Suite : public TestCommand case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::ColorControl::ColorLoopDirection value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } @@ -105785,7 +105785,7 @@ class Test_TC_CC_9_1Suite : public TestCommand case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::ColorControl::ColorLoopDirection value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } @@ -105878,7 +105878,7 @@ class Test_TC_CC_9_1Suite : public TestCommand case 57: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::ColorControl::ColorLoopDirection value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } @@ -106782,7 +106782,7 @@ class Test_TC_CC_9_2Suite : public TestCommand case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::ColorControl::ColorLoopDirection value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } @@ -106864,7 +106864,7 @@ class Test_TC_CC_9_2Suite : public TestCommand case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::ColorControl::ColorLoopDirection value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } @@ -107314,7 +107314,7 @@ class Test_TC_CC_9_3Suite : public TestCommand case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::ColorControl::ColorLoopDirection value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 29947c74f391e6..a5fc787138b979 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -9567,7 +9567,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorLoopDirection", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintType("colorLoopDirection", "enum8", "int8u")); VerifyOrReturn(CheckConstraintMinValue("colorLoopDirection", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("colorLoopDirection", [value unsignedCharValue], 254U));