From 382a6fb113868f9a7eec47390a140ca44af39675 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Thu, 21 Apr 2022 07:23:21 -0700 Subject: [PATCH] Update FanControl cluster definition to make it more readable (#17578) --- .../all-clusters-app.matter | 24 ++-- .../zcl/data-model/silabs/ha.xml | 18 +-- .../data_model/controller-clusters.matter | 24 ++-- .../CHIPAttributeTLVValueDecoder.cpp | 4 +- .../python/chip/clusters/Objects.py | 34 +++--- .../CHIPAttributeTLVValueDecoder.mm | 4 +- .../CHIP/zap-generated/CHIPCallbackBridge.mm | 32 ++--- .../CHIPCallbackBridge_internal.h | 109 +++++++++--------- .../CHIP/zap-generated/CHIPClustersObjc.h | 30 ++--- .../CHIP/zap-generated/CHIPClustersObjc.mm | 108 ++++++++--------- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/attributes/Accessors.cpp | 16 +-- .../zap-generated/attributes/Accessors.h | 8 +- .../app-common/zap-generated/cluster-enums.h | 26 ++--- .../zap-generated/cluster-objects.h | 35 +++--- .../zap-generated/cluster/Commands.h | 4 +- .../cluster/logging/DataModelLogger.cpp | 4 +- 17 files changed, 245 insertions(+), 237 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 3220badaa70f36..071bc21949112d 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 @@ -1354,7 +1354,16 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster FanControl = 514 { - enum FanMode : ENUM8 { + enum FanModeSequenceType : ENUM8 { + kOffLowMedHigh = 0; + kOffLowHigh = 1; + kOffLowMedHighAuto = 2; + kOffLowHighAuto = 3; + kOffOnAuto = 4; + kOffOn = 5; + } + + enum FanModeType : ENUM8 { kOff = 0; kLow = 1; kMedium = 2; @@ -1364,15 +1373,6 @@ server cluster FanControl = 514 { kSmart = 6; } - enum FanModeSequence : ENUM8 { - kOffLowMedHigh = 0; - kOffLowHigh = 1; - kOffLowMedHighAuto = 2; - kOffLowHighAuto = 3; - kOffOnAuto = 4; - kOffOn = 5; - } - bitmap FanControlFeature : BITMAP32 { kMultiSpeed = 0x1; kAuto = 0x2; @@ -1396,8 +1396,8 @@ server cluster FanControl = 514 { kNaturalWind = 0x2; } - attribute enum8 fanMode = 0; - attribute enum8 fanModeSequence = 1; + attribute FanModeType fanMode = 0; + attribute FanModeSequenceType fanModeSequence = 1; attribute int8u percentSetting = 2; readonly attribute int8u percentCurrent = 3; readonly attribute int8u speedMax = 4; diff --git a/src/app/zap-templates/zcl/data-model/silabs/ha.xml b/src/app/zap-templates/zcl/data-model/silabs/ha.xml index 717ac386d7f7d2..fb3015baa7c5e9 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/ha.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/ha.xml @@ -53,20 +53,20 @@ limitations under the License. FAN_CONTROL_CLUSTER true true - fan mode - fan mode sequence - percent setting - percent current - speed max - speed setting - speed current + fan mode + fan mode sequence + percent setting + percent current + speed max + speed setting + speed current rock support rock setting wind support wind setting - + @@ -76,7 +76,7 @@ limitations under the License. - + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index bef4c2ab9874e5..dd4d783bb1f491 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -1703,7 +1703,16 @@ client cluster EthernetNetworkDiagnostics = 55 { } client cluster FanControl = 514 { - enum FanMode : ENUM8 { + enum FanModeSequenceType : ENUM8 { + kOffLowMedHigh = 0; + kOffLowHigh = 1; + kOffLowMedHighAuto = 2; + kOffLowHighAuto = 3; + kOffOnAuto = 4; + kOffOn = 5; + } + + enum FanModeType : ENUM8 { kOff = 0; kLow = 1; kMedium = 2; @@ -1713,15 +1722,6 @@ client cluster FanControl = 514 { kSmart = 6; } - enum FanModeSequence : ENUM8 { - kOffLowMedHigh = 0; - kOffLowHigh = 1; - kOffLowMedHighAuto = 2; - kOffLowHighAuto = 3; - kOffOnAuto = 4; - kOffOn = 5; - } - bitmap FanControlFeature : BITMAP32 { kMultiSpeed = 0x1; kAuto = 0x2; @@ -1745,8 +1745,8 @@ client cluster FanControl = 514 { kNaturalWind = 0x2; } - attribute enum8 fanMode = 0; - attribute enum8 fanModeSequence = 1; + attribute FanModeType fanMode = 0; + attribute FanModeSequenceType fanModeSequence = 1; attribute int8u percentSetting = 2; readonly attribute int8u percentCurrent = 3; readonly attribute int8u speedMax = 4; diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 43c1d9dbe8cc54..9158f5b859a01c 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -5451,7 +5451,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::FanModeSequence::Id: { @@ -5466,7 +5466,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::PercentSetting::Id: { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 4cc97f920e2032..fecb96a7c3f08e 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -21132,8 +21132,8 @@ class FanControl(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="fanMode", Tag=0x00000000, Type=uint), - ClusterObjectFieldDescriptor(Label="fanModeSequence", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="fanMode", Tag=0x00000000, Type=FanControl.Enums.FanModeType), + ClusterObjectFieldDescriptor(Label="fanModeSequence", Tag=0x00000001, Type=FanControl.Enums.FanModeSequenceType), ClusterObjectFieldDescriptor(Label="percentSetting", Tag=0x00000002, Type=uint), ClusterObjectFieldDescriptor(Label="percentCurrent", Tag=0x00000003, Type=uint), ClusterObjectFieldDescriptor(Label="speedMax", Tag=0x00000004, Type=typing.Optional[uint]), @@ -21150,8 +21150,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - fanMode: 'uint' = None - fanModeSequence: 'uint' = None + fanMode: 'FanControl.Enums.FanModeType' = None + fanModeSequence: 'FanControl.Enums.FanModeSequenceType' = None percentSetting: 'uint' = None percentCurrent: 'uint' = None speedMax: 'typing.Optional[uint]' = None @@ -21168,7 +21168,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class FanMode(IntEnum): + class FanModeSequenceType(IntEnum): + kOffLowMedHigh = 0x00 + kOffLowHigh = 0x01 + kOffLowMedHighAuto = 0x02 + kOffLowHighAuto = 0x03 + kOffOnAuto = 0x04 + kOffOn = 0x05 + + class FanModeType(IntEnum): kOff = 0x00 kLow = 0x01 kMedium = 0x02 @@ -21177,14 +21185,6 @@ class FanMode(IntEnum): kAuto = 0x05 kSmart = 0x06 - class FanModeSequence(IntEnum): - kOffLowMedHigh = 0x00 - kOffLowHigh = 0x01 - kOffLowMedHighAuto = 0x02 - kOffLowHighAuto = 0x03 - kOffOnAuto = 0x04 - kOffOn = 0x05 - @@ -21201,9 +21201,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=FanControl.Enums.FanModeType) - value: 'uint' = 0 + value: 'FanControl.Enums.FanModeType' = 0 @dataclass class FanModeSequence(ClusterAttributeDescriptor): @@ -21217,9 +21217,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=FanControl.Enums.FanModeSequenceType) - value: 'uint' = 0 + value: 'FanControl.Enums.FanModeSequenceType' = 0 @dataclass class PercentSetting(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 0e7565b4ac5502..d5e8925bc03f92 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -4436,7 +4436,7 @@ id CHIPDecodeAttributeValue(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::FanModeSequence::Id: { @@ -4447,7 +4447,7 @@ id CHIPDecodeAttributeValue(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::PercentSetting::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index 8748909ad28641..f0e07b1e4a6225 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -16456,17 +16456,17 @@ } } -void CHIPFanControlClusterFanModeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::FanControl::FanMode value) +void CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::FanControl::FanModeSequenceType value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void CHIPFanControlClusterFanModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -16480,8 +16480,8 @@ } } -void CHIPNullableFanControlClusterFanModeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -16492,9 +16492,9 @@ DispatchSuccess(context, objCValue); }; -void CHIPNullableFanControlClusterFanModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -16508,17 +16508,17 @@ } } -void CHIPFanControlClusterFanModeSequenceAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::FanControl::FanModeSequence value) +void CHIPFanControlClusterFanModeTypeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::FanControl::FanModeType value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void CHIPFanControlClusterFanModeSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -16532,8 +16532,8 @@ } } -void CHIPNullableFanControlClusterFanModeSequenceAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPNullableFanControlClusterFanModeTypeAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -16544,9 +16544,9 @@ DispatchSuccess(context, objCValue); }; -void CHIPNullableFanControlClusterFanModeSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h index f59a18450ef915..e069190147a20b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h @@ -436,12 +436,12 @@ typedef void (*ThermostatClusterThermostatSystemModeAttributeCallback)(void *, chip::app::Clusters::Thermostat::ThermostatSystemMode); typedef void (*NullableThermostatClusterThermostatSystemModeAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*FanControlClusterFanModeAttributeCallback)(void *, chip::app::Clusters::FanControl::FanMode); -typedef void (*NullableFanControlClusterFanModeAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*FanControlClusterFanModeSequenceAttributeCallback)(void *, chip::app::Clusters::FanControl::FanModeSequence); -typedef void (*NullableFanControlClusterFanModeSequenceAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); +typedef void (*FanControlClusterFanModeSequenceTypeAttributeCallback)(void *, chip::app::Clusters::FanControl::FanModeSequenceType); +typedef void (*NullableFanControlClusterFanModeSequenceTypeAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*FanControlClusterFanModeTypeAttributeCallback)(void *, chip::app::Clusters::FanControl::FanModeType); +typedef void (*NullableFanControlClusterFanModeTypeAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); typedef void (*ColorControlClusterColorLoopActionAttributeCallback)(void *, chip::app::Clusters::ColorControl::ColorLoopAction); typedef void (*NullableColorControlClusterColorLoopActionAttributeCallback)( void *, const chip::app::DataModel::Nullable &); @@ -14065,23 +14065,25 @@ class CHIPNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscrip SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPFanControlClusterFanModeAttributeCallbackBridge : public CHIPCallbackBridge +class CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPFanControlClusterFanModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::FanMode value); + static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::FanModeSequenceType value); }; -class CHIPFanControlClusterFanModeAttributeCallbackSubscriptionBridge : public CHIPFanControlClusterFanModeAttributeCallbackBridge +class CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge + : public CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackBridge { public: - CHIPFanControlClusterFanModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPFanControlClusterFanModeAttributeCallbackBridge(queue, handler, action, true), + CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14091,25 +14093,27 @@ class CHIPFanControlClusterFanModeAttributeCallbackSubscriptionBridge : public C SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPNullableFanControlClusterFanModeAttributeCallbackBridge - : public CHIPCallbackBridge +class CHIPNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPNullableFanControlClusterFanModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + CHIPNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; -class CHIPNullableFanControlClusterFanModeAttributeCallbackSubscriptionBridge - : public CHIPNullableFanControlClusterFanModeAttributeCallbackBridge +class CHIPNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge + : public CHIPNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge { public: - CHIPNullableFanControlClusterFanModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPNullableFanControlClusterFanModeAttributeCallbackBridge(queue, handler, action, true), + CHIPNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14119,25 +14123,25 @@ class CHIPNullableFanControlClusterFanModeAttributeCallbackSubscriptionBridge SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPFanControlClusterFanModeSequenceAttributeCallbackBridge - : public CHIPCallbackBridge +class CHIPFanControlClusterFanModeTypeAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPFanControlClusterFanModeSequenceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + CHIPFanControlClusterFanModeTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::FanModeSequence value); + static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::FanModeType value); }; -class CHIPFanControlClusterFanModeSequenceAttributeCallbackSubscriptionBridge - : public CHIPFanControlClusterFanModeSequenceAttributeCallbackBridge +class CHIPFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge + : public CHIPFanControlClusterFanModeTypeAttributeCallbackBridge { public: - CHIPFanControlClusterFanModeSequenceAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPFanControlClusterFanModeSequenceAttributeCallbackBridge(queue, handler, action, true), + CHIPFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPFanControlClusterFanModeTypeAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14147,27 +14151,26 @@ class CHIPFanControlClusterFanModeSequenceAttributeCallbackSubscriptionBridge SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPNullableFanControlClusterFanModeSequenceAttributeCallbackBridge - : public CHIPCallbackBridge +class CHIPNullableFanControlClusterFanModeTypeAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPNullableFanControlClusterFanModeSequenceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + CHIPNullableFanControlClusterFanModeTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class CHIPNullableFanControlClusterFanModeSequenceAttributeCallbackSubscriptionBridge - : public CHIPNullableFanControlClusterFanModeSequenceAttributeCallbackBridge +class CHIPNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge + : public CHIPNullableFanControlClusterFanModeTypeAttributeCallbackBridge { public: - CHIPNullableFanControlClusterFanModeSequenceAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPNullableFanControlClusterFanModeSequenceAttributeCallbackBridge(queue, handler, action, true), + CHIPNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPNullableFanControlClusterFanModeTypeAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 7c3b353abb6082..0ded00acd54868 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -16245,23 +16245,23 @@ typedef NS_OPTIONS(uint32_t, CHIPThermostatFeature) { CHIPThermostatFeatureAutomode = 0x20, }; -typedef NS_ENUM(uint8_t, CHIPFanControlFanMode) { - CHIPFanControlFanModeOff = 0x00, - CHIPFanControlFanModeLow = 0x01, - CHIPFanControlFanModeMedium = 0x02, - CHIPFanControlFanModeHigh = 0x03, - CHIPFanControlFanModeOn = 0x04, - CHIPFanControlFanModeAuto = 0x05, - CHIPFanControlFanModeSmart = 0x06, +typedef NS_ENUM(uint8_t, CHIPFanControlFanModeSequenceType) { + CHIPFanControlFanModeSequenceTypeOffLowMedHigh = 0x00, + CHIPFanControlFanModeSequenceTypeOffLowHigh = 0x01, + CHIPFanControlFanModeSequenceTypeOffLowMedHighAuto = 0x02, + CHIPFanControlFanModeSequenceTypeOffLowHighAuto = 0x03, + CHIPFanControlFanModeSequenceTypeOffOnAuto = 0x04, + CHIPFanControlFanModeSequenceTypeOffOn = 0x05, }; -typedef NS_ENUM(uint8_t, CHIPFanControlFanModeSequence) { - CHIPFanControlFanModeSequenceOffLowMedHigh = 0x00, - CHIPFanControlFanModeSequenceOffLowHigh = 0x01, - CHIPFanControlFanModeSequenceOffLowMedHighAuto = 0x02, - CHIPFanControlFanModeSequenceOffLowHighAuto = 0x03, - CHIPFanControlFanModeSequenceOffOnAuto = 0x04, - CHIPFanControlFanModeSequenceOffOn = 0x05, +typedef NS_ENUM(uint8_t, CHIPFanControlFanModeType) { + CHIPFanControlFanModeTypeOff = 0x00, + CHIPFanControlFanModeTypeLow = 0x01, + CHIPFanControlFanModeTypeMedium = 0x02, + CHIPFanControlFanModeTypeHigh = 0x03, + CHIPFanControlFanModeTypeOn = 0x04, + CHIPFanControlFanModeTypeAuto = 0x05, + CHIPFanControlFanModeTypeSmart = 0x06, }; typedef NS_OPTIONS(uint32_t, CHIPFanControlFeature) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index b808549256b72d..4b9a7342a71631 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -18565,12 +18565,13 @@ @implementation CHIPFanControl - (void)readAttributeFanModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPFanControlClusterFanModeTypeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -18584,7 +18585,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -18597,7 +18598,7 @@ - (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterva subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -18605,11 +18606,11 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -18621,34 +18622,36 @@ + (void)readAttributeFanModeWithAttributeCache:(CHIPAttributeCacheContainer *)at queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPFanControlClusterFanModeTypeAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFanModeSequenceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -18662,7 +18665,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -18676,7 +18679,7 @@ - (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)mi reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -18684,11 +18687,11 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -18701,23 +18704,24 @@ + (void)readAttributeFanModeSequenceWithAttributeCache:(CHIPAttributeCacheContai completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributePercentSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 7aec12ad64fe24..476fdf315e3053 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1021,7 +1021,7 @@ \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x6 }, /* fan mode */ \ - { (uint16_t) 0x2, (uint16_t) 0x0, (uint16_t) 0x4 }, /* fan mode sequence */ \ + { (uint16_t) 0x2, (uint16_t) 0x0, (uint16_t) 0x5 }, /* fan mode sequence */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x64 }, /* percent setting */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x64 }, /* speed setting */ \ \ 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 ececc02bf5d78c..6d789d02eec01f 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 @@ -19398,9 +19398,9 @@ namespace Attributes { namespace FanMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeType * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FanControl::Id, Id, readable, sizeof(temp)); @@ -19412,9 +19412,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::FanControl::FanModeType value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -19429,9 +19429,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace FanModeSequence { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceType * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FanControl::Id, Id, readable, sizeof(temp)); @@ -19443,9 +19443,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::FanControl::FanModeSequenceType 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 68d536b8854363..bb1808b5b5a808 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 @@ -3377,13 +3377,13 @@ namespace FanControl { namespace Attributes { namespace FanMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeType * value); // FanModeType +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeType value); } // namespace FanMode namespace FanModeSequence { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceType * value); // FanModeSequenceType +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceType value); } // namespace FanModeSequence namespace PercentSetting { 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 01bf61d23a09ee..e1fbc609d73341 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 @@ -1603,8 +1603,19 @@ enum class ThermostatFeature : uint32_t namespace FanControl { -// Enum for FanMode -enum class FanMode : uint8_t +// Enum for FanModeSequenceType +enum class FanModeSequenceType : uint8_t +{ + kOffLowMedHigh = 0x00, + kOffLowHigh = 0x01, + kOffLowMedHighAuto = 0x02, + kOffLowHighAuto = 0x03, + kOffOnAuto = 0x04, + kOffOn = 0x05, +}; + +// Enum for FanModeType +enum class FanModeType : uint8_t { kOff = 0x00, kLow = 0x01, @@ -1615,17 +1626,6 @@ enum class FanMode : uint8_t kSmart = 0x06, }; -// Enum for FanModeSequence -enum class FanModeSequence : uint8_t -{ - kOffLowMedHigh = 0x00, - kOffLowHigh = 0x01, - kOffLowMedHighAuto = 0x02, - kOffLowHighAuto = 0x03, - kOffOnAuto = 0x04, - kOffOn = 0x05, -}; - // Bitmap for FanControlFeature enum class FanControlFeature : uint32_t { 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 91d1a3d4646910..2d6784210f1e69 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 @@ -22922,9 +22922,9 @@ namespace Attributes { namespace FanMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::FanControl::FanModeType; + using DecodableType = chip::app::Clusters::FanControl::FanModeType; + using DecodableArgType = chip::app::Clusters::FanControl::FanModeType; static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::FanMode::Id; } @@ -22934,9 +22934,9 @@ struct TypeInfo namespace FanModeSequence { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::FanControl::FanModeSequenceType; + using DecodableType = chip::app::Clusters::FanControl::FanModeSequenceType; + using DecodableArgType = chip::app::Clusters::FanControl::FanModeSequenceType; static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::FanModeSequence::Id; } @@ -23120,17 +23120,18 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::FanMode::TypeInfo::DecodableType fanMode = static_cast(0); - Attributes::FanModeSequence::TypeInfo::DecodableType fanModeSequence = static_cast(0); - Attributes::PercentSetting::TypeInfo::DecodableType percentSetting = static_cast(0); - Attributes::PercentCurrent::TypeInfo::DecodableType percentCurrent = static_cast(0); - Attributes::SpeedMax::TypeInfo::DecodableType speedMax = static_cast(0); - Attributes::SpeedSetting::TypeInfo::DecodableType speedSetting = static_cast(0); - Attributes::SpeedCurrent::TypeInfo::DecodableType speedCurrent = static_cast(0); - Attributes::RockSupport::TypeInfo::DecodableType rockSupport = static_cast(0); - Attributes::RockSetting::TypeInfo::DecodableType rockSetting = static_cast(0); - Attributes::WindSupport::TypeInfo::DecodableType windSupport = static_cast(0); - Attributes::WindSetting::TypeInfo::DecodableType windSetting = static_cast(0); + Attributes::FanMode::TypeInfo::DecodableType fanMode = static_cast(0); + Attributes::FanModeSequence::TypeInfo::DecodableType fanModeSequence = + static_cast(0); + Attributes::PercentSetting::TypeInfo::DecodableType percentSetting = static_cast(0); + Attributes::PercentCurrent::TypeInfo::DecodableType percentCurrent = static_cast(0); + Attributes::SpeedMax::TypeInfo::DecodableType speedMax = static_cast(0); + Attributes::SpeedSetting::TypeInfo::DecodableType speedSetting = static_cast(0); + Attributes::SpeedCurrent::TypeInfo::DecodableType speedCurrent = static_cast(0); + Attributes::RockSupport::TypeInfo::DecodableType rockSupport = static_cast(0); + Attributes::RockSetting::TypeInfo::DecodableType rockSetting = static_cast(0); + Attributes::WindSupport::TypeInfo::DecodableType windSupport = static_cast(0); + Attributes::WindSetting::TypeInfo::DecodableType windSetting = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 3afc6fff0f7d38..998312228b827f 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -10762,7 +10762,7 @@ class WriteFanControlFanMode : public WriteAttribute } private: - uint8_t mValue; + chip::app::Clusters::FanControl::FanModeType mValue; }; class WriteFanControlFanModeSequence : public WriteAttribute @@ -10789,7 +10789,7 @@ class WriteFanControlFanModeSequence : public WriteAttribute } private: - uint8_t mValue; + chip::app::Clusters::FanControl::FanModeSequenceType mValue; }; class WriteFanControlPercentSetting : public WriteAttribute 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 9af503087e9dfa..d8831e97eca6c9 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -6540,12 +6540,12 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP switch (path.mAttributeId) { case FanControl::Attributes::FanMode::Id: { - uint8_t value; + chip::app::Clusters::FanControl::FanModeType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("fan mode", 1, value); } case FanControl::Attributes::FanModeSequence::Id: { - uint8_t value; + chip::app::Clusters::FanControl::FanModeSequenceType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("fan mode sequence", 1, value); }