From 110479006e965e6d76e5221fed793bd1d1490d53 Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Thu, 8 Jun 2023 00:11:04 +0530 Subject: [PATCH] Sync temperature control clusters xml to spec (#27036) * Sync temperature control cluster to updated spec * Zap regen * Addressed review comments * Fixed darwin CI --- .../zcl/data-model/chip/chip-types.xml | 2 +- .../chip/temperature-control-cluster.xml | 21 +++----- .../data_model/controller-clusters.matter | 20 +++----- .../devicecontroller/ClusterIDMapping.java | 2 +- .../devicecontroller/ClusterReadMapping.java | 10 ++-- .../CHIPAttributeTLVValueDecoder.cpp | 33 ++---------- .../java/zap-generated/CHIPClientCallbacks.h | 4 +- .../java/zap-generated/CHIPReadCallbacks.cpp | 33 +----------- .../chip/devicecontroller/ChipClusters.java | 14 +++--- .../chip/devicecontroller/ChipIdLookup.java | 2 +- .../chip/devicecontroller/ChipStructs.java | 27 ---------- .../devicecontroller/ClusterInfoMapping.java | 4 +- .../python/chip/clusters/CHIPClusters.py | 4 +- .../python/chip/clusters/Objects.py | 29 +++-------- .../MTRAttributeSpecifiedCheck.mm | 2 +- .../MTRAttributeTLVValueDecoder.mm | 12 ++--- .../CHIP/zap-generated/MTRBaseClusters.h | 25 +++++----- .../CHIP/zap-generated/MTRBaseClusters.mm | 29 ++++++----- .../CHIP/zap-generated/MTRCallbackBridge.h | 8 +-- .../CHIP/zap-generated/MTRCallbackBridge.mm | 13 ++--- .../CHIP/zap-generated/MTRClusterConstants.h | 2 +- .../CHIP/zap-generated/MTRClusters.h | 2 +- .../CHIP/zap-generated/MTRClusters.mm | 12 ++--- .../CHIP/zap-generated/MTRStructsObjc.h | 6 --- .../CHIP/zap-generated/MTRStructsObjc.mm | 31 ------------ .../zap-generated/attributes/Accessors.cpp | 12 ++--- .../zap-generated/attributes/Accessors.h | 12 ++--- .../app-common/zap-generated/cluster-enums.h | 1 + .../zap-generated/cluster-objects.cpp | 50 +------------------ .../zap-generated/cluster-objects.h | 49 ++++-------------- .../app-common/zap-generated/ids/Attributes.h | 4 +- .../zap-generated/cluster/Commands.h | 13 +++-- .../cluster/ComplexArgumentParser.cpp | 32 ------------ .../cluster/ComplexArgumentParser.h | 6 --- .../cluster/logging/DataModelLogger.cpp | 34 ++----------- .../cluster/logging/DataModelLogger.h | 3 -- .../zap-generated/cluster/Commands.h | 34 ++++++------- 37 files changed, 150 insertions(+), 447 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/chip-types.xml b/src/app/zap-templates/zcl/data-model/chip/chip-types.xml index e50f51f6fd9a18..2e8f2bf400fae2 100644 --- a/src/app/zap-templates/zcl/data-model/chip/chip-types.xml +++ b/src/app/zap-templates/zcl/data-model/chip/chip-types.xml @@ -65,7 +65,7 @@ limitations under the License. - + diff --git a/src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml index bc0a44e2de551c..e6c8cabb1b3979 100644 --- a/src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml @@ -17,12 +17,6 @@ limitations under the License. - - - - - - Temperature Control Appliances @@ -31,16 +25,16 @@ limitations under the License. TEMPERATURE_CONTROL_CLUSTER true true - TemperatureSetpoint - MinTemperature - MaxTemperature - Step - CurrentTemperatureLevelIndex - SupportedTemperatureLevels + TemperatureSetpoint + MinTemperature + MaxTemperature + Step + SelectedTemperatureLevel + SupportedTemperatureLevels Set Temperature - + @@ -48,5 +42,6 @@ limitations under the License. + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 180be3a667215a..4558af906a6193 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3081,19 +3081,15 @@ client cluster TemperatureControl = 86 { bitmap Feature : BITMAP32 { kTemperatureNumber = 0x1; kTemperatureLevel = 0x2; + kTemperatureStep = 0x4; } - struct TemperatureLevelStruct { - char_string<64> label = 0; - int8u temperatureLevel = 1; - } - - readonly attribute optional int16s temperatureSetpoint = 0; - readonly attribute optional int16s minTemperature = 1; - readonly attribute optional int16s maxTemperature = 2; - readonly attribute optional int16s step = 3; - readonly attribute optional int8u currentTemperatureLevelIndex = 4; - readonly attribute optional TemperatureLevelStruct supportedTemperatureLevels[] = 5; + readonly attribute optional temperature temperatureSetpoint = 0; + readonly attribute optional temperature minTemperature = 1; + readonly attribute optional temperature maxTemperature = 2; + readonly attribute optional temperature step = 3; + readonly attribute optional int8u selectedTemperatureLevel = 4; + readonly attribute optional char_string supportedTemperatureLevels[] = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3102,7 +3098,7 @@ client cluster TemperatureControl = 86 { readonly attribute int16u clusterRevision = 65533; request struct SetTemperatureRequest { - optional INT16S targetTemperature = 0; + optional temperature targetTemperature = 0; optional INT8U targetTemperatureLevel = 1; } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 83714b747ae65e..3aba2a39faee22 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -6905,7 +6905,7 @@ public enum Attribute { MinTemperature(1L), MaxTemperature(2L), Step(3L), - CurrentTemperatureLevelIndex(4L), + SelectedTemperatureLevel(4L), SupportedTemperatureLevels(5L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 89f5815615e758..d8c4a3b602e0a8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -6601,17 +6601,17 @@ private static Map readTemperatureControlInteractionInf readTemperatureControlStepCommandParams ); result.put("readStepAttribute", readTemperatureControlStepAttributeInteractionInfo); - Map readTemperatureControlCurrentTemperatureLevelIndexCommandParams = new LinkedHashMap(); - InteractionInfo readTemperatureControlCurrentTemperatureLevelIndexAttributeInteractionInfo = new InteractionInfo( + Map readTemperatureControlSelectedTemperatureLevelCommandParams = new LinkedHashMap(); + InteractionInfo readTemperatureControlSelectedTemperatureLevelAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.TemperatureControlCluster) cluster).readCurrentTemperatureLevelIndexAttribute( + ((ChipClusters.TemperatureControlCluster) cluster).readSelectedTemperatureLevelAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readTemperatureControlCurrentTemperatureLevelIndexCommandParams + readTemperatureControlSelectedTemperatureLevelCommandParams ); - result.put("readCurrentTemperatureLevelIndexAttribute", readTemperatureControlCurrentTemperatureLevelIndexAttributeInteractionInfo); + result.put("readSelectedTemperatureLevelAttribute", readTemperatureControlSelectedTemperatureLevelAttributeInteractionInfo); Map readTemperatureControlSupportedTemperatureLevelsCommandParams = new LinkedHashMap(); InteractionInfo readTemperatureControlSupportedTemperatureLevelsAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 535f5cda1d496d..47dff634f91e19 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -13579,8 +13579,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR cppValue, value); return value; } - case Attributes::CurrentTemperatureLevelIndex::Id: { - using TypeInfo = Attributes::CurrentTemperatureLevelIndex::TypeInfo; + case Attributes::SelectedTemperatureLevel::Id: { + using TypeInfo = Attributes::SelectedTemperatureLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -13610,34 +13610,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_temperatureLevel; - std::string newElement_0_temperatureLevelClassName = "java/lang/Integer"; - std::string newElement_0_temperatureLevelCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_temperatureLevelClassName.c_str(), newElement_0_temperatureLevelCtorSignature.c_str(), - entry_0.temperatureLevel, newElement_0_temperatureLevel); - - jclass temperatureLevelStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$TemperatureControlClusterTemperatureLevelStruct", - temperatureLevelStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$TemperatureControlClusterTemperatureLevelStruct"); - return nullptr; - } - jmethodID temperatureLevelStructStructCtor_1 = - env->GetMethodID(temperatureLevelStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;)V"); - if (temperatureLevelStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$TemperatureControlClusterTemperatureLevelStruct constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(temperatureLevelStructStructClass_1, temperatureLevelStructStructCtor_1, - newElement_0_label, newElement_0_temperatureLevel); + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; diff --git a/src/controller/java/zap-generated/CHIPClientCallbacks.h b/src/controller/java/zap-generated/CHIPClientCallbacks.h index 3ae402e247fbf8..a5808161415452 100644 --- a/src/controller/java/zap-generated/CHIPClientCallbacks.h +++ b/src/controller/java/zap-generated/CHIPClientCallbacks.h @@ -525,9 +525,7 @@ typedef void (*RvcCleanModeSelectEventListListAttributeCallback)(void * context, typedef void (*RvcCleanModeSelectAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureControlSupportedTemperatureLevelsListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType> & data); + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureControlAcceptedCommandListListAttributeCallback)( diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 203393beea1acd..774cbf32c16040 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -22630,9 +22630,7 @@ CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: } void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType> & list) + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22661,34 +22659,7 @@ void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::Callback { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_temperatureLevel; - std::string newElement_0_temperatureLevelClassName = "java/lang/Integer"; - std::string newElement_0_temperatureLevelCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_temperatureLevelClassName.c_str(), - newElement_0_temperatureLevelCtorSignature.c_str(), - entry_0.temperatureLevel, newElement_0_temperatureLevel); - - jclass temperatureLevelStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$TemperatureControlClusterTemperatureLevelStruct", - temperatureLevelStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$TemperatureControlClusterTemperatureLevelStruct"); - return; - } - jmethodID temperatureLevelStructStructCtor_1 = - env->GetMethodID(temperatureLevelStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;)V"); - if (temperatureLevelStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$TemperatureControlClusterTemperatureLevelStruct constructor"); - return; - } - - newElement_0 = env->NewObject(temperatureLevelStructStructClass_1, temperatureLevelStructStructCtor_1, newElement_0_label, - newElement_0_temperatureLevel); + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index ab5668bb585a8a..b62e96836d53b8 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -14975,7 +14975,7 @@ public TemperatureControlCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface SupportedTemperatureLevelsAttributeCallback { - void onSuccess( List valueList); + void onSuccess( List valueList); void onError(Exception ex); default void onSubscriptionEstablished(long subscriptionId) {} } @@ -15048,16 +15048,16 @@ public void subscribeStepAttribute( subscribeStepAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readCurrentTemperatureLevelIndexAttribute( + public void readSelectedTemperatureLevelAttribute( IntegerAttributeCallback callback ) { - readCurrentTemperatureLevelIndexAttribute(chipClusterPtr, callback); + readSelectedTemperatureLevelAttribute(chipClusterPtr, callback); } - public void subscribeCurrentTemperatureLevelIndexAttribute( + public void subscribeSelectedTemperatureLevelAttribute( IntegerAttributeCallback callback , int minInterval, int maxInterval) { - subscribeCurrentTemperatureLevelIndexAttribute(chipClusterPtr, callback, minInterval, maxInterval); + subscribeSelectedTemperatureLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); } public void readSupportedTemperatureLevelsAttribute( @@ -15172,10 +15172,10 @@ private native void subscribeStepAttribute(long chipClusterPtr, IntegerAttributeCallback callback , int minInterval, int maxInterval); - private native void readCurrentTemperatureLevelIndexAttribute(long chipClusterPtr, + private native void readSelectedTemperatureLevelAttribute(long chipClusterPtr, IntegerAttributeCallback callback ); - private native void subscribeCurrentTemperatureLevelIndexAttribute(long chipClusterPtr, + private native void subscribeSelectedTemperatureLevelAttribute(long chipClusterPtr, IntegerAttributeCallback callback , int minInterval, int maxInterval); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java index b5196f7354ddb3..078e1d5d0d67c0 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java @@ -2326,7 +2326,7 @@ public static String attributeIdToName(long clusterId, long attributeId) { return "Step"; } if (attributeId == 4L) { - return "CurrentTemperatureLevelIndex"; + return "SelectedTemperatureLevel"; } if (attributeId == 5L) { return "SupportedTemperatureLevels"; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java index de619991e18f49..b5294f94e6054b 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java @@ -1872,33 +1872,6 @@ public String toString() { } } -public static class TemperatureControlClusterTemperatureLevelStruct { -public String label; -public Integer temperatureLevel; - - public TemperatureControlClusterTemperatureLevelStruct( - String label - , Integer temperatureLevel - ) { - this.label = label; - this.temperatureLevel = temperatureLevel; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("TemperatureControlClusterTemperatureLevelStruct {\n"); - output.append("\tlabel: "); - output.append(label); - output.append("\n"); - output.append("\ttemperatureLevel: "); - output.append(temperatureLevel); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } -} - public static class DishwasherModeSelectClusterModeTagStruct { public Optional mfgCode; public Integer value; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 79c3ce862aaa5d..eebf23dccb47d3 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -6569,9 +6569,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( List valueList) { + public void onSuccess( List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 18e277d585efc6..9ad074bf2310bc 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -4763,7 +4763,7 @@ class ChipClusters: "reportable": True, }, 0x00000004: { - "attributeName": "CurrentTemperatureLevelIndex", + "attributeName": "SelectedTemperatureLevel", "attributeId": 0x00000004, "type": "int", "reportable": True, @@ -4771,7 +4771,7 @@ class ChipClusters: 0x00000005: { "attributeName": "SupportedTemperatureLevels", "attributeId": 0x00000005, - "type": "", + "type": "str", "reportable": True, }, 0x0000FFF8: { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 895dc2e2ea1ce4..84f8f747d62424 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -16474,8 +16474,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="minTemperature", Tag=0x00000001, Type=typing.Optional[int]), ClusterObjectFieldDescriptor(Label="maxTemperature", Tag=0x00000002, Type=typing.Optional[int]), ClusterObjectFieldDescriptor(Label="step", Tag=0x00000003, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="currentTemperatureLevelIndex", Tag=0x00000004, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="supportedTemperatureLevels", Tag=0x00000005, Type=typing.Optional[typing.List[TemperatureControl.Structs.TemperatureLevelStruct]]), + ClusterObjectFieldDescriptor(Label="selectedTemperatureLevel", Tag=0x00000004, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="supportedTemperatureLevels", Tag=0x00000005, Type=typing.Optional[typing.List[str]]), 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]), @@ -16488,8 +16488,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: minTemperature: 'typing.Optional[int]' = None maxTemperature: 'typing.Optional[int]' = None step: 'typing.Optional[int]' = None - currentTemperatureLevelIndex: 'typing.Optional[uint]' = None - supportedTemperatureLevels: 'typing.Optional[typing.List[TemperatureControl.Structs.TemperatureLevelStruct]]' = None + selectedTemperatureLevel: 'typing.Optional[uint]' = None + supportedTemperatureLevels: 'typing.Optional[typing.List[str]]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -16501,20 +16501,7 @@ class Bitmaps: class Feature(IntFlag): kTemperatureNumber = 0x1 kTemperatureLevel = 0x2 - - class Structs: - @dataclass - class TemperatureLevelStruct(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="temperatureLevel", Tag=1, Type=uint), - ]) - - label: 'str' = "" - temperatureLevel: 'uint' = 0 + kTemperatureStep = 0x4 class Commands: @dataclass @@ -16601,7 +16588,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[int]' = None @dataclass - class CurrentTemperatureLevelIndex(ClusterAttributeDescriptor): + class SelectedTemperatureLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0056 @@ -16628,9 +16615,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[TemperatureControl.Structs.TemperatureLevelStruct]]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[str]]) - value: 'typing.Optional[typing.List[TemperatureControl.Structs.TemperatureLevelStruct]]' = None + value: 'typing.Optional[typing.List[str]]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index edd5f9db5f7278..eda4dd98d6eb93 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -1818,7 +1818,7 @@ static BOOL AttributeIsSpecifiedInTemperatureControlCluster(AttributeId aAttribu case Attributes::Step::Id: { return YES; } - case Attributes::CurrentTemperatureLevelIndex::Id: { + case Attributes::SelectedTemperatureLevel::Id: { return YES; } case Attributes::SupportedTemperatureLevels::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 9bbd9275e0703f..746864f1f98bd6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -9313,8 +9313,8 @@ static id _Nullable DecodeAttributeValueForTemperatureControlCluster( value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::CurrentTemperatureLevelIndex::Id: { - using TypeInfo = Attributes::CurrentTemperatureLevelIndex::TypeInfo; + case Attributes::SelectedTemperatureLevel::Id: { + using TypeInfo = Attributes::SelectedTemperatureLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -9337,15 +9337,13 @@ static id _Nullable DecodeAttributeValueForTemperatureControlCluster( auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRTemperatureControlClusterTemperatureLevelStruct * newElement_0; - newElement_0 = [MTRTemperatureControlClusterTemperatureLevelStruct new]; - newElement_0.label = AsString(entry_0.label); - if (newElement_0.label == nil) { + NSString * newElement_0; + newElement_0 = AsString(entry_0); + if (newElement_0 == nil) { CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; *aError = err; return nil; } - newElement_0.temperatureLevel = [NSNumber numberWithUnsignedChar:entry_0.temperatureLevel]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 383eca64111dbb..3fd9cfc10a94a5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -7978,19 +7978,17 @@ MTR_NEWLY_AVAILABLE completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentTemperatureLevelIndexWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeCurrentTemperatureLevelIndexWithParams:(MTRSubscribeParams *)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeCurrentTemperatureLevelIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; +- (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSelectedTemperatureLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)readAttributeSupportedTemperatureLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; @@ -31590,6 +31588,7 @@ typedef NS_OPTIONS(uint32_t, MTRModeSelectFeature) { typedef NS_OPTIONS(uint32_t, MTRTemperatureControlFeature) { MTRTemperatureControlFeatureTemperatureNumber MTR_NEWLY_AVAILABLE = 0x1, MTRTemperatureControlFeatureTemperatureLevel MTR_NEWLY_AVAILABLE = 0x2, + MTRTemperatureControlFeatureTemperatureStep MTR_NEWLY_AVAILABLE = 0x4, } MTR_NEWLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRRefrigeratorAlarmAlarmMap) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 6976a94654921f..aff65ee53c06cf 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -48115,39 +48115,38 @@ + (void)readAttributeStepWithClusterStateCache:(MTRClusterStateCacheContainer *) }); } -- (void)readAttributeCurrentTemperatureLevelIndexWithCompletion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion +- (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = TemperatureControl::Attributes::CurrentTemperatureLevelIndex::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeCurrentTemperatureLevelIndexWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::CurrentTemperatureLevelIndex::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeCurrentTemperatureLevelIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion ++ (void)readAttributeSelectedTemperatureLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + 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) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureControl::Attributes::CurrentTemperatureLevelIndex::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index 8b5a2b53e5f0b9..5100d30a14de2f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -1600,9 +1600,7 @@ typedef void (*ModeSelectEventListListAttributeCallback)(void * context, typedef void (*ModeSelectAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureControlSupportedTemperatureLevelsListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType> & data); + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureControlAcceptedCommandListListAttributeCallback)( @@ -9442,9 +9440,7 @@ class MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType> & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; class MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackSubscriptionBridge diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index dbd8cefc120ea2..e52902cfb14d58 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -8219,9 +8219,8 @@ } } -void MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType> & value) +void MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8229,15 +8228,13 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRTemperatureControlClusterTemperatureLevelStruct * newElement_0; - newElement_0 = [MTRTemperatureControlClusterTemperatureLevelStruct new]; - newElement_0.label = AsString(entry_0.label); - if (newElement_0.label == nil) { + NSString * newElement_0; + newElement_0 = AsString(entry_0); + if (newElement_0 == nil) { CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; OnFailureFn(context, err); return; } - newElement_0.temperatureLevel = [NSNumber numberWithUnsignedChar:entry_0.temperatureLevel]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index e37b541b6ce51a..20a39e1588c8bc 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -3773,7 +3773,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID MTR_NEWLY_AVAILABLE = 0x00000001, MTRAttributeIDTypeClusterTemperatureControlAttributeMaxTemperatureID MTR_NEWLY_AVAILABLE = 0x00000002, MTRAttributeIDTypeClusterTemperatureControlAttributeStepID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterTemperatureControlAttributeCurrentTemperatureLevelIndexID MTR_NEWLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID MTR_NEWLY_AVAILABLE = 0x00000004, MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID MTR_NEWLY_AVAILABLE = 0x00000005, MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 96048903892293..d69d473010188f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -2832,7 +2832,7 @@ MTR_NEWLY_AVAILABLE - (NSDictionary *)readAttributeStepWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (NSDictionary *)readAttributeCurrentTemperatureLevelIndexWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeSupportedTemperatureLevelsWithParams:(MTRReadParams * _Nullable)params diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index d9333adcdee85d..3f7ec092b4c427 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -13103,13 +13103,13 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara params:params]; } -- (NSDictionary *)readAttributeCurrentTemperatureLevelIndexWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary *)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device - readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeTemperatureControlID) - attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeCurrentTemperatureLevelIndexID) - params:params]; + return + [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTemperatureControlID) + attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID) + params:params]; } - (NSDictionary *)readAttributeSupportedTemperatureLevelsWithParams:(MTRReadParams * _Nullable)params diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 273577b1546130..887d42ef46f921 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -701,12 +701,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSArray * _Nonnull modeTags MTR_NEWLY_AVAILABLE; @end -MTR_NEWLY_AVAILABLE -@interface MTRTemperatureControlClusterTemperatureLevelStruct : NSObject -@property (nonatomic, copy) NSString * _Nonnull label MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull temperatureLevel MTR_NEWLY_AVAILABLE; -@end - MTR_NEWLY_AVAILABLE @interface MTRRefrigeratorAlarmClusterNotifyEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull active MTR_NEWLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 92ccd0729578cc..bf580af8e4608b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -2686,37 +2686,6 @@ - (NSString *)description @end -@implementation MTRTemperatureControlClusterTemperatureLevelStruct -- (instancetype)init -{ - if (self = [super init]) { - - _label = @""; - - _temperatureLevel = @(0); - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRTemperatureControlClusterTemperatureLevelStruct alloc] init]; - - other.label = self.label; - other.temperatureLevel = self.temperatureLevel; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString - stringWithFormat:@"<%@: label:%@; temperatureLevel:%@; >", NSStringFromClass([self class]), _label, _temperatureLevel]; - return descriptionString; -} - -@end - @implementation MTRRefrigeratorAlarmClusterNotifyEvent - (instancetype)init { 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 b97be5c7d12f6b..94c4d7a5a041ed 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 @@ -8221,7 +8221,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace TemperatureSetpoint @@ -8252,7 +8252,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace MinTemperature @@ -8283,7 +8283,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace MaxTemperature @@ -8314,12 +8314,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace Step -namespace CurrentTemperatureLevelIndex { +namespace SelectedTemperatureLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { @@ -8348,7 +8348,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace CurrentTemperatureLevelIndex +} // namespace SelectedTemperatureLevel namespace FeatureMap { 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 3ed6ac79097601..bbd44fd1f89b06 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 @@ -1546,29 +1546,29 @@ namespace TemperatureControl { namespace Attributes { namespace TemperatureSetpoint { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace TemperatureSetpoint namespace MinTemperature { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace MinTemperature namespace MaxTemperature { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace MaxTemperature namespace Step { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace Step -namespace CurrentTemperatureLevelIndex { +namespace SelectedTemperatureLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -} // namespace CurrentTemperatureLevelIndex +} // namespace SelectedTemperatureLevel namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 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 50abe0577f9a3e..5b858e42964342 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 @@ -1636,6 +1636,7 @@ enum class Feature : uint32_t { kTemperatureNumber = 0x1, kTemperatureLevel = 0x2, + kTemperatureStep = 0x4, }; } // namespace TemperatureControl diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index fd477e9981f522..66c8b63bfdbce5 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -12188,52 +12188,6 @@ namespace Events {} // namespace Events } // namespace RvcCleanModeSelect namespace TemperatureControl { -namespace Structs { -namespace TemperatureLevelStruct { -CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kLabel), label)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTemperatureLevel), temperatureLevel)); - ReturnErrorOnFailure(writer.EndContainer(outer)); - return CHIP_NO_ERROR; -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVType outer; - VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - err = reader.EnterContainer(outer); - ReturnErrorOnFailure(err); - while ((err = reader.Next()) == CHIP_NO_ERROR) - { - if (!TLV::IsContextTag(reader.GetTag())) - { - continue; - } - switch (TLV::TagNumFromTag(reader.GetTag())) - { - case to_underlying(Fields::kLabel): - ReturnErrorOnFailure(DataModel::Decode(reader, label)); - break; - case to_underlying(Fields::kTemperatureLevel): - ReturnErrorOnFailure(DataModel::Decode(reader, temperatureLevel)); - break; - default: - break; - } - } - - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(reader.ExitContainer(outer)); - - return CHIP_NO_ERROR; -} - -} // namespace TemperatureLevelStruct -} // namespace Structs namespace Commands { namespace SetTemperature { @@ -12296,8 +12250,8 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre case Attributes::Step::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, step)); break; - case Attributes::CurrentTemperatureLevelIndex::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, currentTemperatureLevelIndex)); + case Attributes::SelectedTemperatureLevel::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, selectedTemperatureLevel)); break; case Attributes::SupportedTemperatureLevels::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, supportedTemperatureLevels)); 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 ac48d43c4184fc..33a77ff33b5ac7 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 @@ -15306,31 +15306,6 @@ struct TypeInfo } // namespace Attributes } // namespace RvcCleanModeSelect namespace TemperatureControl { -namespace Structs { -namespace TemperatureLevelStruct { -enum class Fields : uint8_t -{ - kLabel = 0, - kTemperatureLevel = 1, -}; - -struct Type -{ -public: - chip::CharSpan label; - uint8_t temperatureLevel = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; -}; - -using DecodableType = Type; - -} // namespace TemperatureLevelStruct -} // namespace Structs namespace Commands { // Forward-declarations so we can reference these later. @@ -15430,7 +15405,7 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Step -namespace CurrentTemperatureLevelIndex { +namespace SelectedTemperatureLevel { struct TypeInfo { using Type = uint8_t; @@ -15438,18 +15413,16 @@ struct TypeInfo using DecodableArgType = uint8_t; static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentTemperatureLevelIndex::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SelectedTemperatureLevel::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentTemperatureLevelIndex +} // namespace SelectedTemperatureLevel namespace SupportedTemperatureLevels { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList< - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType>; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType> &; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SupportedTemperatureLevels::Id; } @@ -15501,11 +15474,11 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::TemperatureSetpoint::TypeInfo::DecodableType temperatureSetpoint = static_cast(0); - Attributes::MinTemperature::TypeInfo::DecodableType minTemperature = static_cast(0); - Attributes::MaxTemperature::TypeInfo::DecodableType maxTemperature = static_cast(0); - Attributes::Step::TypeInfo::DecodableType step = static_cast(0); - Attributes::CurrentTemperatureLevelIndex::TypeInfo::DecodableType currentTemperatureLevelIndex = static_cast(0); + Attributes::TemperatureSetpoint::TypeInfo::DecodableType temperatureSetpoint = static_cast(0); + Attributes::MinTemperature::TypeInfo::DecodableType minTemperature = static_cast(0); + Attributes::MaxTemperature::TypeInfo::DecodableType maxTemperature = static_cast(0); + Attributes::Step::TypeInfo::DecodableType step = static_cast(0); + Attributes::SelectedTemperatureLevel::TypeInfo::DecodableType selectedTemperatureLevel = static_cast(0); Attributes::SupportedTemperatureLevels::TypeInfo::DecodableType supportedTemperatureLevels; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 11da751d55b1ab..7146487d4e8143 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -2686,9 +2686,9 @@ namespace Step { static constexpr AttributeId Id = 0x00000003; } // namespace Step -namespace CurrentTemperatureLevelIndex { +namespace SelectedTemperatureLevel { static constexpr AttributeId Id = 0x00000004; -} // namespace CurrentTemperatureLevelIndex +} // namespace SelectedTemperatureLevel namespace SupportedTemperatureLevels { static constexpr AttributeId Id = 0x00000005; diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index bf23ae01800f1c..c872cde3bd1db9 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -4463,7 +4463,7 @@ class RvcCleanModeSelectChangeToModeWithStatus : public ClusterCommand | * MinTemperature | 0x0001 | | * MaxTemperature | 0x0002 | | * Step | 0x0003 | -| * CurrentTemperatureLevelIndex | 0x0004 | +| * SelectedTemperatureLevel | 0x0004 | | * SupportedTemperatureLevels | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | @@ -14972,7 +14972,7 @@ void registerClusterTemperatureControl(Commands & commands, CredentialIssuerComm make_unique(Id, "min-temperature", Attributes::MinTemperature::Id, credsIssuerConfig), // make_unique(Id, "max-temperature", Attributes::MaxTemperature::Id, credsIssuerConfig), // make_unique(Id, "step", Attributes::Step::Id, credsIssuerConfig), // - make_unique(Id, "current-temperature-level-index", Attributes::CurrentTemperatureLevelIndex::Id, + make_unique(Id, "selected-temperature-level", Attributes::SelectedTemperatureLevel::Id, credsIssuerConfig), // make_unique(Id, "supported-temperature-levels", Attributes::SupportedTemperatureLevels::Id, credsIssuerConfig), // @@ -14991,11 +14991,10 @@ void registerClusterTemperatureControl(Commands & commands, CredentialIssuerComm WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "step", INT16_MIN, INT16_MAX, Attributes::Step::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-temperature-level-index", 0, UINT8_MAX, - Attributes::CurrentTemperatureLevelIndex::Id, WriteCommandType::kForceWrite, + make_unique>(Id, "selected-temperature-level", 0, UINT8_MAX, + Attributes::SelectedTemperatureLevel::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( + make_unique>>( Id, "supported-temperature-levels", Attributes::SupportedTemperatureLevels::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( @@ -15016,7 +15015,7 @@ void registerClusterTemperatureControl(Commands & commands, CredentialIssuerComm make_unique(Id, "min-temperature", Attributes::MinTemperature::Id, credsIssuerConfig), // make_unique(Id, "max-temperature", Attributes::MaxTemperature::Id, credsIssuerConfig), // make_unique(Id, "step", Attributes::Step::Id, credsIssuerConfig), // - make_unique(Id, "current-temperature-level-index", Attributes::CurrentTemperatureLevelIndex::Id, + make_unique(Id, "selected-temperature-level", Attributes::SelectedTemperatureLevel::Id, credsIssuerConfig), // make_unique(Id, "supported-temperature-levels", Attributes::SupportedTemperatureLevels::Id, credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 849442fdbffa8d..120444bbebbb8b 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -1903,38 +1903,6 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::IcdManagement::Structs ComplexArgumentParser::Finalize(request.fabricIndex); } -CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::Type & request, - Json::Value & value) -{ - VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - - // Copy to track which members we already processed. - Json::Value valueCopy(value); - - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("TemperatureLevelStruct.label", "label", value.isMember("label"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TemperatureLevelStruct.temperatureLevel", "temperatureLevel", - value.isMember("temperatureLevel"))); - - char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "label"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.label, value["label"])); - valueCopy.removeMember("label"); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "temperatureLevel"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.temperatureLevel, value["temperatureLevel"])); - valueCopy.removeMember("temperatureLevel"); - - return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); -} - -void ComplexArgumentParser::Finalize(chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::Type & request) -{ - ComplexArgumentParser::Finalize(request.label); - ComplexArgumentParser::Finalize(request.temperatureLevel); -} - CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::Type & request, Json::Value & value) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index 61db5819122d9e..dea2397ae70c89 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -234,12 +234,6 @@ static CHIP_ERROR Setup(const char * label, static void Finalize(chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::Type & request); -static CHIP_ERROR Setup(const char * label, - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::Type & request, - Json::Value & value); - -static void Finalize(chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::Type & request); - static CHIP_ERROR Setup(const char * label, chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::Type & request, Json::Value & value); 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 9ed92e181f3f63..ca99eecaf58b0c 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -1719,32 +1719,6 @@ DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR -DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - { - CHIP_ERROR err = LogValue("Label", indent + 1, value.label); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Label'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("TemperatureLevel", indent + 1, value.temperatureLevel); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TemperatureLevel'"); - return err; - } - } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::DecodableType & value) { @@ -8097,15 +8071,13 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("Step", 1, value); } - case TemperatureControl::Attributes::CurrentTemperatureLevelIndex::Id: { + case TemperatureControl::Attributes::SelectedTemperatureLevel::Id: { uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentTemperatureLevelIndex", 1, value); + return DataModelLogger::LogValue("SelectedTemperatureLevel", 1, value); } case TemperatureControl::Attributes::SupportedTemperatureLevels::Id: { - chip::app::DataModel::DecodableList< - chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType> - value; + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SupportedTemperatureLevels", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index cca6783f5e873e..5199662816d440 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -147,9 +147,6 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::DecodableType & value); - static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::DecodableType & value); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 2b706ed96795e2..38bc590766d530 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -40652,7 +40652,7 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { | * MinTemperature | 0x0001 | | * MaxTemperature | 0x0002 | | * Step | 0x0003 | -| * CurrentTemperatureLevelIndex | 0x0004 | +| * SelectedTemperatureLevel | 0x0004 | | * SupportedTemperatureLevels | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | @@ -41001,16 +41001,16 @@ class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { }; /* - * Attribute CurrentTemperatureLevelIndex + * Attribute SelectedTemperatureLevel */ -class ReadTemperatureControlCurrentTemperatureLevelIndex : public ReadAttribute { +class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { public: - ReadTemperatureControlCurrentTemperatureLevelIndex() - : ReadAttribute("current-temperature-level-index") + ReadTemperatureControlSelectedTemperatureLevel() + : ReadAttribute("selected-temperature-level") { } - ~ReadTemperatureControlCurrentTemperatureLevelIndex() {} + ~ReadTemperatureControlSelectedTemperatureLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { @@ -41020,10 +41020,10 @@ class ReadTemperatureControlCurrentTemperatureLevelIndex : public ReadAttribute __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentTemperatureLevelIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.CurrentTemperatureLevelIndex response %@", [value description]); + [cluster readAttributeSelectedTemperatureLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); if (error != nil) { - LogNSError("TemperatureControl CurrentTemperatureLevelIndex read Error", error); + LogNSError("TemperatureControl SelectedTemperatureLevel read Error", error); } SetCommandExitStatus(error); }]; @@ -41031,14 +41031,14 @@ class ReadTemperatureControlCurrentTemperatureLevelIndex : public ReadAttribute } }; -class SubscribeAttributeTemperatureControlCurrentTemperatureLevelIndex : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlCurrentTemperatureLevelIndex() - : SubscribeAttribute("current-temperature-level-index") + SubscribeAttributeTemperatureControlSelectedTemperatureLevel() + : SubscribeAttribute("selected-temperature-level") { } - ~SubscribeAttributeTemperatureControlCurrentTemperatureLevelIndex() {} + ~SubscribeAttributeTemperatureControlSelectedTemperatureLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { @@ -41057,12 +41057,12 @@ class SubscribeAttributeTemperatureControlCurrentTemperatureLevelIndex : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentTemperatureLevelIndexWithParams:params + [cluster subscribeAttributeSelectedTemperatureLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.CurrentTemperatureLevelIndex response %@", [value description]); + NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); SetCommandExitStatus(error); }]; @@ -161743,8 +161743,8 @@ void registerClusterTemperatureControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), //