From 3b463a0849cd12ff78816be0e4bf136901a4263c Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 20 Mar 2023 11:18:29 -0400 Subject: [PATCH] Zap regen --- .../data_model/controller-clusters.matter | 32 + .../CHIPAttributeTLVValueDecoder.cpp | 550 +++++++++ .../java/zap-generated/CHIPCallbackTypes.h | 64 ++ .../zap-generated/CHIPClustersWrite-JNI.cpp | 959 ++++++++++++++++ .../java/zap-generated/CHIPReadCallbacks.cpp | 670 +++++++++++ .../java/zap-generated/CHIPReadCallbacks.h | 301 +++++ .../chip/devicecontroller/ChipClusters.java | 1012 +++++++++++++++-- .../chip/devicecontroller/ChipIdLookup.java | 96 ++ .../devicecontroller/ClusterInfoMapping.java | 240 ++++ .../devicecontroller/ClusterReadMapping.java | 451 ++++++++ .../devicecontroller/ClusterWriteMapping.java | 314 +++++ .../python/chip/clusters/CHIPClusters.py | 210 ++++ 12 files changed, 4833 insertions(+), 66 deletions(-) diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index cb4df8c85b8b09..f330609b6e4696 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3167,22 +3167,54 @@ client cluster Thermostat = 513 { } readonly attribute nullable int16s localTemperature = 0; + readonly attribute nullable int16s outdoorTemperature = 1; + readonly attribute bitmap8 occupancy = 2; readonly attribute int16s absMinHeatSetpointLimit = 3; readonly attribute int16s absMaxHeatSetpointLimit = 4; readonly attribute int16s absMinCoolSetpointLimit = 5; readonly attribute int16s absMaxCoolSetpointLimit = 6; + readonly attribute int8u PICoolingDemand = 7; + readonly attribute int8u PIHeatingDemand = 8; + attribute access(write: manage) bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) int8s localTemperatureCalibration = 16; attribute int16s occupiedCoolingSetpoint = 17; attribute int16s occupiedHeatingSetpoint = 18; + attribute int16s unoccupiedCoolingSetpoint = 19; + attribute int16s unoccupiedHeatingSetpoint = 20; attribute access(write: manage) int16s minHeatSetpointLimit = 21; attribute access(write: manage) int16s maxHeatSetpointLimit = 22; attribute access(write: manage) int16s minCoolSetpointLimit = 23; attribute access(write: manage) int16s maxCoolSetpointLimit = 24; attribute access(write: manage) int8s minSetpointDeadBand = 25; + attribute access(write: manage) bitmap8 remoteSensing = 26; attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; attribute access(write: manage) enum8 systemMode = 28; + readonly attribute enum8 thermostatRunningMode = 30; readonly attribute enum8 startOfWeek = 32; readonly attribute int8u numberOfWeeklyTransitions = 33; readonly attribute int8u numberOfDailyTransitions = 34; + attribute access(write: manage) enum8 temperatureSetpointHold = 35; + attribute access(write: manage) nullable int16u temperatureSetpointHoldDuration = 36; + attribute access(write: manage) bitmap8 thermostatProgrammingOperationMode = 37; + readonly attribute bitmap16 thermostatRunningState = 41; + readonly attribute enum8 setpointChangeSource = 48; + readonly attribute nullable int16s setpointChangeAmount = 49; + readonly attribute epoch_s setpointChangeSourceTimestamp = 50; + attribute access(write: manage) nullable int8u occupiedSetback = 52; + readonly attribute nullable int8u occupiedSetbackMin = 53; + readonly attribute nullable int8u occupiedSetbackMax = 54; + attribute access(write: manage) nullable int8u unoccupiedSetback = 55; + readonly attribute nullable int8u unoccupiedSetbackMin = 56; + readonly attribute nullable int8u unoccupiedSetbackMax = 57; + attribute access(write: manage) int8u emergencyHeatDelta = 58; + attribute access(write: manage) enum8 ACType = 64; + attribute access(write: manage) int16u ACCapacity = 65; + attribute access(write: manage) enum8 ACRefrigerantType = 66; + attribute access(write: manage) enum8 ACCompressorType = 67; + attribute access(write: manage) bitmap32 ACErrorCode = 68; + attribute access(write: manage) enum8 ACLouverPosition = 69; + readonly attribute nullable int16s ACCoilTemperature = 70; + attribute access(write: manage) enum8 ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 841f21a8272e37..c58f7ab0e26bbf 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -12536,6 +12536,43 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } + case Attributes::OutdoorTemperature::Id: { + using TypeInfo = Attributes::OutdoorTemperature::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::Occupancy::Id: { + using TypeInfo = Attributes::Occupancy::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } case Attributes::AbsMinHeatSetpointLimit::Id: { using TypeInfo = Attributes::AbsMinHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; @@ -12596,6 +12633,66 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR cppValue, value); return value; } + case Attributes::PICoolingDemand::Id: { + using TypeInfo = Attributes::PICoolingDemand::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::PIHeatingDemand::Id: { + using TypeInfo = Attributes::PIHeatingDemand::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::HVACSystemTypeConfiguration::Id: { + using TypeInfo = Attributes::HVACSystemTypeConfiguration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::LocalTemperatureCalibration::Id: { + using TypeInfo = Attributes::LocalTemperatureCalibration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } case Attributes::OccupiedCoolingSetpoint::Id: { using TypeInfo = Attributes::OccupiedCoolingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; @@ -12626,6 +12723,36 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR cppValue, value); return value; } + case Attributes::UnoccupiedCoolingSetpoint::Id: { + using TypeInfo = Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::UnoccupiedHeatingSetpoint::Id: { + using TypeInfo = Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } case Attributes::MinHeatSetpointLimit::Id: { using TypeInfo = Attributes::MinHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; @@ -12701,6 +12828,21 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR cppValue, value); return value; } + case Attributes::RemoteSensing::Id: { + using TypeInfo = Attributes::RemoteSensing::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } case Attributes::ControlSequenceOfOperation::Id: { using TypeInfo = Attributes::ControlSequenceOfOperation::TypeInfo; TypeInfo::DecodableType cppValue; @@ -12731,6 +12873,21 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR cppValue, value); return value; } + case Attributes::ThermostatRunningMode::Id: { + using TypeInfo = Attributes::ThermostatRunningMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } case Attributes::StartOfWeek::Id: { using TypeInfo = Attributes::StartOfWeek::TypeInfo; TypeInfo::DecodableType cppValue; @@ -12776,6 +12933,399 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR cppValue, value); return value; } + case Attributes::TemperatureSetpointHold::Id: { + using TypeInfo = Attributes::TemperatureSetpointHold::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::TemperatureSetpointHoldDuration::Id: { + using TypeInfo = Attributes::TemperatureSetpointHoldDuration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::ThermostatProgrammingOperationMode::Id: { + using TypeInfo = Attributes::ThermostatProgrammingOperationMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ThermostatRunningState::Id: { + using TypeInfo = Attributes::ThermostatRunningState::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::SetpointChangeSource::Id: { + using TypeInfo = Attributes::SetpointChangeSource::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::SetpointChangeAmount::Id: { + using TypeInfo = Attributes::SetpointChangeAmount::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::SetpointChangeSourceTimestamp::Id: { + using TypeInfo = Attributes::SetpointChangeSourceTimestamp::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::OccupiedSetback::Id: { + using TypeInfo = Attributes::OccupiedSetback::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::OccupiedSetbackMin::Id: { + using TypeInfo = Attributes::OccupiedSetbackMin::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::OccupiedSetbackMax::Id: { + using TypeInfo = Attributes::OccupiedSetbackMax::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::UnoccupiedSetback::Id: { + using TypeInfo = Attributes::UnoccupiedSetback::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::UnoccupiedSetbackMin::Id: { + using TypeInfo = Attributes::UnoccupiedSetbackMin::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::UnoccupiedSetbackMax::Id: { + using TypeInfo = Attributes::UnoccupiedSetbackMax::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::EmergencyHeatDelta::Id: { + using TypeInfo = Attributes::EmergencyHeatDelta::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ACType::Id: { + using TypeInfo = Attributes::ACType::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ACCapacity::Id: { + using TypeInfo = Attributes::ACCapacity::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ACRefrigerantType::Id: { + using TypeInfo = Attributes::ACRefrigerantType::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ACCompressorType::Id: { + using TypeInfo = Attributes::ACCompressorType::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ACErrorCode::Id: { + using TypeInfo = Attributes::ACErrorCode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ACLouverPosition::Id: { + using TypeInfo = Attributes::ACLouverPosition::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ACCoilTemperature::Id: { + using TypeInfo = Attributes::ACCoilTemperature::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::ACCapacityformat::Id: { + using TypeInfo = Attributes::ACCapacityformat::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index 9e05325655140e..dd8c901e3afa27 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -1274,6 +1274,10 @@ typedef void (*CHIPThermostatClusterGetWeeklyScheduleResponseCallbackType)( typedef void (*CHIPThermostatClusterLocalTemperatureAttributeCallbackType)( void *, chip::app::Clusters::Thermostat::Attributes::LocalTemperature::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterOutdoorTemperatureAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::OutdoorTemperature::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterOccupancyAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::Occupancy::TypeInfo::DecodableArgType); typedef void (*CHIPThermostatClusterAbsMinHeatSetpointLimitAttributeCallbackType)( void *, chip::app::Clusters::Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo::DecodableArgType); typedef void (*CHIPThermostatClusterAbsMaxHeatSetpointLimitAttributeCallbackType)( @@ -1282,10 +1286,22 @@ typedef void (*CHIPThermostatClusterAbsMinCoolSetpointLimitAttributeCallbackType void *, chip::app::Clusters::Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo::DecodableArgType); typedef void (*CHIPThermostatClusterAbsMaxCoolSetpointLimitAttributeCallbackType)( void *, chip::app::Clusters::Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterPICoolingDemandAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::PICoolingDemand::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterPIHeatingDemandAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::PIHeatingDemand::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterHVACSystemTypeConfigurationAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterLocalTemperatureCalibrationAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo::DecodableArgType); typedef void (*CHIPThermostatClusterOccupiedCoolingSetpointAttributeCallbackType)( void *, chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo::DecodableArgType); typedef void (*CHIPThermostatClusterOccupiedHeatingSetpointAttributeCallbackType)( void *, chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterUnoccupiedCoolingSetpointAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterUnoccupiedHeatingSetpointAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo::DecodableArgType); typedef void (*CHIPThermostatClusterMinHeatSetpointLimitAttributeCallbackType)( void *, chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo::DecodableArgType); typedef void (*CHIPThermostatClusterMaxHeatSetpointLimitAttributeCallbackType)( @@ -1296,16 +1312,64 @@ typedef void (*CHIPThermostatClusterMaxCoolSetpointLimitAttributeCallbackType)( void *, chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo::DecodableArgType); typedef void (*CHIPThermostatClusterMinSetpointDeadBandAttributeCallbackType)( void *, chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterRemoteSensingAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::RemoteSensing::TypeInfo::DecodableArgType); typedef void (*CHIPThermostatClusterControlSequenceOfOperationAttributeCallbackType)( void *, chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo::DecodableArgType); typedef void (*CHIPThermostatClusterSystemModeAttributeCallbackType)( void *, chip::app::Clusters::Thermostat::Attributes::SystemMode::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterThermostatRunningModeAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::ThermostatRunningMode::TypeInfo::DecodableArgType); typedef void (*CHIPThermostatClusterStartOfWeekAttributeCallbackType)( void *, chip::app::Clusters::Thermostat::Attributes::StartOfWeek::TypeInfo::DecodableArgType); typedef void (*CHIPThermostatClusterNumberOfWeeklyTransitionsAttributeCallbackType)( void *, chip::app::Clusters::Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo::DecodableArgType); typedef void (*CHIPThermostatClusterNumberOfDailyTransitionsAttributeCallbackType)( void *, chip::app::Clusters::Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterTemperatureSetpointHoldAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterTemperatureSetpointHoldDurationAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterThermostatProgrammingOperationModeAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterThermostatRunningStateAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::ThermostatRunningState::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterSetpointChangeSourceAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::SetpointChangeSource::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterSetpointChangeAmountAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::SetpointChangeAmount::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterSetpointChangeSourceTimestampAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterOccupiedSetbackAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterOccupiedSetbackMinAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMin::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterOccupiedSetbackMaxAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMax::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterUnoccupiedSetbackAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterUnoccupiedSetbackMinAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterUnoccupiedSetbackMaxAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterEmergencyHeatDeltaAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterACTypeAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::ACType::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterACCapacityAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::ACCapacity::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterACRefrigerantTypeAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterACCompressorTypeAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::ACCompressorType::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterACErrorCodeAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::ACErrorCode::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterACLouverPositionAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterACCoilTemperatureAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::ACCoilTemperature::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterACCapacityformatAttributeCallbackType)( + void *, chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::TypeInfo::DecodableArgType); typedef void (*CHIPThermostatClusterGeneratedCommandListAttributeCallbackType)( void *, const chip::app::Clusters::Thermostat::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); typedef void (*CHIPThermostatClusterAcceptedCommandListAttributeCallbackType)( diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index 3aab4f95f4c2a6..581c721f43c10c 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -2877,6 +2877,110 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeControlModeAttribute) onFailure.release(); } +JNI_METHOD(void, ThermostatCluster, writeHVACSystemTypeConfigurationAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ThermostatCluster, writeLocalTemperatureCalibrationAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, ThermostatCluster, writeOccupiedCoolingSetpointAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { @@ -2981,6 +3085,110 @@ JNI_METHOD(void, ThermostatCluster, writeOccupiedHeatingSetpointAttribute) onFailure.release(); } +JNI_METHOD(void, ThermostatCluster, writeUnoccupiedCoolingSetpointAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ThermostatCluster, writeUnoccupiedHeatingSetpointAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, ThermostatCluster, writeMinHeatSetpointLimitAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { @@ -3241,6 +3449,58 @@ JNI_METHOD(void, ThermostatCluster, writeMinSetpointDeadBandAttribute) onFailure.release(); } +JNI_METHOD(void, ThermostatCluster, writeRemoteSensingAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, ThermostatCluster, writeControlSequenceOfOperationAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { @@ -3345,6 +3605,705 @@ JNI_METHOD(void, ThermostatCluster, writeSystemModeAttribute) onFailure.release(); } +JNI_METHOD(void, ThermostatCluster, writeTemperatureSetpointHoldAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ThermostatCluster, writeTemperatureSetpointHoldDurationAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ThermostatCluster, writeThermostatProgrammingOperationModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ThermostatCluster, writeOccupiedSetbackAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ThermostatCluster, writeUnoccupiedSetbackAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ThermostatCluster, writeEmergencyHeatDeltaAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ThermostatCluster, writeACTypeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ACType::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ThermostatCluster, writeACCapacityAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ACCapacity::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ThermostatCluster, writeACRefrigerantTypeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ThermostatCluster, writeACCompressorTypeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ThermostatCluster, writeACErrorCodeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ThermostatCluster, writeACLouverPositionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ThermostatCluster, writeACCapacityformatAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, FanControlCluster, writeFanModeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 9190ebb0086b71..c18d259c722f14 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -21189,6 +21189,676 @@ void CHIPThermostatLocalTemperatureAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } +CHIPThermostatOutdoorTemperatureAttributeCallback::CHIPThermostatOutdoorTemperatureAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThermostatOutdoorTemperatureAttributeCallback::~CHIPThermostatOutdoorTemperatureAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatOutdoorTemperatureAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback::CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback::~CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPThermostatSetpointChangeAmountAttributeCallback::CHIPThermostatSetpointChangeAmountAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThermostatSetpointChangeAmountAttributeCallback::~CHIPThermostatSetpointChangeAmountAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatSetpointChangeAmountAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPThermostatOccupiedSetbackAttributeCallback::CHIPThermostatOccupiedSetbackAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThermostatOccupiedSetbackAttributeCallback::~CHIPThermostatOccupiedSetbackAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatOccupiedSetbackAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPThermostatOccupiedSetbackMinAttributeCallback::CHIPThermostatOccupiedSetbackMinAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThermostatOccupiedSetbackMinAttributeCallback::~CHIPThermostatOccupiedSetbackMinAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatOccupiedSetbackMinAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPThermostatOccupiedSetbackMaxAttributeCallback::CHIPThermostatOccupiedSetbackMaxAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThermostatOccupiedSetbackMaxAttributeCallback::~CHIPThermostatOccupiedSetbackMaxAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatOccupiedSetbackMaxAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPThermostatUnoccupiedSetbackAttributeCallback::CHIPThermostatUnoccupiedSetbackAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThermostatUnoccupiedSetbackAttributeCallback::~CHIPThermostatUnoccupiedSetbackAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatUnoccupiedSetbackAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPThermostatUnoccupiedSetbackMinAttributeCallback::CHIPThermostatUnoccupiedSetbackMinAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThermostatUnoccupiedSetbackMinAttributeCallback::~CHIPThermostatUnoccupiedSetbackMinAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatUnoccupiedSetbackMinAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPThermostatUnoccupiedSetbackMaxAttributeCallback::CHIPThermostatUnoccupiedSetbackMaxAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThermostatUnoccupiedSetbackMaxAttributeCallback::~CHIPThermostatUnoccupiedSetbackMaxAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatUnoccupiedSetbackMaxAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPThermostatACCoilTemperatureAttributeCallback::CHIPThermostatACCoilTemperatureAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThermostatACCoilTemperatureAttributeCallback::~CHIPThermostatACCoilTemperatureAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatACCoilTemperatureAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + CHIPThermostatGeneratedCommandListAttributeCallback::CHIPThermostatGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 341a8fffd2284b..d775d78b98b981 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -8939,6 +8939,307 @@ class CHIPThermostatLocalTemperatureAttributeCallback bool keepAlive; }; +class CHIPThermostatOutdoorTemperatureAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPThermostatOutdoorTemperatureAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPThermostatOutdoorTemperatureAttributeCallback(); + + static void maybeDestroy(CHIPThermostatOutdoorTemperatureAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef, subscriptionId); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback(); + + static void maybeDestroy(CHIPThermostatTemperatureSetpointHoldDurationAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef, + subscriptionId); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPThermostatSetpointChangeAmountAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPThermostatSetpointChangeAmountAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPThermostatSetpointChangeAmountAttributeCallback(); + + static void maybeDestroy(CHIPThermostatSetpointChangeAmountAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef, subscriptionId); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPThermostatOccupiedSetbackAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPThermostatOccupiedSetbackAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPThermostatOccupiedSetbackAttributeCallback(); + + static void maybeDestroy(CHIPThermostatOccupiedSetbackAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef, subscriptionId); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPThermostatOccupiedSetbackMinAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPThermostatOccupiedSetbackMinAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPThermostatOccupiedSetbackMinAttributeCallback(); + + static void maybeDestroy(CHIPThermostatOccupiedSetbackMinAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef, subscriptionId); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPThermostatOccupiedSetbackMaxAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPThermostatOccupiedSetbackMaxAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPThermostatOccupiedSetbackMaxAttributeCallback(); + + static void maybeDestroy(CHIPThermostatOccupiedSetbackMaxAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef, subscriptionId); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPThermostatUnoccupiedSetbackAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPThermostatUnoccupiedSetbackAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPThermostatUnoccupiedSetbackAttributeCallback(); + + static void maybeDestroy(CHIPThermostatUnoccupiedSetbackAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef, subscriptionId); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPThermostatUnoccupiedSetbackMinAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPThermostatUnoccupiedSetbackMinAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPThermostatUnoccupiedSetbackMinAttributeCallback(); + + static void maybeDestroy(CHIPThermostatUnoccupiedSetbackMinAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef, subscriptionId); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPThermostatUnoccupiedSetbackMaxAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPThermostatUnoccupiedSetbackMaxAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPThermostatUnoccupiedSetbackMaxAttributeCallback(); + + static void maybeDestroy(CHIPThermostatUnoccupiedSetbackMaxAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef, subscriptionId); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPThermostatACCoilTemperatureAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPThermostatACCoilTemperatureAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPThermostatACCoilTemperatureAttributeCallback(); + + static void maybeDestroy(CHIPThermostatACCoilTemperatureAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context, chip::SubscriptionId subscriptionId) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef, subscriptionId); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPThermostatGeneratedCommandListAttributeCallback : public chip::Callback::Callback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 8d06f1fe945e94..124f92fb8ed419 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -15420,6 +15420,86 @@ public interface LocalTemperatureAttributeCallback { default void onSubscriptionEstablished(long subscriptionId) {} } + public interface OutdoorTemperatureAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface TemperatureSetpointHoldDurationAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface SetpointChangeAmountAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface OccupiedSetbackAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface OccupiedSetbackMinAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface OccupiedSetbackMaxAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface UnoccupiedSetbackAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface UnoccupiedSetbackMinAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface UnoccupiedSetbackMaxAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface ACCoilTemperatureAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { void onSuccess(List valueList); @@ -15461,6 +15541,24 @@ public void subscribeLocalTemperatureAttribute( subscribeLocalTemperatureAttribute(chipClusterPtr, callback, minInterval, maxInterval); } + public void readOutdoorTemperatureAttribute(OutdoorTemperatureAttributeCallback callback) { + readOutdoorTemperatureAttribute(chipClusterPtr, callback); + } + + public void subscribeOutdoorTemperatureAttribute( + OutdoorTemperatureAttributeCallback callback, int minInterval, int maxInterval) { + subscribeOutdoorTemperatureAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOccupancyAttribute(IntegerAttributeCallback callback) { + readOccupancyAttribute(chipClusterPtr, callback); + } + + public void subscribeOccupancyAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeOccupancyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readAbsMinHeatSetpointLimitAttribute(IntegerAttributeCallback callback) { readAbsMinHeatSetpointLimitAttribute(chipClusterPtr, callback); } @@ -15497,6 +15595,66 @@ public void subscribeAbsMaxCoolSetpointLimitAttribute( subscribeAbsMaxCoolSetpointLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); } + public void readPICoolingDemandAttribute(IntegerAttributeCallback callback) { + readPICoolingDemandAttribute(chipClusterPtr, callback); + } + + public void subscribePICoolingDemandAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribePICoolingDemandAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPIHeatingDemandAttribute(IntegerAttributeCallback callback) { + readPIHeatingDemandAttribute(chipClusterPtr, callback); + } + + public void subscribePIHeatingDemandAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribePIHeatingDemandAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readHVACSystemTypeConfigurationAttribute(IntegerAttributeCallback callback) { + readHVACSystemTypeConfigurationAttribute(chipClusterPtr, callback); + } + + public void writeHVACSystemTypeConfigurationAttribute( + DefaultClusterCallback callback, Integer value) { + writeHVACSystemTypeConfigurationAttribute(chipClusterPtr, callback, value, null); + } + + public void writeHVACSystemTypeConfigurationAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeHVACSystemTypeConfigurationAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeHVACSystemTypeConfigurationAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeHVACSystemTypeConfigurationAttribute( + chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLocalTemperatureCalibrationAttribute(IntegerAttributeCallback callback) { + readLocalTemperatureCalibrationAttribute(chipClusterPtr, callback); + } + + public void writeLocalTemperatureCalibrationAttribute( + DefaultClusterCallback callback, Integer value) { + writeLocalTemperatureCalibrationAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLocalTemperatureCalibrationAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeLocalTemperatureCalibrationAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeLocalTemperatureCalibrationAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeLocalTemperatureCalibrationAttribute( + chipClusterPtr, callback, minInterval, maxInterval); + } + public void readOccupiedCoolingSetpointAttribute(IntegerAttributeCallback callback) { readOccupiedCoolingSetpointAttribute(chipClusterPtr, callback); } @@ -15535,6 +15693,46 @@ public void subscribeOccupiedHeatingSetpointAttribute( subscribeOccupiedHeatingSetpointAttribute(chipClusterPtr, callback, minInterval, maxInterval); } + public void readUnoccupiedCoolingSetpointAttribute(IntegerAttributeCallback callback) { + readUnoccupiedCoolingSetpointAttribute(chipClusterPtr, callback); + } + + public void writeUnoccupiedCoolingSetpointAttribute( + DefaultClusterCallback callback, Integer value) { + writeUnoccupiedCoolingSetpointAttribute(chipClusterPtr, callback, value, null); + } + + public void writeUnoccupiedCoolingSetpointAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeUnoccupiedCoolingSetpointAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeUnoccupiedCoolingSetpointAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeUnoccupiedCoolingSetpointAttribute( + chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUnoccupiedHeatingSetpointAttribute(IntegerAttributeCallback callback) { + readUnoccupiedHeatingSetpointAttribute(chipClusterPtr, callback); + } + + public void writeUnoccupiedHeatingSetpointAttribute( + DefaultClusterCallback callback, Integer value) { + writeUnoccupiedHeatingSetpointAttribute(chipClusterPtr, callback, value, null); + } + + public void writeUnoccupiedHeatingSetpointAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeUnoccupiedHeatingSetpointAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeUnoccupiedHeatingSetpointAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeUnoccupiedHeatingSetpointAttribute( + chipClusterPtr, callback, minInterval, maxInterval); + } + public void readMinHeatSetpointLimitAttribute(IntegerAttributeCallback callback) { readMinHeatSetpointLimitAttribute(chipClusterPtr, callback); } @@ -15625,6 +15823,24 @@ public void subscribeMinSetpointDeadBandAttribute( subscribeMinSetpointDeadBandAttribute(chipClusterPtr, callback, minInterval, maxInterval); } + public void readRemoteSensingAttribute(IntegerAttributeCallback callback) { + readRemoteSensingAttribute(chipClusterPtr, callback); + } + + public void writeRemoteSensingAttribute(DefaultClusterCallback callback, Integer value) { + writeRemoteSensingAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRemoteSensingAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRemoteSensingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeRemoteSensingAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeRemoteSensingAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readControlSequenceOfOperationAttribute(IntegerAttributeCallback callback) { readControlSequenceOfOperationAttribute(chipClusterPtr, callback); } @@ -15664,6 +15880,15 @@ public void subscribeSystemModeAttribute( subscribeSystemModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); } + public void readThermostatRunningModeAttribute(IntegerAttributeCallback callback) { + readThermostatRunningModeAttribute(chipClusterPtr, callback); + } + + public void subscribeThermostatRunningModeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeThermostatRunningModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readStartOfWeekAttribute(IntegerAttributeCallback callback) { readStartOfWeekAttribute(chipClusterPtr, callback); } @@ -15693,117 +15918,518 @@ public void subscribeNumberOfDailyTransitionsAttribute( chipClusterPtr, callback, minInterval, maxInterval); } - public void readGeneratedCommandListAttribute(GeneratedCommandListAttributeCallback callback) { - readGeneratedCommandListAttribute(chipClusterPtr, callback); + public void readTemperatureSetpointHoldAttribute(IntegerAttributeCallback callback) { + readTemperatureSetpointHoldAttribute(chipClusterPtr, callback); } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + public void writeTemperatureSetpointHoldAttribute( + DefaultClusterCallback callback, Integer value) { + writeTemperatureSetpointHoldAttribute(chipClusterPtr, callback, value, null); } - public void readAcceptedCommandListAttribute(AcceptedCommandListAttributeCallback callback) { - readAcceptedCommandListAttribute(chipClusterPtr, callback); + public void writeTemperatureSetpointHoldAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeTemperatureSetpointHoldAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + public void subscribeTemperatureSetpointHoldAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeTemperatureSetpointHoldAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readEventListAttribute(EventListAttributeCallback callback) { - readEventListAttribute(chipClusterPtr, callback); + public void readTemperatureSetpointHoldDurationAttribute( + TemperatureSetpointHoldDurationAttributeCallback callback) { + readTemperatureSetpointHoldDurationAttribute(chipClusterPtr, callback); } - public void subscribeEventListAttribute( - EventListAttributeCallback callback, int minInterval, int maxInterval) { - subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + public void writeTemperatureSetpointHoldDurationAttribute( + DefaultClusterCallback callback, Integer value) { + writeTemperatureSetpointHoldDurationAttribute(chipClusterPtr, callback, value, null); } - public void readAttributeListAttribute(AttributeListAttributeCallback callback) { - readAttributeListAttribute(chipClusterPtr, callback); + public void writeTemperatureSetpointHoldDurationAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeTemperatureSetpointHoldDurationAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback, int minInterval, int maxInterval) { - subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + public void subscribeTemperatureSetpointHoldDurationAttribute( + TemperatureSetpointHoldDurationAttributeCallback callback, + int minInterval, + int maxInterval) { + subscribeTemperatureSetpointHoldDurationAttribute( + chipClusterPtr, callback, minInterval, maxInterval); } - public void readFeatureMapAttribute(LongAttributeCallback callback) { - readFeatureMapAttribute(chipClusterPtr, callback); + public void readThermostatProgrammingOperationModeAttribute(IntegerAttributeCallback callback) { + readThermostatProgrammingOperationModeAttribute(chipClusterPtr, callback); } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + public void writeThermostatProgrammingOperationModeAttribute( + DefaultClusterCallback callback, Integer value) { + writeThermostatProgrammingOperationModeAttribute(chipClusterPtr, callback, value, null); } - public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { - readClusterRevisionAttribute(chipClusterPtr, callback); + public void writeThermostatProgrammingOperationModeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeThermostatProgrammingOperationModeAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); } - public void subscribeClusterRevisionAttribute( + public void subscribeThermostatProgrammingOperationModeAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + subscribeThermostatProgrammingOperationModeAttribute( + chipClusterPtr, callback, minInterval, maxInterval); } - private native void readLocalTemperatureAttribute( - long chipClusterPtr, LocalTemperatureAttributeCallback callback); + public void readThermostatRunningStateAttribute(IntegerAttributeCallback callback) { + readThermostatRunningStateAttribute(chipClusterPtr, callback); + } - private native void subscribeLocalTemperatureAttribute( - long chipClusterPtr, - LocalTemperatureAttributeCallback callback, - int minInterval, - int maxInterval); + public void subscribeThermostatRunningStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeThermostatRunningStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } - private native void readAbsMinHeatSetpointLimitAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + public void readSetpointChangeSourceAttribute(IntegerAttributeCallback callback) { + readSetpointChangeSourceAttribute(chipClusterPtr, callback); + } - private native void subscribeAbsMinHeatSetpointLimitAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + public void subscribeSetpointChangeSourceAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeSetpointChangeSourceAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } - private native void readAbsMaxHeatSetpointLimitAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + public void readSetpointChangeAmountAttribute(SetpointChangeAmountAttributeCallback callback) { + readSetpointChangeAmountAttribute(chipClusterPtr, callback); + } - private native void subscribeAbsMaxHeatSetpointLimitAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + public void subscribeSetpointChangeAmountAttribute( + SetpointChangeAmountAttributeCallback callback, int minInterval, int maxInterval) { + subscribeSetpointChangeAmountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } - private native void readAbsMinCoolSetpointLimitAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + public void readSetpointChangeSourceTimestampAttribute(LongAttributeCallback callback) { + readSetpointChangeSourceTimestampAttribute(chipClusterPtr, callback); + } - private native void subscribeAbsMinCoolSetpointLimitAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + public void subscribeSetpointChangeSourceTimestampAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + subscribeSetpointChangeSourceTimestampAttribute( + chipClusterPtr, callback, minInterval, maxInterval); + } - private native void readAbsMaxCoolSetpointLimitAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + public void readOccupiedSetbackAttribute(OccupiedSetbackAttributeCallback callback) { + readOccupiedSetbackAttribute(chipClusterPtr, callback); + } - private native void subscribeAbsMaxCoolSetpointLimitAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + public void writeOccupiedSetbackAttribute(DefaultClusterCallback callback, Integer value) { + writeOccupiedSetbackAttribute(chipClusterPtr, callback, value, null); + } - private native void readOccupiedCoolingSetpointAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + public void writeOccupiedSetbackAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOccupiedSetbackAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } - private native void writeOccupiedCoolingSetpointAttribute( - long chipClusterPtr, - DefaultClusterCallback callback, - Integer value, - @Nullable Integer timedWriteTimeoutMs); + public void subscribeOccupiedSetbackAttribute( + OccupiedSetbackAttributeCallback callback, int minInterval, int maxInterval) { + subscribeOccupiedSetbackAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } - private native void subscribeOccupiedCoolingSetpointAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + public void readOccupiedSetbackMinAttribute(OccupiedSetbackMinAttributeCallback callback) { + readOccupiedSetbackMinAttribute(chipClusterPtr, callback); + } - private native void readOccupiedHeatingSetpointAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + public void subscribeOccupiedSetbackMinAttribute( + OccupiedSetbackMinAttributeCallback callback, int minInterval, int maxInterval) { + subscribeOccupiedSetbackMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } - private native void writeOccupiedHeatingSetpointAttribute( - long chipClusterPtr, - DefaultClusterCallback callback, + public void readOccupiedSetbackMaxAttribute(OccupiedSetbackMaxAttributeCallback callback) { + readOccupiedSetbackMaxAttribute(chipClusterPtr, callback); + } + + public void subscribeOccupiedSetbackMaxAttribute( + OccupiedSetbackMaxAttributeCallback callback, int minInterval, int maxInterval) { + subscribeOccupiedSetbackMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUnoccupiedSetbackAttribute(UnoccupiedSetbackAttributeCallback callback) { + readUnoccupiedSetbackAttribute(chipClusterPtr, callback); + } + + public void writeUnoccupiedSetbackAttribute(DefaultClusterCallback callback, Integer value) { + writeUnoccupiedSetbackAttribute(chipClusterPtr, callback, value, null); + } + + public void writeUnoccupiedSetbackAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeUnoccupiedSetbackAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeUnoccupiedSetbackAttribute( + UnoccupiedSetbackAttributeCallback callback, int minInterval, int maxInterval) { + subscribeUnoccupiedSetbackAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUnoccupiedSetbackMinAttribute(UnoccupiedSetbackMinAttributeCallback callback) { + readUnoccupiedSetbackMinAttribute(chipClusterPtr, callback); + } + + public void subscribeUnoccupiedSetbackMinAttribute( + UnoccupiedSetbackMinAttributeCallback callback, int minInterval, int maxInterval) { + subscribeUnoccupiedSetbackMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUnoccupiedSetbackMaxAttribute(UnoccupiedSetbackMaxAttributeCallback callback) { + readUnoccupiedSetbackMaxAttribute(chipClusterPtr, callback); + } + + public void subscribeUnoccupiedSetbackMaxAttribute( + UnoccupiedSetbackMaxAttributeCallback callback, int minInterval, int maxInterval) { + subscribeUnoccupiedSetbackMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEmergencyHeatDeltaAttribute(IntegerAttributeCallback callback) { + readEmergencyHeatDeltaAttribute(chipClusterPtr, callback); + } + + public void writeEmergencyHeatDeltaAttribute(DefaultClusterCallback callback, Integer value) { + writeEmergencyHeatDeltaAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEmergencyHeatDeltaAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeEmergencyHeatDeltaAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeEmergencyHeatDeltaAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeEmergencyHeatDeltaAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readACTypeAttribute(IntegerAttributeCallback callback) { + readACTypeAttribute(chipClusterPtr, callback); + } + + public void writeACTypeAttribute(DefaultClusterCallback callback, Integer value) { + writeACTypeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeACTypeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeACTypeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeACTypeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeACTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readACCapacityAttribute(IntegerAttributeCallback callback) { + readACCapacityAttribute(chipClusterPtr, callback); + } + + public void writeACCapacityAttribute(DefaultClusterCallback callback, Integer value) { + writeACCapacityAttribute(chipClusterPtr, callback, value, null); + } + + public void writeACCapacityAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeACCapacityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeACCapacityAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeACCapacityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readACRefrigerantTypeAttribute(IntegerAttributeCallback callback) { + readACRefrigerantTypeAttribute(chipClusterPtr, callback); + } + + public void writeACRefrigerantTypeAttribute(DefaultClusterCallback callback, Integer value) { + writeACRefrigerantTypeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeACRefrigerantTypeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeACRefrigerantTypeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeACRefrigerantTypeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeACRefrigerantTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readACCompressorTypeAttribute(IntegerAttributeCallback callback) { + readACCompressorTypeAttribute(chipClusterPtr, callback); + } + + public void writeACCompressorTypeAttribute(DefaultClusterCallback callback, Integer value) { + writeACCompressorTypeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeACCompressorTypeAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeACCompressorTypeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeACCompressorTypeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeACCompressorTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readACErrorCodeAttribute(LongAttributeCallback callback) { + readACErrorCodeAttribute(chipClusterPtr, callback); + } + + public void writeACErrorCodeAttribute(DefaultClusterCallback callback, Long value) { + writeACErrorCodeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeACErrorCodeAttribute( + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeACErrorCodeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeACErrorCodeAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + subscribeACErrorCodeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readACLouverPositionAttribute(IntegerAttributeCallback callback) { + readACLouverPositionAttribute(chipClusterPtr, callback); + } + + public void writeACLouverPositionAttribute(DefaultClusterCallback callback, Integer value) { + writeACLouverPositionAttribute(chipClusterPtr, callback, value, null); + } + + public void writeACLouverPositionAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeACLouverPositionAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeACLouverPositionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeACLouverPositionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readACCoilTemperatureAttribute(ACCoilTemperatureAttributeCallback callback) { + readACCoilTemperatureAttribute(chipClusterPtr, callback); + } + + public void subscribeACCoilTemperatureAttribute( + ACCoilTemperatureAttributeCallback callback, int minInterval, int maxInterval) { + subscribeACCoilTemperatureAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readACCapacityformatAttribute(IntegerAttributeCallback callback) { + readACCapacityformatAttribute(chipClusterPtr, callback); + } + + public void writeACCapacityformatAttribute(DefaultClusterCallback callback, Integer value) { + writeACCapacityformatAttribute(chipClusterPtr, callback, value, null); + } + + public void writeACCapacityformatAttribute( + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeACCapacityformatAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeACCapacityformatAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeACCapacityformatAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute(GeneratedCommandListAttributeCallback callback) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute(AcceptedCommandListAttributeCallback callback) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute(EventListAttributeCallback callback) { + readEventListAttribute(chipClusterPtr, callback); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute(LongAttributeCallback callback) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readLocalTemperatureAttribute( + long chipClusterPtr, LocalTemperatureAttributeCallback callback); + + private native void subscribeLocalTemperatureAttribute( + long chipClusterPtr, + LocalTemperatureAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readOutdoorTemperatureAttribute( + long chipClusterPtr, OutdoorTemperatureAttributeCallback callback); + + private native void subscribeOutdoorTemperatureAttribute( + long chipClusterPtr, + OutdoorTemperatureAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readOccupancyAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeOccupancyAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readAbsMinHeatSetpointLimitAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeAbsMinHeatSetpointLimitAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readAbsMaxHeatSetpointLimitAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeAbsMaxHeatSetpointLimitAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readAbsMinCoolSetpointLimitAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeAbsMinCoolSetpointLimitAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readAbsMaxCoolSetpointLimitAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeAbsMaxCoolSetpointLimitAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readPICoolingDemandAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribePICoolingDemandAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readPIHeatingDemandAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribePIHeatingDemandAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readHVACSystemTypeConfigurationAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeHVACSystemTypeConfigurationAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeHVACSystemTypeConfigurationAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readLocalTemperatureCalibrationAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeLocalTemperatureCalibrationAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeLocalTemperatureCalibrationAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readOccupiedCoolingSetpointAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeOccupiedCoolingSetpointAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeOccupiedCoolingSetpointAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readOccupiedHeatingSetpointAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeOccupiedHeatingSetpointAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeOccupiedHeatingSetpointAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readUnoccupiedCoolingSetpointAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeUnoccupiedCoolingSetpointAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeUnoccupiedCoolingSetpointAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readUnoccupiedHeatingSetpointAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeUnoccupiedHeatingSetpointAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeUnoccupiedHeatingSetpointAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readMinHeatSetpointLimitAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -15864,6 +16490,18 @@ private native void writeMinSetpointDeadBandAttribute( private native void subscribeMinSetpointDeadBandAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readRemoteSensingAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeRemoteSensingAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeRemoteSensingAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readControlSequenceOfOperationAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -15888,6 +16526,12 @@ private native void writeSystemModeAttribute( private native void subscribeSystemModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readThermostatRunningModeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeThermostatRunningModeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readStartOfWeekAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -15906,6 +16550,242 @@ private native void readNumberOfDailyTransitionsAttribute( private native void subscribeNumberOfDailyTransitionsAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readTemperatureSetpointHoldAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeTemperatureSetpointHoldAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeTemperatureSetpointHoldAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readTemperatureSetpointHoldDurationAttribute( + long chipClusterPtr, TemperatureSetpointHoldDurationAttributeCallback callback); + + private native void writeTemperatureSetpointHoldDurationAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeTemperatureSetpointHoldDurationAttribute( + long chipClusterPtr, + TemperatureSetpointHoldDurationAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readThermostatProgrammingOperationModeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeThermostatProgrammingOperationModeAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeThermostatProgrammingOperationModeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readThermostatRunningStateAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeThermostatRunningStateAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readSetpointChangeSourceAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeSetpointChangeSourceAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readSetpointChangeAmountAttribute( + long chipClusterPtr, SetpointChangeAmountAttributeCallback callback); + + private native void subscribeSetpointChangeAmountAttribute( + long chipClusterPtr, + SetpointChangeAmountAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readSetpointChangeSourceTimestampAttribute( + long chipClusterPtr, LongAttributeCallback callback); + + private native void subscribeSetpointChangeSourceTimestampAttribute( + long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + + private native void readOccupiedSetbackAttribute( + long chipClusterPtr, OccupiedSetbackAttributeCallback callback); + + private native void writeOccupiedSetbackAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeOccupiedSetbackAttribute( + long chipClusterPtr, + OccupiedSetbackAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readOccupiedSetbackMinAttribute( + long chipClusterPtr, OccupiedSetbackMinAttributeCallback callback); + + private native void subscribeOccupiedSetbackMinAttribute( + long chipClusterPtr, + OccupiedSetbackMinAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readOccupiedSetbackMaxAttribute( + long chipClusterPtr, OccupiedSetbackMaxAttributeCallback callback); + + private native void subscribeOccupiedSetbackMaxAttribute( + long chipClusterPtr, + OccupiedSetbackMaxAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readUnoccupiedSetbackAttribute( + long chipClusterPtr, UnoccupiedSetbackAttributeCallback callback); + + private native void writeUnoccupiedSetbackAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeUnoccupiedSetbackAttribute( + long chipClusterPtr, + UnoccupiedSetbackAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readUnoccupiedSetbackMinAttribute( + long chipClusterPtr, UnoccupiedSetbackMinAttributeCallback callback); + + private native void subscribeUnoccupiedSetbackMinAttribute( + long chipClusterPtr, + UnoccupiedSetbackMinAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readUnoccupiedSetbackMaxAttribute( + long chipClusterPtr, UnoccupiedSetbackMaxAttributeCallback callback); + + private native void subscribeUnoccupiedSetbackMaxAttribute( + long chipClusterPtr, + UnoccupiedSetbackMaxAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readEmergencyHeatDeltaAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeEmergencyHeatDeltaAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeEmergencyHeatDeltaAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readACTypeAttribute(long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeACTypeAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeACTypeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readACCapacityAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeACCapacityAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeACCapacityAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readACRefrigerantTypeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeACRefrigerantTypeAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeACRefrigerantTypeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readACCompressorTypeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeACCompressorTypeAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeACCompressorTypeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readACErrorCodeAttribute( + long chipClusterPtr, LongAttributeCallback callback); + + private native void writeACErrorCodeAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Long value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeACErrorCodeAttribute( + long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + + private native void readACLouverPositionAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeACLouverPositionAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeACLouverPositionAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readACCoilTemperatureAttribute( + long chipClusterPtr, ACCoilTemperatureAttributeCallback callback); + + private native void subscribeACCoilTemperatureAttribute( + long chipClusterPtr, + ACCoilTemperatureAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readACCapacityformatAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void writeACCapacityformatAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + Integer value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeACCapacityformatAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readGeneratedCommandListAttribute( long chipClusterPtr, GeneratedCommandListAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java index dea157245477f4..980c4607f533af 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java @@ -2071,6 +2071,12 @@ public static String attributeIdToName(long clusterId, long attributeId) { if (attributeId == 0L) { return "LocalTemperature"; } + if (attributeId == 1L) { + return "OutdoorTemperature"; + } + if (attributeId == 2L) { + return "Occupancy"; + } if (attributeId == 3L) { return "AbsMinHeatSetpointLimit"; } @@ -2083,12 +2089,30 @@ public static String attributeIdToName(long clusterId, long attributeId) { if (attributeId == 6L) { return "AbsMaxCoolSetpointLimit"; } + if (attributeId == 7L) { + return "PICoolingDemand"; + } + if (attributeId == 8L) { + return "PIHeatingDemand"; + } + if (attributeId == 9L) { + return "HVACSystemTypeConfiguration"; + } + if (attributeId == 16L) { + return "LocalTemperatureCalibration"; + } if (attributeId == 17L) { return "OccupiedCoolingSetpoint"; } if (attributeId == 18L) { return "OccupiedHeatingSetpoint"; } + if (attributeId == 19L) { + return "UnoccupiedCoolingSetpoint"; + } + if (attributeId == 20L) { + return "UnoccupiedHeatingSetpoint"; + } if (attributeId == 21L) { return "MinHeatSetpointLimit"; } @@ -2104,12 +2128,18 @@ public static String attributeIdToName(long clusterId, long attributeId) { if (attributeId == 25L) { return "MinSetpointDeadBand"; } + if (attributeId == 26L) { + return "RemoteSensing"; + } if (attributeId == 27L) { return "ControlSequenceOfOperation"; } if (attributeId == 28L) { return "SystemMode"; } + if (attributeId == 30L) { + return "ThermostatRunningMode"; + } if (attributeId == 32L) { return "StartOfWeek"; } @@ -2119,6 +2149,72 @@ public static String attributeIdToName(long clusterId, long attributeId) { if (attributeId == 34L) { return "NumberOfDailyTransitions"; } + if (attributeId == 35L) { + return "TemperatureSetpointHold"; + } + if (attributeId == 36L) { + return "TemperatureSetpointHoldDuration"; + } + if (attributeId == 37L) { + return "ThermostatProgrammingOperationMode"; + } + if (attributeId == 41L) { + return "ThermostatRunningState"; + } + if (attributeId == 48L) { + return "SetpointChangeSource"; + } + if (attributeId == 49L) { + return "SetpointChangeAmount"; + } + if (attributeId == 50L) { + return "SetpointChangeSourceTimestamp"; + } + if (attributeId == 52L) { + return "OccupiedSetback"; + } + if (attributeId == 53L) { + return "OccupiedSetbackMin"; + } + if (attributeId == 54L) { + return "OccupiedSetbackMax"; + } + if (attributeId == 55L) { + return "UnoccupiedSetback"; + } + if (attributeId == 56L) { + return "UnoccupiedSetbackMin"; + } + if (attributeId == 57L) { + return "UnoccupiedSetbackMax"; + } + if (attributeId == 58L) { + return "EmergencyHeatDelta"; + } + if (attributeId == 64L) { + return "ACType"; + } + if (attributeId == 65L) { + return "ACCapacity"; + } + if (attributeId == 66L) { + return "ACRefrigerantType"; + } + if (attributeId == 67L) { + return "ACCompressorType"; + } + if (attributeId == 68L) { + return "ACErrorCode"; + } + if (attributeId == 69L) { + return "ACLouverPosition"; + } + if (attributeId == 70L) { + return "ACCoilTemperature"; + } + if (attributeId == 71L) { + return "ACCapacityformat"; + } if (attributeId == 65528L) { return "GeneratedCommandList"; } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 9650a37266b3d9..3911d9f067b7f4 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -8053,6 +8053,246 @@ public void onError(Exception ex) { } } + public static class DelegatedThermostatClusterOutdoorTemperatureAttributeCallback + implements ChipClusters.ThermostatCluster.OutdoorTemperatureAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThermostatClusterTemperatureSetpointHoldDurationAttributeCallback + implements ChipClusters.ThermostatCluster.TemperatureSetpointHoldDurationAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThermostatClusterSetpointChangeAmountAttributeCallback + implements ChipClusters.ThermostatCluster.SetpointChangeAmountAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThermostatClusterOccupiedSetbackAttributeCallback + implements ChipClusters.ThermostatCluster.OccupiedSetbackAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThermostatClusterOccupiedSetbackMinAttributeCallback + implements ChipClusters.ThermostatCluster.OccupiedSetbackMinAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThermostatClusterOccupiedSetbackMaxAttributeCallback + implements ChipClusters.ThermostatCluster.OccupiedSetbackMaxAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThermostatClusterUnoccupiedSetbackAttributeCallback + implements ChipClusters.ThermostatCluster.UnoccupiedSetbackAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThermostatClusterUnoccupiedSetbackMinAttributeCallback + implements ChipClusters.ThermostatCluster.UnoccupiedSetbackMinAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThermostatClusterUnoccupiedSetbackMaxAttributeCallback + implements ChipClusters.ThermostatCluster.UnoccupiedSetbackMaxAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThermostatClusterACCoilTemperatureAttributeCallback + implements ChipClusters.ThermostatCluster.ACCoilTemperatureAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedThermostatClusterGeneratedCommandListAttributeCallback implements ChipClusters.ThermostatCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index bb436d77a4765d..b8fd297d5c53e6 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -8387,6 +8387,35 @@ public Map> getReadAttributeMap() { readThermostatLocalTemperatureCommandParams); readThermostatInteractionInfo.put( "readLocalTemperatureAttribute", readThermostatLocalTemperatureAttributeInteractionInfo); + Map readThermostatOutdoorTemperatureCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatOutdoorTemperatureAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readOutdoorTemperatureAttribute( + (ChipClusters.ThermostatCluster.OutdoorTemperatureAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedThermostatClusterOutdoorTemperatureAttributeCallback(), + readThermostatOutdoorTemperatureCommandParams); + readThermostatInteractionInfo.put( + "readOutdoorTemperatureAttribute", + readThermostatOutdoorTemperatureAttributeInteractionInfo); + Map readThermostatOccupancyCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatOccupancyAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readOccupancyAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatOccupancyCommandParams); + readThermostatInteractionInfo.put( + "readOccupancyAttribute", readThermostatOccupancyAttributeInteractionInfo); Map readThermostatAbsMinHeatSetpointLimitCommandParams = new LinkedHashMap(); InteractionInfo readThermostatAbsMinHeatSetpointLimitAttributeInteractionInfo = @@ -8443,6 +8472,58 @@ public Map> getReadAttributeMap() { readThermostatInteractionInfo.put( "readAbsMaxCoolSetpointLimitAttribute", readThermostatAbsMaxCoolSetpointLimitAttributeInteractionInfo); + Map readThermostatPICoolingDemandCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatPICoolingDemandAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readPICoolingDemandAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatPICoolingDemandCommandParams); + readThermostatInteractionInfo.put( + "readPICoolingDemandAttribute", readThermostatPICoolingDemandAttributeInteractionInfo); + Map readThermostatPIHeatingDemandCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatPIHeatingDemandAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readPIHeatingDemandAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatPIHeatingDemandCommandParams); + readThermostatInteractionInfo.put( + "readPIHeatingDemandAttribute", readThermostatPIHeatingDemandAttributeInteractionInfo); + Map readThermostatHVACSystemTypeConfigurationCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatHVACSystemTypeConfigurationAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readHVACSystemTypeConfigurationAttribute( + (ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatHVACSystemTypeConfigurationCommandParams); + readThermostatInteractionInfo.put( + "readHVACSystemTypeConfigurationAttribute", + readThermostatHVACSystemTypeConfigurationAttributeInteractionInfo); + Map readThermostatLocalTemperatureCalibrationCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatLocalTemperatureCalibrationAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readLocalTemperatureCalibrationAttribute( + (ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatLocalTemperatureCalibrationCommandParams); + readThermostatInteractionInfo.put( + "readLocalTemperatureCalibrationAttribute", + readThermostatLocalTemperatureCalibrationAttributeInteractionInfo); Map readThermostatOccupiedCoolingSetpointCommandParams = new LinkedHashMap(); InteractionInfo readThermostatOccupiedCoolingSetpointAttributeInteractionInfo = @@ -8471,6 +8552,34 @@ public Map> getReadAttributeMap() { readThermostatInteractionInfo.put( "readOccupiedHeatingSetpointAttribute", readThermostatOccupiedHeatingSetpointAttributeInteractionInfo); + Map readThermostatUnoccupiedCoolingSetpointCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatUnoccupiedCoolingSetpointAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readUnoccupiedCoolingSetpointAttribute( + (ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatUnoccupiedCoolingSetpointCommandParams); + readThermostatInteractionInfo.put( + "readUnoccupiedCoolingSetpointAttribute", + readThermostatUnoccupiedCoolingSetpointAttributeInteractionInfo); + Map readThermostatUnoccupiedHeatingSetpointCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatUnoccupiedHeatingSetpointAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readUnoccupiedHeatingSetpointAttribute( + (ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatUnoccupiedHeatingSetpointCommandParams); + readThermostatInteractionInfo.put( + "readUnoccupiedHeatingSetpointAttribute", + readThermostatUnoccupiedHeatingSetpointAttributeInteractionInfo); Map readThermostatMinHeatSetpointLimitCommandParams = new LinkedHashMap(); InteractionInfo readThermostatMinHeatSetpointLimitAttributeInteractionInfo = @@ -8541,6 +8650,18 @@ public Map> getReadAttributeMap() { readThermostatInteractionInfo.put( "readMinSetpointDeadBandAttribute", readThermostatMinSetpointDeadBandAttributeInteractionInfo); + Map readThermostatRemoteSensingCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatRemoteSensingAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readRemoteSensingAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatRemoteSensingCommandParams); + readThermostatInteractionInfo.put( + "readRemoteSensingAttribute", readThermostatRemoteSensingAttributeInteractionInfo); Map readThermostatControlSequenceOfOperationCommandParams = new LinkedHashMap(); InteractionInfo readThermostatControlSequenceOfOperationAttributeInteractionInfo = @@ -8567,6 +8688,20 @@ public Map> getReadAttributeMap() { readThermostatSystemModeCommandParams); readThermostatInteractionInfo.put( "readSystemModeAttribute", readThermostatSystemModeAttributeInteractionInfo); + Map readThermostatThermostatRunningModeCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatThermostatRunningModeAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readThermostatRunningModeAttribute( + (ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatThermostatRunningModeCommandParams); + readThermostatInteractionInfo.put( + "readThermostatRunningModeAttribute", + readThermostatThermostatRunningModeAttributeInteractionInfo); Map readThermostatStartOfWeekCommandParams = new LinkedHashMap(); InteractionInfo readThermostatStartOfWeekAttributeInteractionInfo = @@ -8607,6 +8742,322 @@ public Map> getReadAttributeMap() { readThermostatInteractionInfo.put( "readNumberOfDailyTransitionsAttribute", readThermostatNumberOfDailyTransitionsAttributeInteractionInfo); + Map readThermostatTemperatureSetpointHoldCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatTemperatureSetpointHoldAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readTemperatureSetpointHoldAttribute( + (ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatTemperatureSetpointHoldCommandParams); + readThermostatInteractionInfo.put( + "readTemperatureSetpointHoldAttribute", + readThermostatTemperatureSetpointHoldAttributeInteractionInfo); + Map readThermostatTemperatureSetpointHoldDurationCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatTemperatureSetpointHoldDurationAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readTemperatureSetpointHoldDurationAttribute( + (ChipClusters.ThermostatCluster + .TemperatureSetpointHoldDurationAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedThermostatClusterTemperatureSetpointHoldDurationAttributeCallback(), + readThermostatTemperatureSetpointHoldDurationCommandParams); + readThermostatInteractionInfo.put( + "readTemperatureSetpointHoldDurationAttribute", + readThermostatTemperatureSetpointHoldDurationAttributeInteractionInfo); + Map + readThermostatThermostatProgrammingOperationModeCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatThermostatProgrammingOperationModeAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readThermostatProgrammingOperationModeAttribute( + (ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatThermostatProgrammingOperationModeCommandParams); + readThermostatInteractionInfo.put( + "readThermostatProgrammingOperationModeAttribute", + readThermostatThermostatProgrammingOperationModeAttributeInteractionInfo); + Map readThermostatThermostatRunningStateCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatThermostatRunningStateAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readThermostatRunningStateAttribute( + (ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatThermostatRunningStateCommandParams); + readThermostatInteractionInfo.put( + "readThermostatRunningStateAttribute", + readThermostatThermostatRunningStateAttributeInteractionInfo); + Map readThermostatSetpointChangeSourceCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatSetpointChangeSourceAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readSetpointChangeSourceAttribute( + (ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatSetpointChangeSourceCommandParams); + readThermostatInteractionInfo.put( + "readSetpointChangeSourceAttribute", + readThermostatSetpointChangeSourceAttributeInteractionInfo); + Map readThermostatSetpointChangeAmountCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatSetpointChangeAmountAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readSetpointChangeAmountAttribute( + (ChipClusters.ThermostatCluster.SetpointChangeAmountAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedThermostatClusterSetpointChangeAmountAttributeCallback(), + readThermostatSetpointChangeAmountCommandParams); + readThermostatInteractionInfo.put( + "readSetpointChangeAmountAttribute", + readThermostatSetpointChangeAmountAttributeInteractionInfo); + Map readThermostatSetpointChangeSourceTimestampCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatSetpointChangeSourceTimestampAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readSetpointChangeSourceTimestampAttribute( + (ChipClusters.LongAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readThermostatSetpointChangeSourceTimestampCommandParams); + readThermostatInteractionInfo.put( + "readSetpointChangeSourceTimestampAttribute", + readThermostatSetpointChangeSourceTimestampAttributeInteractionInfo); + Map readThermostatOccupiedSetbackCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatOccupiedSetbackAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readOccupiedSetbackAttribute( + (ChipClusters.ThermostatCluster.OccupiedSetbackAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping.DelegatedThermostatClusterOccupiedSetbackAttributeCallback(), + readThermostatOccupiedSetbackCommandParams); + readThermostatInteractionInfo.put( + "readOccupiedSetbackAttribute", readThermostatOccupiedSetbackAttributeInteractionInfo); + Map readThermostatOccupiedSetbackMinCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatOccupiedSetbackMinAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readOccupiedSetbackMinAttribute( + (ChipClusters.ThermostatCluster.OccupiedSetbackMinAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedThermostatClusterOccupiedSetbackMinAttributeCallback(), + readThermostatOccupiedSetbackMinCommandParams); + readThermostatInteractionInfo.put( + "readOccupiedSetbackMinAttribute", + readThermostatOccupiedSetbackMinAttributeInteractionInfo); + Map readThermostatOccupiedSetbackMaxCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatOccupiedSetbackMaxAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readOccupiedSetbackMaxAttribute( + (ChipClusters.ThermostatCluster.OccupiedSetbackMaxAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedThermostatClusterOccupiedSetbackMaxAttributeCallback(), + readThermostatOccupiedSetbackMaxCommandParams); + readThermostatInteractionInfo.put( + "readOccupiedSetbackMaxAttribute", + readThermostatOccupiedSetbackMaxAttributeInteractionInfo); + Map readThermostatUnoccupiedSetbackCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatUnoccupiedSetbackAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readUnoccupiedSetbackAttribute( + (ChipClusters.ThermostatCluster.UnoccupiedSetbackAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping + .DelegatedThermostatClusterUnoccupiedSetbackAttributeCallback(), + readThermostatUnoccupiedSetbackCommandParams); + readThermostatInteractionInfo.put( + "readUnoccupiedSetbackAttribute", readThermostatUnoccupiedSetbackAttributeInteractionInfo); + Map readThermostatUnoccupiedSetbackMinCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatUnoccupiedSetbackMinAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readUnoccupiedSetbackMinAttribute( + (ChipClusters.ThermostatCluster.UnoccupiedSetbackMinAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedThermostatClusterUnoccupiedSetbackMinAttributeCallback(), + readThermostatUnoccupiedSetbackMinCommandParams); + readThermostatInteractionInfo.put( + "readUnoccupiedSetbackMinAttribute", + readThermostatUnoccupiedSetbackMinAttributeInteractionInfo); + Map readThermostatUnoccupiedSetbackMaxCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatUnoccupiedSetbackMaxAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readUnoccupiedSetbackMaxAttribute( + (ChipClusters.ThermostatCluster.UnoccupiedSetbackMaxAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedThermostatClusterUnoccupiedSetbackMaxAttributeCallback(), + readThermostatUnoccupiedSetbackMaxCommandParams); + readThermostatInteractionInfo.put( + "readUnoccupiedSetbackMaxAttribute", + readThermostatUnoccupiedSetbackMaxAttributeInteractionInfo); + Map readThermostatEmergencyHeatDeltaCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatEmergencyHeatDeltaAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readEmergencyHeatDeltaAttribute( + (ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatEmergencyHeatDeltaCommandParams); + readThermostatInteractionInfo.put( + "readEmergencyHeatDeltaAttribute", + readThermostatEmergencyHeatDeltaAttributeInteractionInfo); + Map readThermostatACTypeCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatACTypeAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readACTypeAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatACTypeCommandParams); + readThermostatInteractionInfo.put( + "readACTypeAttribute", readThermostatACTypeAttributeInteractionInfo); + Map readThermostatACCapacityCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatACCapacityAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readACCapacityAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatACCapacityCommandParams); + readThermostatInteractionInfo.put( + "readACCapacityAttribute", readThermostatACCapacityAttributeInteractionInfo); + Map readThermostatACRefrigerantTypeCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatACRefrigerantTypeAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readACRefrigerantTypeAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatACRefrigerantTypeCommandParams); + readThermostatInteractionInfo.put( + "readACRefrigerantTypeAttribute", readThermostatACRefrigerantTypeAttributeInteractionInfo); + Map readThermostatACCompressorTypeCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatACCompressorTypeAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readACCompressorTypeAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatACCompressorTypeCommandParams); + readThermostatInteractionInfo.put( + "readACCompressorTypeAttribute", readThermostatACCompressorTypeAttributeInteractionInfo); + Map readThermostatACErrorCodeCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatACErrorCodeAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readACErrorCodeAttribute((ChipClusters.LongAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readThermostatACErrorCodeCommandParams); + readThermostatInteractionInfo.put( + "readACErrorCodeAttribute", readThermostatACErrorCodeAttributeInteractionInfo); + Map readThermostatACLouverPositionCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatACLouverPositionAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readACLouverPositionAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatACLouverPositionCommandParams); + readThermostatInteractionInfo.put( + "readACLouverPositionAttribute", readThermostatACLouverPositionAttributeInteractionInfo); + Map readThermostatACCoilTemperatureCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatACCoilTemperatureAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readACCoilTemperatureAttribute( + (ChipClusters.ThermostatCluster.ACCoilTemperatureAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping + .DelegatedThermostatClusterACCoilTemperatureAttributeCallback(), + readThermostatACCoilTemperatureCommandParams); + readThermostatInteractionInfo.put( + "readACCoilTemperatureAttribute", readThermostatACCoilTemperatureAttributeInteractionInfo); + Map readThermostatACCapacityformatCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatACCapacityformatAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readACCapacityformatAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatACCapacityformatCommandParams); + readThermostatInteractionInfo.put( + "readACCapacityformatAttribute", readThermostatACCapacityformatAttributeInteractionInfo); Map readThermostatGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readThermostatGeneratedCommandListAttributeInteractionInfo = diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java index c1c505d8a45dd3..571d380673d247 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java @@ -816,6 +816,42 @@ public Map> getWriteAttributeMap() { writeAttributeMap.put( "pumpConfigurationAndControl", writePumpConfigurationAndControlInteractionInfo); Map writeThermostatInteractionInfo = new LinkedHashMap<>(); + Map writeThermostatHVACSystemTypeConfigurationCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostatHVACSystemTypeConfigurationCommandParameterInfo = + new CommandParameterInfo("value", Integer.class, Integer.class); + writeThermostatHVACSystemTypeConfigurationCommandParams.put( + "value", thermostatHVACSystemTypeConfigurationCommandParameterInfo); + InteractionInfo writeThermostatHVACSystemTypeConfigurationAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeHVACSystemTypeConfigurationAttribute( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatHVACSystemTypeConfigurationCommandParams); + writeThermostatInteractionInfo.put( + "writeHVACSystemTypeConfigurationAttribute", + writeThermostatHVACSystemTypeConfigurationAttributeInteractionInfo); + Map writeThermostatLocalTemperatureCalibrationCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostatlocalTemperatureCalibrationCommandParameterInfo = + new CommandParameterInfo("value", Integer.class, Integer.class); + writeThermostatLocalTemperatureCalibrationCommandParams.put( + "value", thermostatlocalTemperatureCalibrationCommandParameterInfo); + InteractionInfo writeThermostatLocalTemperatureCalibrationAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeLocalTemperatureCalibrationAttribute( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatLocalTemperatureCalibrationCommandParams); + writeThermostatInteractionInfo.put( + "writeLocalTemperatureCalibrationAttribute", + writeThermostatLocalTemperatureCalibrationAttributeInteractionInfo); Map writeThermostatOccupiedCoolingSetpointCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatoccupiedCoolingSetpointCommandParameterInfo = @@ -852,6 +888,42 @@ public Map> getWriteAttributeMap() { writeThermostatInteractionInfo.put( "writeOccupiedHeatingSetpointAttribute", writeThermostatOccupiedHeatingSetpointAttributeInteractionInfo); + Map writeThermostatUnoccupiedCoolingSetpointCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostatunoccupiedCoolingSetpointCommandParameterInfo = + new CommandParameterInfo("value", Integer.class, Integer.class); + writeThermostatUnoccupiedCoolingSetpointCommandParams.put( + "value", thermostatunoccupiedCoolingSetpointCommandParameterInfo); + InteractionInfo writeThermostatUnoccupiedCoolingSetpointAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeUnoccupiedCoolingSetpointAttribute( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatUnoccupiedCoolingSetpointCommandParams); + writeThermostatInteractionInfo.put( + "writeUnoccupiedCoolingSetpointAttribute", + writeThermostatUnoccupiedCoolingSetpointAttributeInteractionInfo); + Map writeThermostatUnoccupiedHeatingSetpointCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostatunoccupiedHeatingSetpointCommandParameterInfo = + new CommandParameterInfo("value", Integer.class, Integer.class); + writeThermostatUnoccupiedHeatingSetpointCommandParams.put( + "value", thermostatunoccupiedHeatingSetpointCommandParameterInfo); + InteractionInfo writeThermostatUnoccupiedHeatingSetpointAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeUnoccupiedHeatingSetpointAttribute( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatUnoccupiedHeatingSetpointCommandParams); + writeThermostatInteractionInfo.put( + "writeUnoccupiedHeatingSetpointAttribute", + writeThermostatUnoccupiedHeatingSetpointAttributeInteractionInfo); Map writeThermostatMinHeatSetpointLimitCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatminHeatSetpointLimitCommandParameterInfo = @@ -942,6 +1014,23 @@ public Map> getWriteAttributeMap() { writeThermostatInteractionInfo.put( "writeMinSetpointDeadBandAttribute", writeThermostatMinSetpointDeadBandAttributeInteractionInfo); + Map writeThermostatRemoteSensingCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostatremoteSensingCommandParameterInfo = + new CommandParameterInfo("value", Integer.class, Integer.class); + writeThermostatRemoteSensingCommandParams.put( + "value", thermostatremoteSensingCommandParameterInfo); + InteractionInfo writeThermostatRemoteSensingAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeRemoteSensingAttribute( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatRemoteSensingCommandParams); + writeThermostatInteractionInfo.put( + "writeRemoteSensingAttribute", writeThermostatRemoteSensingAttributeInteractionInfo); Map writeThermostatControlSequenceOfOperationCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatcontrolSequenceOfOperationCommandParameterInfo = @@ -976,6 +1065,231 @@ public Map> getWriteAttributeMap() { writeThermostatSystemModeCommandParams); writeThermostatInteractionInfo.put( "writeSystemModeAttribute", writeThermostatSystemModeAttributeInteractionInfo); + Map writeThermostatTemperatureSetpointHoldCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostattemperatureSetpointHoldCommandParameterInfo = + new CommandParameterInfo("value", Integer.class, Integer.class); + writeThermostatTemperatureSetpointHoldCommandParams.put( + "value", thermostattemperatureSetpointHoldCommandParameterInfo); + InteractionInfo writeThermostatTemperatureSetpointHoldAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeTemperatureSetpointHoldAttribute( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatTemperatureSetpointHoldCommandParams); + writeThermostatInteractionInfo.put( + "writeTemperatureSetpointHoldAttribute", + writeThermostatTemperatureSetpointHoldAttributeInteractionInfo); + Map writeThermostatTemperatureSetpointHoldDurationCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostattemperatureSetpointHoldDurationCommandParameterInfo = + new CommandParameterInfo("value", Integer.class, Integer.class); + writeThermostatTemperatureSetpointHoldDurationCommandParams.put( + "value", thermostattemperatureSetpointHoldDurationCommandParameterInfo); + InteractionInfo writeThermostatTemperatureSetpointHoldDurationAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeTemperatureSetpointHoldDurationAttribute( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatTemperatureSetpointHoldDurationCommandParams); + writeThermostatInteractionInfo.put( + "writeTemperatureSetpointHoldDurationAttribute", + writeThermostatTemperatureSetpointHoldDurationAttributeInteractionInfo); + Map + writeThermostatThermostatProgrammingOperationModeCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostatthermostatProgrammingOperationModeCommandParameterInfo = + new CommandParameterInfo("value", Integer.class, Integer.class); + writeThermostatThermostatProgrammingOperationModeCommandParams.put( + "value", thermostatthermostatProgrammingOperationModeCommandParameterInfo); + InteractionInfo writeThermostatThermostatProgrammingOperationModeAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeThermostatProgrammingOperationModeAttribute( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatThermostatProgrammingOperationModeCommandParams); + writeThermostatInteractionInfo.put( + "writeThermostatProgrammingOperationModeAttribute", + writeThermostatThermostatProgrammingOperationModeAttributeInteractionInfo); + Map writeThermostatOccupiedSetbackCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostatoccupiedSetbackCommandParameterInfo = + new CommandParameterInfo("value", Integer.class, Integer.class); + writeThermostatOccupiedSetbackCommandParams.put( + "value", thermostatoccupiedSetbackCommandParameterInfo); + InteractionInfo writeThermostatOccupiedSetbackAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeOccupiedSetbackAttribute( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatOccupiedSetbackCommandParams); + writeThermostatInteractionInfo.put( + "writeOccupiedSetbackAttribute", writeThermostatOccupiedSetbackAttributeInteractionInfo); + Map writeThermostatUnoccupiedSetbackCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostatunoccupiedSetbackCommandParameterInfo = + new CommandParameterInfo("value", Integer.class, Integer.class); + writeThermostatUnoccupiedSetbackCommandParams.put( + "value", thermostatunoccupiedSetbackCommandParameterInfo); + InteractionInfo writeThermostatUnoccupiedSetbackAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeUnoccupiedSetbackAttribute( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatUnoccupiedSetbackCommandParams); + writeThermostatInteractionInfo.put( + "writeUnoccupiedSetbackAttribute", + writeThermostatUnoccupiedSetbackAttributeInteractionInfo); + Map writeThermostatEmergencyHeatDeltaCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostatemergencyHeatDeltaCommandParameterInfo = + new CommandParameterInfo("value", Integer.class, Integer.class); + writeThermostatEmergencyHeatDeltaCommandParams.put( + "value", thermostatemergencyHeatDeltaCommandParameterInfo); + InteractionInfo writeThermostatEmergencyHeatDeltaAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeEmergencyHeatDeltaAttribute( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatEmergencyHeatDeltaCommandParams); + writeThermostatInteractionInfo.put( + "writeEmergencyHeatDeltaAttribute", + writeThermostatEmergencyHeatDeltaAttributeInteractionInfo); + Map writeThermostatACTypeCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostatACTypeCommandParameterInfo = + new CommandParameterInfo("value", Integer.class, Integer.class); + writeThermostatACTypeCommandParams.put("value", thermostatACTypeCommandParameterInfo); + InteractionInfo writeThermostatACTypeAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeACTypeAttribute( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatACTypeCommandParams); + writeThermostatInteractionInfo.put( + "writeACTypeAttribute", writeThermostatACTypeAttributeInteractionInfo); + Map writeThermostatACCapacityCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostatACCapacityCommandParameterInfo = + new CommandParameterInfo("value", Integer.class, Integer.class); + writeThermostatACCapacityCommandParams.put("value", thermostatACCapacityCommandParameterInfo); + InteractionInfo writeThermostatACCapacityAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeACCapacityAttribute( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatACCapacityCommandParams); + writeThermostatInteractionInfo.put( + "writeACCapacityAttribute", writeThermostatACCapacityAttributeInteractionInfo); + Map writeThermostatACRefrigerantTypeCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostatACRefrigerantTypeCommandParameterInfo = + new CommandParameterInfo("value", Integer.class, Integer.class); + writeThermostatACRefrigerantTypeCommandParams.put( + "value", thermostatACRefrigerantTypeCommandParameterInfo); + InteractionInfo writeThermostatACRefrigerantTypeAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeACRefrigerantTypeAttribute( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatACRefrigerantTypeCommandParams); + writeThermostatInteractionInfo.put( + "writeACRefrigerantTypeAttribute", + writeThermostatACRefrigerantTypeAttributeInteractionInfo); + Map writeThermostatACCompressorTypeCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostatACCompressorTypeCommandParameterInfo = + new CommandParameterInfo("value", Integer.class, Integer.class); + writeThermostatACCompressorTypeCommandParams.put( + "value", thermostatACCompressorTypeCommandParameterInfo); + InteractionInfo writeThermostatACCompressorTypeAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeACCompressorTypeAttribute( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatACCompressorTypeCommandParams); + writeThermostatInteractionInfo.put( + "writeACCompressorTypeAttribute", writeThermostatACCompressorTypeAttributeInteractionInfo); + Map writeThermostatACErrorCodeCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostatACErrorCodeCommandParameterInfo = + new CommandParameterInfo("value", Long.class, Long.class); + writeThermostatACErrorCodeCommandParams.put("value", thermostatACErrorCodeCommandParameterInfo); + InteractionInfo writeThermostatACErrorCodeAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeACErrorCodeAttribute( + (DefaultClusterCallback) callback, (Long) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatACErrorCodeCommandParams); + writeThermostatInteractionInfo.put( + "writeACErrorCodeAttribute", writeThermostatACErrorCodeAttributeInteractionInfo); + Map writeThermostatACLouverPositionCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostatACLouverPositionCommandParameterInfo = + new CommandParameterInfo("value", Integer.class, Integer.class); + writeThermostatACLouverPositionCommandParams.put( + "value", thermostatACLouverPositionCommandParameterInfo); + InteractionInfo writeThermostatACLouverPositionAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeACLouverPositionAttribute( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatACLouverPositionCommandParams); + writeThermostatInteractionInfo.put( + "writeACLouverPositionAttribute", writeThermostatACLouverPositionAttributeInteractionInfo); + Map writeThermostatACCapacityformatCommandParams = + new LinkedHashMap(); + CommandParameterInfo thermostatACCapacityformatCommandParameterInfo = + new CommandParameterInfo("value", Integer.class, Integer.class); + writeThermostatACCapacityformatCommandParams.put( + "value", thermostatACCapacityformatCommandParameterInfo); + InteractionInfo writeThermostatACCapacityformatAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .writeACCapacityformatAttribute( + (DefaultClusterCallback) callback, (Integer) commandArguments.get("value")); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatACCapacityformatCommandParams); + writeThermostatInteractionInfo.put( + "writeACCapacityformatAttribute", writeThermostatACCapacityformatAttributeInteractionInfo); writeAttributeMap.put("thermostat", writeThermostatInteractionInfo); Map writeFanControlInteractionInfo = new LinkedHashMap<>(); Map writeFanControlFanModeCommandParams = diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 4d4f173e37b6b3..b643ddef10f3f1 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -4710,6 +4710,18 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x00000001: { + "attributeName": "OutdoorTemperature", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + }, + 0x00000002: { + "attributeName": "Occupancy", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + }, 0x00000003: { "attributeName": "AbsMinHeatSetpointLimit", "attributeId": 0x00000003, @@ -4734,6 +4746,32 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x00000007: { + "attributeName": "PICoolingDemand", + "attributeId": 0x00000007, + "type": "int", + "reportable": True, + }, + 0x00000008: { + "attributeName": "PIHeatingDemand", + "attributeId": 0x00000008, + "type": "int", + "reportable": True, + }, + 0x00000009: { + "attributeName": "HVACSystemTypeConfiguration", + "attributeId": 0x00000009, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000010: { + "attributeName": "LocalTemperatureCalibration", + "attributeId": 0x00000010, + "type": "int", + "reportable": True, + "writable": True, + }, 0x00000011: { "attributeName": "OccupiedCoolingSetpoint", "attributeId": 0x00000011, @@ -4748,6 +4786,20 @@ class ChipClusters: "reportable": True, "writable": True, }, + 0x00000013: { + "attributeName": "UnoccupiedCoolingSetpoint", + "attributeId": 0x00000013, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000014: { + "attributeName": "UnoccupiedHeatingSetpoint", + "attributeId": 0x00000014, + "type": "int", + "reportable": True, + "writable": True, + }, 0x00000015: { "attributeName": "MinHeatSetpointLimit", "attributeId": 0x00000015, @@ -4783,6 +4835,13 @@ class ChipClusters: "reportable": True, "writable": True, }, + 0x0000001A: { + "attributeName": "RemoteSensing", + "attributeId": 0x0000001A, + "type": "int", + "reportable": True, + "writable": True, + }, 0x0000001B: { "attributeName": "ControlSequenceOfOperation", "attributeId": 0x0000001B, @@ -4797,6 +4856,12 @@ class ChipClusters: "reportable": True, "writable": True, }, + 0x0000001E: { + "attributeName": "ThermostatRunningMode", + "attributeId": 0x0000001E, + "type": "int", + "reportable": True, + }, 0x00000020: { "attributeName": "StartOfWeek", "attributeId": 0x00000020, @@ -4815,6 +4880,151 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x00000023: { + "attributeName": "TemperatureSetpointHold", + "attributeId": 0x00000023, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000024: { + "attributeName": "TemperatureSetpointHoldDuration", + "attributeId": 0x00000024, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000025: { + "attributeName": "ThermostatProgrammingOperationMode", + "attributeId": 0x00000025, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000029: { + "attributeName": "ThermostatRunningState", + "attributeId": 0x00000029, + "type": "int", + "reportable": True, + }, + 0x00000030: { + "attributeName": "SetpointChangeSource", + "attributeId": 0x00000030, + "type": "int", + "reportable": True, + }, + 0x00000031: { + "attributeName": "SetpointChangeAmount", + "attributeId": 0x00000031, + "type": "int", + "reportable": True, + }, + 0x00000032: { + "attributeName": "SetpointChangeSourceTimestamp", + "attributeId": 0x00000032, + "type": "int", + "reportable": True, + }, + 0x00000034: { + "attributeName": "OccupiedSetback", + "attributeId": 0x00000034, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000035: { + "attributeName": "OccupiedSetbackMin", + "attributeId": 0x00000035, + "type": "int", + "reportable": True, + }, + 0x00000036: { + "attributeName": "OccupiedSetbackMax", + "attributeId": 0x00000036, + "type": "int", + "reportable": True, + }, + 0x00000037: { + "attributeName": "UnoccupiedSetback", + "attributeId": 0x00000037, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000038: { + "attributeName": "UnoccupiedSetbackMin", + "attributeId": 0x00000038, + "type": "int", + "reportable": True, + }, + 0x00000039: { + "attributeName": "UnoccupiedSetbackMax", + "attributeId": 0x00000039, + "type": "int", + "reportable": True, + }, + 0x0000003A: { + "attributeName": "EmergencyHeatDelta", + "attributeId": 0x0000003A, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000040: { + "attributeName": "ACType", + "attributeId": 0x00000040, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000041: { + "attributeName": "ACCapacity", + "attributeId": 0x00000041, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000042: { + "attributeName": "ACRefrigerantType", + "attributeId": 0x00000042, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000043: { + "attributeName": "ACCompressorType", + "attributeId": 0x00000043, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000044: { + "attributeName": "ACErrorCode", + "attributeId": 0x00000044, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000045: { + "attributeName": "ACLouverPosition", + "attributeId": 0x00000045, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000046: { + "attributeName": "ACCoilTemperature", + "attributeId": 0x00000046, + "type": "int", + "reportable": True, + }, + 0x00000047: { + "attributeName": "ACCapacityformat", + "attributeId": 0x00000047, + "type": "int", + "reportable": True, + "writable": True, + }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8,