From a2eb8c6c397381ff634f84579e7a1a10ea7034bd Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 23 Feb 2023 16:42:12 -0500 Subject: [PATCH] Regenerate generated files. --- .../all-clusters-app.matter | 4 +- .../all-clusters-minimal-app.matter | 2 +- .../bridge-common/bridge-app.matter | 4 +- .../bridge-common/bridge-app.matter | 4 +- .../placeholder/linux/apps/app1/config.matter | 8 +-- .../placeholder/linux/apps/app2/config.matter | 4 +- .../esp32/main/temperature-measurement.matter | 4 +- .../thermostat-common/thermostat.matter | 4 +- examples/tv-app/tv-common/tv-app.matter | 4 +- .../tv-casting-common/tv-casting-app.matter | 4 +- examples/window-app/common/window-app.matter | 2 +- .../data_model/controller-clusters.matter | 4 +- .../python/chip/clusters/Objects.py | 10 +-- .../CHIP/zap-generated/MTRBaseClusters.mm | 12 ++-- .../CHIP/zap-generated/MTRCallbackBridge.h | 66 +++++++++---------- .../CHIP/zap-generated/MTRCallbackBridge.mm | 12 ++-- .../zap-generated/attributes/Accessors.cpp | 8 +-- .../zap-generated/attributes/Accessors.h | 4 +- .../zap-generated/cluster-enums-check.h | 4 +- .../app-common/zap-generated/cluster-enums.h | 4 +- .../zap-generated/cluster-objects.h | 8 +-- .../zap-generated/cluster/Commands.h | 2 +- .../cluster/logging/DataModelLogger.cpp | 2 +- .../chip-tool/zap-generated/test/Commands.h | 24 +++---- 24 files changed, 102 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 b8967311979721..61d81d2a0dea8d 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 @@ -884,7 +884,7 @@ server cluster TimeFormatLocalization = 44 { } server cluster UnitLocalization = 45 { - enum TempUnit : ENUM8 { + enum TempUnitEnum : ENUM8 { kFahrenheit = 0; kCelsius = 1; kKelvin = 2; @@ -894,7 +894,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnit temperatureUnit = 0; + attribute TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 4d272e6081288c..ac388002383329 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -767,7 +767,7 @@ server cluster TimeFormatLocalization = 44 { } server cluster UnitLocalization = 45 { - enum TempUnit : ENUM8 { + enum TempUnitEnum : ENUM8 { kFahrenheit = 0; kCelsius = 1; kKelvin = 2; diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index ddb107eeb44fff..1b8f1dd6ed852c 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -554,7 +554,7 @@ server cluster TimeFormatLocalization = 44 { } server cluster UnitLocalization = 45 { - enum TempUnit : ENUM8 { + enum TempUnitEnum : ENUM8 { kFahrenheit = 0; kCelsius = 1; kKelvin = 2; @@ -564,7 +564,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnit temperatureUnit = 0; + attribute TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter index 4814d37d4afc40..31f37a4e061ba2 100644 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter +++ b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter @@ -554,7 +554,7 @@ server cluster TimeFormatLocalization = 44 { } server cluster UnitLocalization = 45 { - enum TempUnit : ENUM8 { + enum TempUnitEnum : ENUM8 { kFahrenheit = 0; kCelsius = 1; kKelvin = 2; @@ -564,7 +564,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnit temperatureUnit = 0; + attribute TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index a83048426b1a1c..9325731cbf2e17 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -710,7 +710,7 @@ server cluster TimeFormatLocalization = 44 { } client cluster UnitLocalization = 45 { - enum TempUnit : ENUM8 { + enum TempUnitEnum : ENUM8 { kFahrenheit = 0; kCelsius = 1; kKelvin = 2; @@ -720,7 +720,7 @@ client cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnit temperatureUnit = 0; + attribute TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -730,7 +730,7 @@ client cluster UnitLocalization = 45 { } server cluster UnitLocalization = 45 { - enum TempUnit : ENUM8 { + enum TempUnitEnum : ENUM8 { kFahrenheit = 0; kCelsius = 1; kKelvin = 2; @@ -740,7 +740,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnit temperatureUnit = 0; + attribute TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index cc9b83dd836f4e..7f2d2d4e668831 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -699,7 +699,7 @@ server cluster TimeFormatLocalization = 44 { } server cluster UnitLocalization = 45 { - enum TempUnit : ENUM8 { + enum TempUnitEnum : ENUM8 { kFahrenheit = 0; kCelsius = 1; kKelvin = 2; @@ -709,7 +709,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnit temperatureUnit = 0; + attribute TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index 7f58ef07f9884f..3d809d4214df2a 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -186,7 +186,7 @@ server cluster TimeFormatLocalization = 44 { } server cluster UnitLocalization = 45 { - enum TempUnit : ENUM8 { + enum TempUnitEnum : ENUM8 { kFahrenheit = 0; kCelsius = 1; kKelvin = 2; @@ -196,7 +196,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnit temperatureUnit = 0; + attribute TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index e9843eb2a7273b..bc9cf36ab4e6bb 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -612,7 +612,7 @@ server cluster TimeFormatLocalization = 44 { } server cluster UnitLocalization = 45 { - enum TempUnit : ENUM8 { + enum TempUnitEnum : ENUM8 { kFahrenheit = 0; kCelsius = 1; kKelvin = 2; @@ -622,7 +622,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnit temperatureUnit = 0; + attribute TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 76ec213156ce17..71d25a9614199f 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -447,7 +447,7 @@ server cluster TimeFormatLocalization = 44 { } server cluster UnitLocalization = 45 { - enum TempUnit : ENUM8 { + enum TempUnitEnum : ENUM8 { kFahrenheit = 0; kCelsius = 1; kKelvin = 2; @@ -457,7 +457,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnit temperatureUnit = 0; + attribute TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index ad7c46c3ca2203..da4468d774d6b4 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -831,7 +831,7 @@ server cluster TimeFormatLocalization = 44 { } server cluster UnitLocalization = 45 { - enum TempUnit : ENUM8 { + enum TempUnitEnum : ENUM8 { kFahrenheit = 0; kCelsius = 1; kKelvin = 2; @@ -841,7 +841,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnit temperatureUnit = 0; + attribute TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 798a06b4a04567..f4047a4373489c 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -555,7 +555,7 @@ server cluster TimeFormatLocalization = 44 { } server cluster UnitLocalization = 45 { - enum TempUnit : ENUM8 { + enum TempUnitEnum : ENUM8 { kFahrenheit = 0; kCelsius = 1; kKelvin = 2; diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index d7016061bf502d..e0b6536b5ca1d3 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -931,7 +931,7 @@ client cluster TimeFormatLocalization = 44 { } client cluster UnitLocalization = 45 { - enum TempUnit : ENUM8 { + enum TempUnitEnum : ENUM8 { kFahrenheit = 0; kCelsius = 1; kKelvin = 2; @@ -941,7 +941,7 @@ client cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnit temperatureUnit = 0; + attribute TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 42fbad2dce005f..885154455c2e89 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -5658,7 +5658,7 @@ class UnitLocalization(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="temperatureUnit", Tag=0x00000000, Type=typing.Optional[UnitLocalization.Enums.TempUnit]), + ClusterObjectFieldDescriptor(Label="temperatureUnit", Tag=0x00000000, Type=typing.Optional[UnitLocalization.Enums.TempUnitEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -5667,7 +5667,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - temperatureUnit: 'typing.Optional[UnitLocalization.Enums.TempUnit]' = None + temperatureUnit: 'typing.Optional[UnitLocalization.Enums.TempUnitEnum]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -5676,7 +5676,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class TempUnit(MatterIntEnum): + class TempUnitEnum(MatterIntEnum): kFahrenheit = 0x00 kCelsius = 0x01 kKelvin = 0x02 @@ -5707,9 +5707,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[UnitLocalization.Enums.TempUnit]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[UnitLocalization.Enums.TempUnitEnum]) - value: 'typing.Optional[UnitLocalization.Enums.TempUnit]' = None + value: 'typing.Optional[UnitLocalization.Enums.TempUnitEnum]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 48560bf1959926..3da8a210d619e2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -19313,7 +19313,7 @@ - (void)readAttributeTemperatureUnitWithCompletion:(void (^)(NSNumber * _Nullabl { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19359,9 +19359,9 @@ - (void)subscribeAttributeTemperatureUnitWithParams:(MTRSubscribeParams * _Nonnu reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::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)readAttributeTemperatureUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -19370,9 +19370,9 @@ + (void)readAttributeTemperatureUnitWithClusterStateCache:(MTRClusterStateCacheC completion: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(UnitLocalizationClusterTempUnitAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(UnitLocalizationClusterTempUnitEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index df43e676bf6f75..904a65ea84a121 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -223,9 +223,9 @@ typedef void (*TimeFormatLocalizationClusterHourFormatAttributeCallback)(void *, chip::app::Clusters::TimeFormatLocalization::HourFormat); typedef void (*NullableTimeFormatLocalizationClusterHourFormatAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*UnitLocalizationClusterTempUnitAttributeCallback)(void *, chip::app::Clusters::UnitLocalization::TempUnit); -typedef void (*NullableUnitLocalizationClusterTempUnitAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); +typedef void (*UnitLocalizationClusterTempUnitEnumAttributeCallback)(void *, chip::app::Clusters::UnitLocalization::TempUnitEnum); +typedef void (*NullableUnitLocalizationClusterTempUnitEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); typedef void (*PowerSourceClusterBatApprovedChemistryEnumAttributeCallback)( void *, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum); typedef void (*NullablePowerSourceClusterBatApprovedChemistryEnumAttributeCallback)( @@ -15568,68 +15568,68 @@ class MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscri MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge - : public MTRCallbackBridge +class MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::UnitLocalization::TempUnit value); + static void OnSuccessFn(void * context, chip::app::Clusters::UnitLocalization::TempUnitEnum value); }; -class MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge - : public MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge +class MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge + : public MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge { public: - MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(queue, handler, action), + MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge::OnDone; + using MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge - : public MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge +class MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge + : public MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge { public: - MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge( + MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge(queue, handler, action), + MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge::OnDone; + using MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index 0fcbe3e5b7c79f..0dcb718f95db16 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -16790,15 +16790,15 @@ } } -void MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::UnitLocalization::TempUnit value) +void MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::UnitLocalization::TempUnitEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -16813,8 +16813,8 @@ } } -void MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -16825,7 +16825,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableUnitLocalizationClusterTempUnitEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; 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 356e36485559c8..944a428f8ce1e0 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 @@ -3487,9 +3487,9 @@ namespace Attributes { namespace TemperatureUnit { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnit * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::UnitLocalization::Id, Id, readable, sizeof(temp)); @@ -3501,9 +3501,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalizati *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnit value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; 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 813784c3f36020..655c55a2d24f99 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 @@ -671,8 +671,8 @@ namespace UnitLocalization { namespace Attributes { namespace TemperatureUnit { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnit * value); // TempUnit -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnit value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum * value); // TempUnitEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum value); } // namespace TemperatureUnit namespace FeatureMap { 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 cdbec8e3ce7ace..8fe45e0441c1b9 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 @@ -409,9 +409,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(TimeFormatLocalization: } } -static auto __attribute__((unused)) EnsureKnownEnumValue(UnitLocalization::TempUnit val) +static auto __attribute__((unused)) EnsureKnownEnumValue(UnitLocalization::TempUnitEnum val) { - using EnumType = UnitLocalization::TempUnit; + using EnumType = UnitLocalization::TempUnitEnum; switch (val) { case EnumType::kFahrenheit: 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 95a6d3399e2c44..3475c05ea9947d 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 @@ -507,8 +507,8 @@ enum class HourFormat : uint8_t namespace UnitLocalization { -// Enum for TempUnit -enum class TempUnit : uint8_t +// Enum for TempUnitEnum +enum class TempUnitEnum : uint8_t { kFahrenheit = 0x00, kCelsius = 0x01, 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 142b1332c07de7..afabb3027bd84b 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 @@ -5851,9 +5851,9 @@ namespace Attributes { namespace TemperatureUnit { struct TypeInfo { - using Type = chip::app::Clusters::UnitLocalization::TempUnit; - using DecodableType = chip::app::Clusters::UnitLocalization::TempUnit; - using DecodableArgType = chip::app::Clusters::UnitLocalization::TempUnit; + using Type = chip::app::Clusters::UnitLocalization::TempUnitEnum; + using DecodableType = chip::app::Clusters::UnitLocalization::TempUnitEnum; + using DecodableArgType = chip::app::Clusters::UnitLocalization::TempUnitEnum; static constexpr ClusterId GetClusterId() { return Clusters::UnitLocalization::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureUnit::Id; } @@ -5906,7 +5906,7 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::TemperatureUnit::TypeInfo::DecodableType temperatureUnit = - static_cast(0); + static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 09e793623de03e..9a559a63ffea5f 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -9742,7 +9742,7 @@ void registerClusterUnitLocalization(Commands & commands, CredentialIssuerComman make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>( + make_unique>( Id, "temperature-unit", 0, UINT8_MAX, Attributes::TemperatureUnit::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, 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 65f7da1143f798..5af013702ebcee 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -5245,7 +5245,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP switch (path.mAttributeId) { case UnitLocalization::Attributes::TemperatureUnit::Id: { - chip::app::Clusters::UnitLocalization::TempUnit value; + chip::app::Clusters::UnitLocalization::TempUnitEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("TemperatureUnit", 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 d8b821b88c28c5..beaa5b2e5eed96 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -29088,7 +29088,7 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::UnitLocalization::TempUnit value; + chip::app::Clusters::UnitLocalization::TempUnitEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); } @@ -29099,7 +29099,7 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::UnitLocalization::TempUnit value; + chip::app::Clusters::UnitLocalization::TempUnitEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("temperatureUnit", value, 0U)); } @@ -29110,7 +29110,7 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::UnitLocalization::TempUnit value; + chip::app::Clusters::UnitLocalization::TempUnitEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("temperatureUnit", value, 1U)); } @@ -29121,7 +29121,7 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::UnitLocalization::TempUnit value; + chip::app::Clusters::UnitLocalization::TempUnitEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("temperatureUnit", value, 2U)); } @@ -29161,8 +29161,8 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand LogStep(2, "TH writes 0 (Fahrenheit) to TemperatureUnit attribute"); VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnit value; - value = static_cast(0); + chip::app::Clusters::UnitLocalization::TempUnitEnum value; + value = static_cast(0); return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); } @@ -29176,8 +29176,8 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand LogStep(4, "TH writes 1 (Celsius) to TemperatureUnit attribute"); VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnit value; - value = static_cast(1); + chip::app::Clusters::UnitLocalization::TempUnitEnum value; + value = static_cast(1); return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); } @@ -29191,8 +29191,8 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand LogStep(6, "TH writes 2 (Kelvin) to TemperatureUnit attribute"); VerifyOrDo(!ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnit value; - value = static_cast(2); + chip::app::Clusters::UnitLocalization::TempUnitEnum value; + value = static_cast(2); return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); } @@ -29206,8 +29206,8 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand LogStep(8, "TH writes 5 to TemperatureUnit attribute"); VerifyOrDo(!ShouldSkip("LUNIT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnit value; - value = static_cast(5); + chip::app::Clusters::UnitLocalization::TempUnitEnum value; + value = static_cast(5); return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); }