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 684c8e25c43edb..bc0a44e2de551c 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 @@ -20,7 +20,7 @@ limitations under the License. - + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 562f33d567771d..41d26fe518c921 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2781,7 +2781,7 @@ client cluster TemperatureControl = 86 { struct TemperatureLevelStruct { char_string<64> label = 0; - int8u tempLevel = 1; + int8u temperatureLevel = 1; } readonly attribute optional int16s temperatureSetpoint = 0; diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index ca6bffdeeb7eeb..7be3283863d9c3 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -12271,12 +12271,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0; jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_tempLevel; - std::string newElement_0_tempLevelClassName = "java/lang/Integer"; - std::string newElement_0_tempLevelCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_tempLevelClassName.c_str(), - newElement_0_tempLevelCtorSignature.c_str(), - entry_0.tempLevel, newElement_0_tempLevel); + 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( @@ -12296,7 +12296,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } newElement_0 = env->NewObject(temperatureLevelStructStructClass_1, temperatureLevelStructStructCtor_1, - newElement_0_label, newElement_0_tempLevel); + newElement_0_label, newElement_0_temperatureLevel); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 4fb2f30cf7079e..6148aafab3ad87 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -20297,12 +20297,12 @@ void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::Callback jobject newElement_0; jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_tempLevel; - std::string newElement_0_tempLevelClassName = "java/lang/Integer"; - std::string newElement_0_tempLevelCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_tempLevelClassName.c_str(), - newElement_0_tempLevelCtorSignature.c_str(), - entry_0.tempLevel, newElement_0_tempLevel); + 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( @@ -20322,7 +20322,7 @@ void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::Callback } newElement_0 = env->NewObject(temperatureLevelStructStructClass_1, temperatureLevelStructStructCtor_1, newElement_0_label, - newElement_0_tempLevel); + newElement_0_temperatureLevel); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java index 9b03b8e8d2b064..2e3c03514c24b4 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java @@ -1520,11 +1520,11 @@ public String toString() { public static class TemperatureControlClusterTemperatureLevelStruct { public String label; - public Integer tempLevel; + public Integer temperatureLevel; - public TemperatureControlClusterTemperatureLevelStruct(String label, Integer tempLevel) { + public TemperatureControlClusterTemperatureLevelStruct(String label, Integer temperatureLevel) { this.label = label; - this.tempLevel = tempLevel; + this.temperatureLevel = temperatureLevel; } @Override @@ -1534,8 +1534,8 @@ public String toString() { output.append("\tlabel: "); output.append(label); output.append("\n"); - output.append("\ttempLevel: "); - output.append(tempLevel); + output.append("\ttemperatureLevel: "); + output.append(temperatureLevel); output.append("\n"); output.append("}\n"); return output.toString(); diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index c522a4f4ff4d33..66dacdafb98862 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -4346,6 +4346,94 @@ class ChipClusters: }, }, } + _TEMPERATURE_CONTROL_CLUSTER_INFO = { + "clusterName": "TemperatureControl", + "clusterId": 0x00000056, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "SetTemperature", + "args": { + "targetTemperature": "int", + "targetTemperatureLevel": "int", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "TemperatureSetpoint", + "attributeId": 0x00000000, + "type": "int", + "reportable": True, + }, + 0x00000001: { + "attributeName": "MinTemperature", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + }, + 0x00000002: { + "attributeName": "MaxTemperature", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + }, + 0x00000003: { + "attributeName": "Step", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + }, + 0x00000004: { + "attributeName": "CurrentTemperatureLevelIndex", + "attributeId": 0x00000004, + "type": "int", + "reportable": True, + }, + 0x00000005: { + "attributeName": "SupportedTemperatureLevels", + "attributeId": 0x00000005, + "type": "", + "reportable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } _AIR_QUALITY_CLUSTER_INFO = { "clusterName": "AirQuality", "clusterId": 0x0000005B, @@ -10818,6 +10906,7 @@ class ChipClusters: 0x00000045: _BOOLEAN_STATE_CLUSTER_INFO, 0x00000046: _ICD_MANAGEMENT_CLUSTER_INFO, 0x00000050: _MODE_SELECT_CLUSTER_INFO, + 0x00000056: _TEMPERATURE_CONTROL_CLUSTER_INFO, 0x0000005B: _AIR_QUALITY_CLUSTER_INFO, 0x0000005C: _SMOKE_CO_ALARM_CLUSTER_INFO, 0x00000071: _HEPA_FILTER_MONITORING_CLUSTER_INFO, @@ -10907,6 +10996,7 @@ class ChipClusters: "BooleanState": _BOOLEAN_STATE_CLUSTER_INFO, "IcdManagement": _ICD_MANAGEMENT_CLUSTER_INFO, "ModeSelect": _MODE_SELECT_CLUSTER_INFO, + "TemperatureControl": _TEMPERATURE_CONTROL_CLUSTER_INFO, "AirQuality": _AIR_QUALITY_CLUSTER_INFO, "SmokeCoAlarm": _SMOKE_CO_ALARM_CLUSTER_INFO, "HepaFilterMonitoring": _HEPA_FILTER_MONITORING_CLUSTER_INFO, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 490236cf3bef1a..6ecaedbc6af910 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -15149,11 +15149,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="tempLevel", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="temperatureLevel", Tag=1, Type=uint), ]) label: 'str' = "" - tempLevel: 'uint' = 0 + temperatureLevel: 'uint' = 0 class Commands: @dataclass diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 702619f23b37d5..ed0c09a420f396 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -7006,6 +7006,7 @@ - FuelTankMonitoring - InkCartridgeMonitoring - TonerCartridgeMonitoring + - TemperatureControl - SmokeCOAlarm attributes: Scenes: @@ -7292,6 +7293,19 @@ - EventList - FeatureMap - ClusterRevision + TemperatureControl: + - TemperatureSetpoint + - MinTemperature + - MaxTemperature + - Step + - CurrentTemperatureLevelIndex + - SupportedTemperatureLevels + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - EventList + - FeatureMap + - ClusterRevision SmokeCOAlarm: - ExpressedState - SmokeState @@ -7336,6 +7350,8 @@ - ResetCondition TonerCartridgeMonitoring: - ResetCondition + TemperatureControl: + - SetTemperature DoorLock: - UnboltDoor SmokeCOAlarm: @@ -7344,11 +7360,17 @@ DoorLock: UnboltDoor: - pinCode + TemperatureControl: + SetTemperature: + - targetTemperature + - targetTemperatureLevel structs: BasicInformation: - ProductAppearanceStruct BridgedDeviceBasicInformation: - ProductAppearanceStruct + TemperatureControl: + - TemperatureLevelStruct struct fields: BasicInformation: ProductAppearanceStruct: @@ -7358,6 +7380,10 @@ ProductAppearanceStruct: - finish - primaryColor + TemperatureControl: + TemperatureLevelStruct: + - label + - temperatureLevel events: SmokeCOAlarm: - SmokeAlarm @@ -7665,6 +7691,8 @@ - Feature TonerCartridgeMonitoring: - Feature + TemperatureControl: + - Feature SmokeCOAlarm: - Feature bitmap values: @@ -7746,6 +7774,10 @@ # here. Feature: - Unbolt + TemperatureControl: + Feature: + - TemperatureNumber + - TemperatureLevel SmokeCOAlarm: Feature: - SmokeAlarm diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index aa98a43f38aa53..61e6ec6a19d05a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -9100,7 +9100,7 @@ static id _Nullable DecodeAttributeValueForTemperatureControlCluster( newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; - newElement_0.tempLevel = [NSNumber numberWithUnsignedChar:entry_0.tempLevel]; + 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/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index 6d584e09edbd9d..5f403d4aeb64fb 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -8148,7 +8148,7 @@ newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; - newElement_0.tempLevel = [NSNumber numberWithUnsignedChar:entry_0.tempLevel]; + 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/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 0bf123fda0b9c2..5f7f2626009e9d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -682,7 +682,7 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_NEWLY_AVAILABLE @interface MTRTemperatureControlClusterTemperatureLevelStruct : NSObject @property (nonatomic, copy) NSString * _Nonnull label MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull tempLevel MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull temperatureLevel MTR_NEWLY_AVAILABLE; @end MTR_NEWLY_AVAILABLE diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 2faddf53bcec91..8d5e8f788a17d0 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -2674,7 +2674,7 @@ - (instancetype)init _label = @""; - _tempLevel = @(0); + _temperatureLevel = @(0); } return self; } @@ -2684,15 +2684,15 @@ - (id)copyWithZone:(NSZone * _Nullable)zone auto other = [[MTRTemperatureControlClusterTemperatureLevelStruct alloc] init]; other.label = self.label; - other.tempLevel = self.tempLevel; + other.temperatureLevel = self.temperatureLevel; return other; } - (NSString *)description { - NSString * descriptionString = - [NSString stringWithFormat:@"<%@: label:%@; tempLevel:%@; >", NSStringFromClass([self class]), _label, _tempLevel]; + NSString * descriptionString = [NSString + stringWithFormat:@"<%@: label:%@; temperatureLevel:%@; >", NSStringFromClass([self class]), _label, _temperatureLevel]; return descriptionString; } 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 faea894cbc0cc9..a027ea93c7e2f3 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 @@ -11432,7 +11432,7 @@ 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::kTempLevel), tempLevel)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kTemperatureLevel), temperatureLevel)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -11455,8 +11455,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kLabel): ReturnErrorOnFailure(DataModel::Decode(reader, label)); break; - case to_underlying(Fields::kTempLevel): - ReturnErrorOnFailure(DataModel::Decode(reader, tempLevel)); + case to_underlying(Fields::kTemperatureLevel): + ReturnErrorOnFailure(DataModel::Decode(reader, temperatureLevel)); break; default: break; 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 fa8de958fb201f..f63f82c37a8dd3 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 @@ -14219,15 +14219,15 @@ namespace Structs { namespace TemperatureLevelStruct { enum class Fields : uint8_t { - kLabel = 0, - kTempLevel = 1, + kLabel = 0, + kTemperatureLevel = 1, }; struct Type { public: chip::CharSpan label; - uint8_t tempLevel = static_cast(0); + uint8_t temperatureLevel = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index b941117592662b..677a212a03428d 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -1890,17 +1890,17 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, ReturnErrorOnFailure( ComplexArgumentParser::EnsureMemberExist("TemperatureLevelStruct.label", "label", value.isMember("label"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("TemperatureLevelStruct.tempLevel", "tempLevel", value.isMember("tempLevel"))); + 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, "tempLevel"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.tempLevel, value["tempLevel"])); - valueCopy.removeMember("tempLevel"); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "temperatureLevel"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.temperatureLevel, value["temperatureLevel"])); + valueCopy.removeMember("temperatureLevel"); return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); } @@ -1908,7 +1908,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, void ComplexArgumentParser::Finalize(chip::app::Clusters::TemperatureControl::Structs::TemperatureLevelStruct::Type & request) { ComplexArgumentParser::Finalize(request.label); - ComplexArgumentParser::Finalize(request.tempLevel); + ComplexArgumentParser::Finalize(request.temperatureLevel); } CHIP_ERROR ComplexArgumentParser::Setup(const char * label, 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 41851f2a357637..cc89135be0669e 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -1723,10 +1723,10 @@ DataModelLogger::LogValue(const char * label, size_t indent, } } { - CHIP_ERROR err = LogValue("TempLevel", indent + 1, value.tempLevel); + 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 'TempLevel'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TemperatureLevel'"); return err; } }