From 2237907200105609ae2009680aa1306c9a31bb3b Mon Sep 17 00:00:00 2001 From: Thomas Lykkeberg Date: Thu, 7 Apr 2022 17:47:56 +0200 Subject: [PATCH 01/16] Correct the PCC cluster xml to reflect the specification --- ...pump-configuration-and-control-cluster.xml | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml index 7adb0526d4da62..3ad481f1253761 100644 --- a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml @@ -24,30 +24,30 @@ limitations under the License. PUMP_CONFIG_CONTROL_CLUSTER true true - MaxPressure - MaxSpeed - MaxFlow - MinConstPressure - MaxConstPressure - MinCompPressure - MaxCompPressure - MinConstSpeed - MaxConstSpeed - MinConstFlow - MaxConstFlow - MinConstTemp - MaxConstTemp + MaxPressure + MaxSpeed + MaxFlow + MinConstPressure + MaxConstPressure + MinCompPressure + MaxCompPressure + MinConstSpeed + MaxConstSpeed + MinConstFlow + MaxConstFlow + MinConstTemp + MaxConstTemp PumpStatus - EffectiveOperationMode - EffectiveControlMode - Capacity - Speed - LifetimeRunningHours - Power - LifetimeEnergyConsumed - OperationMode - ControlMode - AlarmMask + EffectiveOperationMode + EffectiveControlMode + Capacity + Speed + LifetimeRunningHours + Power + LifetimeEnergyConsumed + OperationMode + ControlMode + AlarmMask SupplyVoltageLow From 974580af9ac012a8a7399fcf6fbf7c60f08cd5e6 Mon Sep 17 00:00:00 2001 From: Thomas Lykkeberg Date: Thu, 7 Apr 2022 20:26:43 +0200 Subject: [PATCH 02/16] * Updated with small corrections to min/max --- .../pump-configuration-and-control-cluster.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml index 3ad481f1253761..ffcc2a0d97c545 100644 --- a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml @@ -35,18 +35,18 @@ limitations under the License. MaxConstSpeed MinConstFlow MaxConstFlow - MinConstTemp + MinConstTemp MaxConstTemp PumpStatus - EffectiveOperationMode - EffectiveControlMode + EffectiveOperationMode + EffectiveControlMode Capacity Speed - LifetimeRunningHours - Power - LifetimeEnergyConsumed - OperationMode - ControlMode + LifetimeRunningHours + Power + LifetimeEnergyConsumed + OperationMode + ControlMode AlarmMask From a891dc16303a604b94069bbc8e8575d706d8ac1b Mon Sep 17 00:00:00 2001 From: Thomas Lykkeberg Date: Thu, 7 Apr 2022 20:57:56 +0200 Subject: [PATCH 03/16] * Added special RW VM access priviledges to LifetimerunningHours and LifetimeEnergyConsumed --- .../chip/pump-configuration-and-control-cluster.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml index ffcc2a0d97c545..c7fc474ba8d7a2 100644 --- a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml @@ -42,9 +42,17 @@ limitations under the License. EffectiveControlMode Capacity Speed - LifetimeRunningHours + + LifetimeRunningHours + + + Power - LifetimeEnergyConsumed + + LifetimeEnergyConsumed + + + OperationMode ControlMode AlarmMask From 9593db22d17cab0896f3496286ed685df431eb61 Mon Sep 17 00:00:00 2001 From: Thomas Lykkeberg Date: Thu, 7 Apr 2022 21:04:57 +0200 Subject: [PATCH 04/16] * Added ClusterRevision to be '3' --- .../data-model/chip/pump-configuration-and-control-cluster.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml index c7fc474ba8d7a2..3b891bae7cf087 100644 --- a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml @@ -24,6 +24,7 @@ limitations under the License. PUMP_CONFIG_CONTROL_CLUSTER true true + MaxPressure MaxSpeed MaxFlow From 1005f5cfcca5acf54c98dd6ef7cc0f11dd350ad4 Mon Sep 17 00:00:00 2001 From: Thomas Lykkeberg Date: Fri, 8 Apr 2022 07:57:23 +0200 Subject: [PATCH 05/16] * Added the RW VM for the OperationMode and ControlMode attributes as well --- .../chip/pump-configuration-and-control-cluster.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml index 3b891bae7cf087..fd154f5784b996 100644 --- a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml @@ -54,8 +54,16 @@ limitations under the License. - OperationMode - ControlMode + + OperationMode + + + + + ControlMode + + + AlarmMask From 1ef0c5ca4dded1ed02027a7e7de055528ad9ec2f Mon Sep 17 00:00:00 2001 From: Thomas Lykkeberg Date: Fri, 8 Apr 2022 08:11:42 +0200 Subject: [PATCH 06/16] * Changed back to hexadecimal notation for min/max --- .../data-model/chip/pump-configuration-and-control-cluster.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml index fd154f5784b996..3ffc1adcc9c106 100644 --- a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml @@ -36,7 +36,7 @@ limitations under the License. MaxConstSpeed MinConstFlow MaxConstFlow - MinConstTemp + MinConstTemp MaxConstTemp PumpStatus EffectiveOperationMode From 0ad0a6e2f05da4a65ff7ae8b2ef4b9da0bb341cb Mon Sep 17 00:00:00 2001 From: Thomas Lykkeberg Date: Fri, 8 Apr 2022 08:44:44 +0200 Subject: [PATCH 07/16] * Re-ran the zap_regen_all.py script --- .../all-clusters-app.matter | 44 +- .../placeholder/linux/apps/app1/config.matter | 44 +- .../placeholder/linux/apps/app2/config.matter | 44 +- examples/pump-app/pump-common/pump-app.matter | 44 +- .../pump-controller-app.matter | 14 +- .../data_model/controller-clusters.matter | 44 +- .../CHIPAttributeTLVValueDecoder.cpp | 262 +++-- .../zap-generated/CHIPClustersWrite-JNI.cpp | 22 +- .../java/zap-generated/CHIPReadCallbacks.cpp | 982 +++++++++++++++++- .../java/zap-generated/CHIPReadCallbacks.h | 450 +++++++- .../chip/devicecontroller/ChipClusters.java | 302 ++++-- .../devicecontroller/ClusterReadMapping.java | 83 +- .../python/chip/clusters/Objects.py | 176 ++-- .../CHIPAttributeTLVValueDecoder.mm | 152 ++- .../CHIP/zap-generated/CHIPClustersObjc.h | 4 +- .../CHIP/zap-generated/CHIPClustersObjc.mm | 655 ++++++------ .../CHIP/zap-generated/CHIPTestClustersObjc.h | 32 +- .../zap-generated/CHIPTestClustersObjc.mm | 148 ++- .../Framework/CHIPTests/CHIPClustersTests.m | 9 - .../all-clusters-app/zap-generated/access.h | 24 + .../zap-generated/endpoint_config.h | 48 +- .../zap-generated/attributes/Accessors.cpp | 600 ++++++++--- .../zap-generated/attributes/Accessors.h | 92 +- .../zap-generated/cluster-objects.h | 184 ++-- .../cluster/CHIPTestClustersObjc.h | 32 +- .../cluster/CHIPTestClustersObjc.mm | 148 ++- .../zap-generated/cluster/Commands.h | 4 +- .../zap-generated/test/Commands.h | 9 - .../zap-generated/cluster/Commands.h | 8 +- .../cluster/logging/DataModelLogger.cpp | 44 +- .../chip-tool/zap-generated/test/Commands.h | 342 +++--- .../placeholder/app1/zap-generated/access.h | 24 + .../app1/zap-generated/endpoint_config.h | 48 +- .../placeholder/app2/zap-generated/access.h | 24 + .../app2/zap-generated/endpoint_config.h | 48 +- zzz_generated/pump-app/zap-generated/access.h | 24 + .../pump-app/zap-generated/endpoint_config.h | 48 +- 37 files changed, 3769 insertions(+), 1493 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 80e2901e3b092f..f896d8da346feb 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2626,29 +2626,29 @@ server cluster PumpConfigurationAndControl = 512 { info event TurbineOperation = 16 { } - readonly attribute int16s maxPressure = 0; - readonly attribute int16u maxSpeed = 1; - readonly attribute int16u maxFlow = 2; - readonly attribute int16s minConstPressure = 3; - readonly attribute int16s maxConstPressure = 4; - readonly attribute int16s minCompPressure = 5; - readonly attribute int16s maxCompPressure = 6; - readonly attribute int16u minConstSpeed = 7; - readonly attribute int16u maxConstSpeed = 8; - readonly attribute int16u minConstFlow = 9; - readonly attribute int16u maxConstFlow = 10; - readonly attribute int16s minConstTemp = 11; - readonly attribute int16s maxConstTemp = 12; + readonly attribute nullable int16s maxPressure = 0; + readonly attribute nullable int16u maxSpeed = 1; + readonly attribute nullable int16u maxFlow = 2; + readonly attribute nullable int16s minConstPressure = 3; + readonly attribute nullable int16s maxConstPressure = 4; + readonly attribute nullable int16s minCompPressure = 5; + readonly attribute nullable int16s maxCompPressure = 6; + readonly attribute nullable int16u minConstSpeed = 7; + readonly attribute nullable int16u maxConstSpeed = 8; + readonly attribute nullable int16u minConstFlow = 9; + readonly attribute nullable int16u maxConstFlow = 10; + readonly attribute nullable int16s minConstTemp = 11; + readonly attribute nullable int16s maxConstTemp = 12; readonly attribute bitmap16 pumpStatus = 16; - readonly attribute enum8 effectiveOperationMode = 17; - readonly attribute enum8 effectiveControlMode = 18; - readonly attribute int16s capacity = 19; - readonly attribute int16u speed = 20; - attribute nullable int24u lifetimeRunningHours = 21; - readonly attribute int24u power = 22; - attribute nullable int32u lifetimeEnergyConsumed = 23; - attribute enum8 operationMode = 32; - attribute enum8 controlMode = 33; + readonly attribute PumpOperationMode effectiveOperationMode = 17; + readonly attribute PumpControlMode effectiveControlMode = 18; + readonly attribute nullable int16s capacity = 19; + readonly attribute nullable int16u speed = 20; + attribute int24u lifetimeRunningHours = 21; + readonly attribute nullable int24u power = 22; + attribute int32u lifetimeEnergyConsumed = 23; + attribute PumpOperationMode operationMode = 32; + attribute PumpControlMode controlMode = 33; readonly attribute bitmap16 alarmMask = 34; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index d2669ad03e2994..8699be136c79b3 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1854,29 +1854,29 @@ server cluster PumpConfigurationAndControl = 512 { info event TurbineOperation = 16 { } - readonly attribute int16s maxPressure = 0; - readonly attribute int16u maxSpeed = 1; - readonly attribute int16u maxFlow = 2; - readonly attribute int16s minConstPressure = 3; - readonly attribute int16s maxConstPressure = 4; - readonly attribute int16s minCompPressure = 5; - readonly attribute int16s maxCompPressure = 6; - readonly attribute int16u minConstSpeed = 7; - readonly attribute int16u maxConstSpeed = 8; - readonly attribute int16u minConstFlow = 9; - readonly attribute int16u maxConstFlow = 10; - readonly attribute int16s minConstTemp = 11; - readonly attribute int16s maxConstTemp = 12; + readonly attribute nullable int16s maxPressure = 0; + readonly attribute nullable int16u maxSpeed = 1; + readonly attribute nullable int16u maxFlow = 2; + readonly attribute nullable int16s minConstPressure = 3; + readonly attribute nullable int16s maxConstPressure = 4; + readonly attribute nullable int16s minCompPressure = 5; + readonly attribute nullable int16s maxCompPressure = 6; + readonly attribute nullable int16u minConstSpeed = 7; + readonly attribute nullable int16u maxConstSpeed = 8; + readonly attribute nullable int16u minConstFlow = 9; + readonly attribute nullable int16u maxConstFlow = 10; + readonly attribute nullable int16s minConstTemp = 11; + readonly attribute nullable int16s maxConstTemp = 12; readonly attribute bitmap16 pumpStatus = 16; - readonly attribute enum8 effectiveOperationMode = 17; - readonly attribute enum8 effectiveControlMode = 18; - readonly attribute int16s capacity = 19; - readonly attribute int16u speed = 20; - attribute nullable int24u lifetimeRunningHours = 21; - readonly attribute int24u power = 22; - attribute nullable int32u lifetimeEnergyConsumed = 23; - attribute enum8 operationMode = 32; - attribute enum8 controlMode = 33; + readonly attribute PumpOperationMode effectiveOperationMode = 17; + readonly attribute PumpControlMode effectiveControlMode = 18; + readonly attribute nullable int16s capacity = 19; + readonly attribute nullable int16u speed = 20; + attribute int24u lifetimeRunningHours = 21; + readonly attribute nullable int24u power = 22; + attribute int32u lifetimeEnergyConsumed = 23; + attribute PumpOperationMode operationMode = 32; + attribute PumpControlMode controlMode = 33; readonly attribute bitmap16 alarmMask = 34; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 483fde4b86cbd4..5c491fb78105c2 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1585,29 +1585,29 @@ server cluster PumpConfigurationAndControl = 512 { info event TurbineOperation = 16 { } - readonly attribute int16s maxPressure = 0; - readonly attribute int16u maxSpeed = 1; - readonly attribute int16u maxFlow = 2; - readonly attribute int16s minConstPressure = 3; - readonly attribute int16s maxConstPressure = 4; - readonly attribute int16s minCompPressure = 5; - readonly attribute int16s maxCompPressure = 6; - readonly attribute int16u minConstSpeed = 7; - readonly attribute int16u maxConstSpeed = 8; - readonly attribute int16u minConstFlow = 9; - readonly attribute int16u maxConstFlow = 10; - readonly attribute int16s minConstTemp = 11; - readonly attribute int16s maxConstTemp = 12; + readonly attribute nullable int16s maxPressure = 0; + readonly attribute nullable int16u maxSpeed = 1; + readonly attribute nullable int16u maxFlow = 2; + readonly attribute nullable int16s minConstPressure = 3; + readonly attribute nullable int16s maxConstPressure = 4; + readonly attribute nullable int16s minCompPressure = 5; + readonly attribute nullable int16s maxCompPressure = 6; + readonly attribute nullable int16u minConstSpeed = 7; + readonly attribute nullable int16u maxConstSpeed = 8; + readonly attribute nullable int16u minConstFlow = 9; + readonly attribute nullable int16u maxConstFlow = 10; + readonly attribute nullable int16s minConstTemp = 11; + readonly attribute nullable int16s maxConstTemp = 12; readonly attribute bitmap16 pumpStatus = 16; - readonly attribute enum8 effectiveOperationMode = 17; - readonly attribute enum8 effectiveControlMode = 18; - readonly attribute int16s capacity = 19; - readonly attribute int16u speed = 20; - attribute nullable int24u lifetimeRunningHours = 21; - readonly attribute int24u power = 22; - attribute nullable int32u lifetimeEnergyConsumed = 23; - attribute enum8 operationMode = 32; - attribute enum8 controlMode = 33; + readonly attribute PumpOperationMode effectiveOperationMode = 17; + readonly attribute PumpControlMode effectiveControlMode = 18; + readonly attribute nullable int16s capacity = 19; + readonly attribute nullable int16u speed = 20; + attribute int24u lifetimeRunningHours = 21; + readonly attribute nullable int24u power = 22; + attribute int32u lifetimeEnergyConsumed = 23; + attribute PumpOperationMode operationMode = 32; + attribute PumpControlMode controlMode = 33; readonly attribute bitmap16 alarmMask = 34; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 724e666ebbff4f..da99f73449d4bc 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -1161,29 +1161,29 @@ server cluster PumpConfigurationAndControl = 512 { info event TurbineOperation = 16 { } - readonly attribute int16s maxPressure = 0; - readonly attribute int16u maxSpeed = 1; - readonly attribute int16u maxFlow = 2; - readonly attribute int16s minConstPressure = 3; - readonly attribute int16s maxConstPressure = 4; - readonly attribute int16s minCompPressure = 5; - readonly attribute int16s maxCompPressure = 6; - readonly attribute int16u minConstSpeed = 7; - readonly attribute int16u maxConstSpeed = 8; - readonly attribute int16u minConstFlow = 9; - readonly attribute int16u maxConstFlow = 10; - readonly attribute int16s minConstTemp = 11; - readonly attribute int16s maxConstTemp = 12; + readonly attribute nullable int16s maxPressure = 0; + readonly attribute nullable int16u maxSpeed = 1; + readonly attribute nullable int16u maxFlow = 2; + readonly attribute nullable int16s minConstPressure = 3; + readonly attribute nullable int16s maxConstPressure = 4; + readonly attribute nullable int16s minCompPressure = 5; + readonly attribute nullable int16s maxCompPressure = 6; + readonly attribute nullable int16u minConstSpeed = 7; + readonly attribute nullable int16u maxConstSpeed = 8; + readonly attribute nullable int16u minConstFlow = 9; + readonly attribute nullable int16u maxConstFlow = 10; + readonly attribute nullable int16s minConstTemp = 11; + readonly attribute nullable int16s maxConstTemp = 12; readonly attribute bitmap16 pumpStatus = 16; - readonly attribute enum8 effectiveOperationMode = 17; - readonly attribute enum8 effectiveControlMode = 18; - readonly attribute int16s capacity = 19; - readonly attribute int16u speed = 20; - attribute nullable int24u lifetimeRunningHours = 21; - readonly attribute int24u power = 22; - attribute nullable int32u lifetimeEnergyConsumed = 23; - attribute enum8 operationMode = 32; - attribute enum8 controlMode = 33; + readonly attribute PumpOperationMode effectiveOperationMode = 17; + readonly attribute PumpControlMode effectiveControlMode = 18; + readonly attribute nullable int16s capacity = 19; + readonly attribute nullable int16u speed = 20; + attribute int24u lifetimeRunningHours = 21; + readonly attribute nullable int24u power = 22; + attribute int32u lifetimeEnergyConsumed = 23; + attribute PumpOperationMode operationMode = 32; + attribute PumpControlMode controlMode = 33; readonly attribute bitmap16 alarmMask = 34; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index b047be40336d96..d12ec59187e49b 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -1028,13 +1028,13 @@ client cluster PumpConfigurationAndControl = 512 { info event TurbineOperation = 16 { } - readonly attribute int16s maxPressure = 0; - readonly attribute int16u maxSpeed = 1; - readonly attribute int16u maxFlow = 2; - readonly attribute enum8 effectiveOperationMode = 17; - readonly attribute enum8 effectiveControlMode = 18; - readonly attribute int16s capacity = 19; - attribute enum8 operationMode = 32; + readonly attribute nullable int16s maxPressure = 0; + readonly attribute nullable int16u maxSpeed = 1; + readonly attribute nullable int16u maxFlow = 2; + readonly attribute PumpOperationMode effectiveOperationMode = 17; + readonly attribute PumpControlMode effectiveControlMode = 18; + readonly attribute nullable int16s capacity = 19; + attribute PumpOperationMode operationMode = 32; readonly attribute int16u clusterRevision = 65533; } diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index f809f0bfbc31ee..d9185852d2f04f 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3078,29 +3078,29 @@ client cluster PumpConfigurationAndControl = 512 { info event TurbineOperation = 16 { } - readonly attribute int16s maxPressure = 0; - readonly attribute int16u maxSpeed = 1; - readonly attribute int16u maxFlow = 2; - readonly attribute int16s minConstPressure = 3; - readonly attribute int16s maxConstPressure = 4; - readonly attribute int16s minCompPressure = 5; - readonly attribute int16s maxCompPressure = 6; - readonly attribute int16u minConstSpeed = 7; - readonly attribute int16u maxConstSpeed = 8; - readonly attribute int16u minConstFlow = 9; - readonly attribute int16u maxConstFlow = 10; - readonly attribute int16s minConstTemp = 11; - readonly attribute int16s maxConstTemp = 12; + readonly attribute nullable int16s maxPressure = 0; + readonly attribute nullable int16u maxSpeed = 1; + readonly attribute nullable int16u maxFlow = 2; + readonly attribute nullable int16s minConstPressure = 3; + readonly attribute nullable int16s maxConstPressure = 4; + readonly attribute nullable int16s minCompPressure = 5; + readonly attribute nullable int16s maxCompPressure = 6; + readonly attribute nullable int16u minConstSpeed = 7; + readonly attribute nullable int16u maxConstSpeed = 8; + readonly attribute nullable int16u minConstFlow = 9; + readonly attribute nullable int16u maxConstFlow = 10; + readonly attribute nullable int16s minConstTemp = 11; + readonly attribute nullable int16s maxConstTemp = 12; readonly attribute bitmap16 pumpStatus = 16; - readonly attribute enum8 effectiveOperationMode = 17; - readonly attribute enum8 effectiveControlMode = 18; - readonly attribute int16s capacity = 19; - readonly attribute int16u speed = 20; - attribute nullable int24u lifetimeRunningHours = 21; - readonly attribute int24u power = 22; - attribute nullable int32u lifetimeEnergyConsumed = 23; - attribute enum8 operationMode = 32; - attribute enum8 controlMode = 33; + readonly attribute PumpOperationMode effectiveOperationMode = 17; + readonly attribute PumpControlMode effectiveControlMode = 18; + readonly attribute nullable int16s capacity = 19; + readonly attribute nullable int16u speed = 20; + attribute int24u lifetimeRunningHours = 21; + readonly attribute nullable int24u power = 22; + attribute int32u lifetimeEnergyConsumed = 23; + attribute PumpOperationMode operationMode = 32; + attribute PumpControlMode controlMode = 33; readonly attribute bitmap16 alarmMask = 34; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index ddd59a4188e39a..40bf8239e38bb8 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -10100,10 +10100,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::MaxSpeed::Id: { @@ -10115,10 +10122,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::MaxFlow::Id: { @@ -10130,10 +10144,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::MinConstPressure::Id: { @@ -10145,10 +10166,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::MaxConstPressure::Id: { @@ -10160,10 +10188,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::MinCompPressure::Id: { @@ -10175,10 +10210,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::MaxCompPressure::Id: { @@ -10190,10 +10232,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::MinConstSpeed::Id: { @@ -10205,10 +10254,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::MaxConstSpeed::Id: { @@ -10220,10 +10276,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::MinConstFlow::Id: { @@ -10235,10 +10298,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::MaxConstFlow::Id: { @@ -10250,10 +10320,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::MinConstTemp::Id: { @@ -10265,10 +10342,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::MaxConstTemp::Id: { @@ -10280,10 +10364,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::PumpStatus::Id: { @@ -10313,7 +10404,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + static_cast(cppValue), value); return value; } case Attributes::EffectiveControlMode::Id: { @@ -10328,7 +10419,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + static_cast(cppValue), value); return value; } case Attributes::Capacity::Id: { @@ -10340,29 +10431,21 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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::Speed::Id: { - using TypeInfo = Attributes::Speed::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) + if (cppValue.IsNull()) { - return nullptr; + 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); } - 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::LifetimeRunningHours::Id: { - using TypeInfo = Attributes::LifetimeRunningHours::TypeInfo; + case Attributes::Speed::Id: { + using TypeInfo = Attributes::Speed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -10376,15 +10459,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } else { - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + 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::Power::Id: { - using TypeInfo = Attributes::Power::TypeInfo; + case Attributes::LifetimeRunningHours::Id: { + using TypeInfo = Attributes::LifetimeRunningHours::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -10398,8 +10481,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR cppValue, value); return value; } - case Attributes::LifetimeEnergyConsumed::Id: { - using TypeInfo = Attributes::LifetimeEnergyConsumed::TypeInfo; + case Attributes::Power::Id: { + using TypeInfo = Attributes::Power::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -10420,6 +10503,21 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } + case Attributes::LifetimeEnergyConsumed::Id: { + using TypeInfo = Attributes::LifetimeEnergyConsumed::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::OperationMode::Id: { using TypeInfo = Attributes::OperationMode::TypeInfo; TypeInfo::DecodableType cppValue; @@ -10432,7 +10530,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + static_cast(cppValue), value); return value; } case Attributes::ControlMode::Id: { @@ -10447,7 +10545,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + static_cast(cppValue), value); return value; } case Attributes::AlarmMask::Id: { diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index 8097fdea6c08c0..3e0eb5008ce702 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -3098,16 +3098,7 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeRunningHoursAt std::vector> cleanupByteArrays; std::vector> cleanupStrings; - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3158,16 +3149,7 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeEnergyConsumed std::vector> cleanupByteArrays; std::vector> cleanupStrings; - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().LongToPrimitive(value)); - } + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 92d765301a9dcf..ca1836f7d45eff 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -15496,9 +15496,681 @@ void CHIPPressureMeasurementAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: - CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxPressureAttributeCallback( + 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"); + } +} + +CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::~CHIPPumpConfigurationAndControlMaxPressureAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxPressureAttributeCallback::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); +} + +CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback( + 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"); + } +} + +CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback::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); +} + +CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::CHIPPumpConfigurationAndControlMaxFlowAttributeCallback( + 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"); + } +} + +CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::~CHIPPumpConfigurationAndControlMaxFlowAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxFlowAttributeCallback::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); +} + +CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback( + 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"); + } +} + +CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback:: + ~CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback::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); +} + +CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback( + 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"); + } +} + +CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback:: + ~CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback::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); +} + +CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback( + 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"); + } +} + +CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::~CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback::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); +} + +CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback( + 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"); + } +} + +CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::~CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback::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); +} + +CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback( + 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"); + } +} + +CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback::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); +} + +CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback( + 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"); + } +} + +CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback::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); +} + +CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback( + 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"); + } +} + +CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::~CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback::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); +} + +CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -15515,8 +16187,7 @@ CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: } } -CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: - ~CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback() +CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15527,8 +16198,8 @@ CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15536,8 +16207,8 @@ void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::Callb jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + 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; @@ -15545,7 +16216,7 @@ void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::Callb ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &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; @@ -15555,18 +16226,286 @@ void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::Callb } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + 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); +} + +CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::CHIPPumpConfigurationAndControlMinConstTempAttributeCallback( + 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"); + } +} + +CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::~CHIPPumpConfigurationAndControlMinConstTempAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMinConstTempAttributeCallback::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); +} + +CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback( + 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"); + } +} + +CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::~CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback::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); +} + +CHIPPumpConfigurationAndControlCapacityAttributeCallback::CHIPPumpConfigurationAndControlCapacityAttributeCallback( + 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"); + } +} + +CHIPPumpConfigurationAndControlCapacityAttributeCallback::~CHIPPumpConfigurationAndControlCapacityAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlCapacityAttributeCallback::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); +} + +CHIPPumpConfigurationAndControlSpeedAttributeCallback::CHIPPumpConfigurationAndControlSpeedAttributeCallback(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"); + } +} + +CHIPPumpConfigurationAndControlSpeedAttributeCallback::~CHIPPumpConfigurationAndControlSpeedAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlSpeedAttributeCallback::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); } -CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: - CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPumpConfigurationAndControlPowerAttributeCallback::CHIPPumpConfigurationAndControlPowerAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -15583,8 +16522,7 @@ CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: } } -CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: - ~CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback() +CHIPPumpConfigurationAndControlPowerAttributeCallback::~CHIPPumpConfigurationAndControlPowerAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15595,8 +16533,8 @@ CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPPumpConfigurationAndControlPowerAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15604,8 +16542,8 @@ void CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::Cal jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + 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; diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 301df11bce6430..7c7e18c98aacea 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -6429,28 +6429,448 @@ class CHIPPressureMeasurementAttributeListAttributeCallback bool keepAlive; }; -class CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback - : public chip::Callback::Callback +class CHIPPumpConfigurationAndControlMaxPressureAttributeCallback + : public chip::Callback::Callback { public: - CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPPumpConfigurationAndControlMaxPressureAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(); + ~CHIPPumpConfigurationAndControlMaxPressureAttributeCallback(); - static void maybeDestroy(CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback * callback) + static void maybeDestroy(CHIPPumpConfigurationAndControlMaxPressureAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlMaxSpeedAttributeCallback * 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_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPumpConfigurationAndControlMaxFlowAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlMaxFlowAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlMaxFlowAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlMaxFlowAttributeCallback * 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_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlMinConstPressureAttributeCallback * 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_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlMaxConstPressureAttributeCallback * 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_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlMinCompPressureAttributeCallback * 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_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlMaxCompPressureAttributeCallback * 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_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlMinConstSpeedAttributeCallback * 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_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlMaxConstSpeedAttributeCallback * 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_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlMinConstFlowAttributeCallback * 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_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlMaxConstFlowAttributeCallback * 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_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPumpConfigurationAndControlMinConstTempAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlMinConstTempAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlMinConstTempAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlMinConstTempAttributeCallback * 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_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlMaxConstTempAttributeCallback * 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_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPumpConfigurationAndControlCapacityAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlCapacityAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlCapacityAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlCapacityAttributeCallback * 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_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPumpConfigurationAndControlSpeedAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlSpeedAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlSpeedAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlSpeedAttributeCallback * 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_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( - reinterpret_cast(context)->javaCallbackRef); + reinterpret_cast(context)->javaCallbackRef); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); }; @@ -6459,20 +6879,20 @@ class CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback bool keepAlive; }; -class CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback - : public chip::Callback::Callback +class CHIPPumpConfigurationAndControlPowerAttributeCallback + : public chip::Callback::Callback { public: - CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPPumpConfigurationAndControlPowerAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(); + ~CHIPPumpConfigurationAndControlPowerAttributeCallback(); - static void maybeDestroy(CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback * callback) + static void maybeDestroy(CHIPPumpConfigurationAndControlPowerAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } @@ -6480,7 +6900,7 @@ class CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( - reinterpret_cast(context)->javaCallbackRef); + reinterpret_cast(context)->javaCallbackRef); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); }; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 3d6d457e50d73f..517356118b46e3 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -13835,15 +13835,127 @@ public PumpConfigurationAndControlCluster(long devicePtr, int endpointId) { @Override public native long initWithDevice(long devicePtr, int endpointId); - public interface LifetimeRunningHoursAttributeCallback { - void onSuccess(@Nullable Long value); + public interface MaxPressureAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface MaxSpeedAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface MaxFlowAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface MinConstPressureAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface MaxConstPressureAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface MinCompPressureAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface MaxCompPressureAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface MinConstSpeedAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface MaxConstSpeedAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface MinConstFlowAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface MaxConstFlowAttributeCallback { + void onSuccess(@Nullable Integer value); void onError(Exception ex); default void onSubscriptionEstablished() {} } - public interface LifetimeEnergyConsumedAttributeCallback { + public interface MinConstTempAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface MaxConstTempAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface CapacityAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface SpeedAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface PowerAttributeCallback { void onSuccess(@Nullable Long value); void onError(Exception ex); @@ -13875,120 +13987,120 @@ public interface AttributeListAttributeCallback { default void onSubscriptionEstablished() {} } - public void readMaxPressureAttribute(IntegerAttributeCallback callback) { + public void readMaxPressureAttribute(MaxPressureAttributeCallback callback) { readMaxPressureAttribute(chipClusterPtr, callback); } public void subscribeMaxPressureAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + MaxPressureAttributeCallback callback, int minInterval, int maxInterval) { subscribeMaxPressureAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readMaxSpeedAttribute(IntegerAttributeCallback callback) { + public void readMaxSpeedAttribute(MaxSpeedAttributeCallback callback) { readMaxSpeedAttribute(chipClusterPtr, callback); } public void subscribeMaxSpeedAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + MaxSpeedAttributeCallback callback, int minInterval, int maxInterval) { subscribeMaxSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readMaxFlowAttribute(IntegerAttributeCallback callback) { + public void readMaxFlowAttribute(MaxFlowAttributeCallback callback) { readMaxFlowAttribute(chipClusterPtr, callback); } public void subscribeMaxFlowAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + MaxFlowAttributeCallback callback, int minInterval, int maxInterval) { subscribeMaxFlowAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readMinConstPressureAttribute(IntegerAttributeCallback callback) { + public void readMinConstPressureAttribute(MinConstPressureAttributeCallback callback) { readMinConstPressureAttribute(chipClusterPtr, callback); } public void subscribeMinConstPressureAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + MinConstPressureAttributeCallback callback, int minInterval, int maxInterval) { subscribeMinConstPressureAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readMaxConstPressureAttribute(IntegerAttributeCallback callback) { + public void readMaxConstPressureAttribute(MaxConstPressureAttributeCallback callback) { readMaxConstPressureAttribute(chipClusterPtr, callback); } public void subscribeMaxConstPressureAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + MaxConstPressureAttributeCallback callback, int minInterval, int maxInterval) { subscribeMaxConstPressureAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readMinCompPressureAttribute(IntegerAttributeCallback callback) { + public void readMinCompPressureAttribute(MinCompPressureAttributeCallback callback) { readMinCompPressureAttribute(chipClusterPtr, callback); } public void subscribeMinCompPressureAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + MinCompPressureAttributeCallback callback, int minInterval, int maxInterval) { subscribeMinCompPressureAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readMaxCompPressureAttribute(IntegerAttributeCallback callback) { + public void readMaxCompPressureAttribute(MaxCompPressureAttributeCallback callback) { readMaxCompPressureAttribute(chipClusterPtr, callback); } public void subscribeMaxCompPressureAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + MaxCompPressureAttributeCallback callback, int minInterval, int maxInterval) { subscribeMaxCompPressureAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readMinConstSpeedAttribute(IntegerAttributeCallback callback) { + public void readMinConstSpeedAttribute(MinConstSpeedAttributeCallback callback) { readMinConstSpeedAttribute(chipClusterPtr, callback); } public void subscribeMinConstSpeedAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + MinConstSpeedAttributeCallback callback, int minInterval, int maxInterval) { subscribeMinConstSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readMaxConstSpeedAttribute(IntegerAttributeCallback callback) { + public void readMaxConstSpeedAttribute(MaxConstSpeedAttributeCallback callback) { readMaxConstSpeedAttribute(chipClusterPtr, callback); } public void subscribeMaxConstSpeedAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + MaxConstSpeedAttributeCallback callback, int minInterval, int maxInterval) { subscribeMaxConstSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readMinConstFlowAttribute(IntegerAttributeCallback callback) { + public void readMinConstFlowAttribute(MinConstFlowAttributeCallback callback) { readMinConstFlowAttribute(chipClusterPtr, callback); } public void subscribeMinConstFlowAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + MinConstFlowAttributeCallback callback, int minInterval, int maxInterval) { subscribeMinConstFlowAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readMaxConstFlowAttribute(IntegerAttributeCallback callback) { + public void readMaxConstFlowAttribute(MaxConstFlowAttributeCallback callback) { readMaxConstFlowAttribute(chipClusterPtr, callback); } public void subscribeMaxConstFlowAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + MaxConstFlowAttributeCallback callback, int minInterval, int maxInterval) { subscribeMaxConstFlowAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readMinConstTempAttribute(IntegerAttributeCallback callback) { + public void readMinConstTempAttribute(MinConstTempAttributeCallback callback) { readMinConstTempAttribute(chipClusterPtr, callback); } public void subscribeMinConstTempAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + MinConstTempAttributeCallback callback, int minInterval, int maxInterval) { subscribeMinConstTempAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readMaxConstTempAttribute(IntegerAttributeCallback callback) { + public void readMaxConstTempAttribute(MaxConstTempAttributeCallback callback) { readMaxConstTempAttribute(chipClusterPtr, callback); } public void subscribeMaxConstTempAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + MaxConstTempAttributeCallback callback, int minInterval, int maxInterval) { subscribeMaxConstTempAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -14019,25 +14131,25 @@ public void subscribeEffectiveControlModeAttribute( subscribeEffectiveControlModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readCapacityAttribute(IntegerAttributeCallback callback) { + public void readCapacityAttribute(CapacityAttributeCallback callback) { readCapacityAttribute(chipClusterPtr, callback); } public void subscribeCapacityAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + CapacityAttributeCallback callback, int minInterval, int maxInterval) { subscribeCapacityAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readSpeedAttribute(IntegerAttributeCallback callback) { + public void readSpeedAttribute(SpeedAttributeCallback callback) { readSpeedAttribute(chipClusterPtr, callback); } public void subscribeSpeedAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + SpeedAttributeCallback callback, int minInterval, int maxInterval) { subscribeSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readLifetimeRunningHoursAttribute(LifetimeRunningHoursAttributeCallback callback) { + public void readLifetimeRunningHoursAttribute(LongAttributeCallback callback) { readLifetimeRunningHoursAttribute(chipClusterPtr, callback); } @@ -14051,21 +14163,20 @@ public void writeLifetimeRunningHoursAttribute( } public void subscribeLifetimeRunningHoursAttribute( - LifetimeRunningHoursAttributeCallback callback, int minInterval, int maxInterval) { + LongAttributeCallback callback, int minInterval, int maxInterval) { subscribeLifetimeRunningHoursAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readPowerAttribute(LongAttributeCallback callback) { + public void readPowerAttribute(PowerAttributeCallback callback) { readPowerAttribute(chipClusterPtr, callback); } public void subscribePowerAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { + PowerAttributeCallback callback, int minInterval, int maxInterval) { subscribePowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readLifetimeEnergyConsumedAttribute( - LifetimeEnergyConsumedAttributeCallback callback) { + public void readLifetimeEnergyConsumedAttribute(LongAttributeCallback callback) { readLifetimeEnergyConsumedAttribute(chipClusterPtr, callback); } @@ -14079,7 +14190,7 @@ public void writeLifetimeEnergyConsumedAttribute( } public void subscribeLifetimeEnergyConsumedAttribute( - LifetimeEnergyConsumedAttributeCallback callback, int minInterval, int maxInterval) { + LongAttributeCallback callback, int minInterval, int maxInterval) { subscribeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -14174,82 +14285,115 @@ public void subscribeClusterRevisionAttribute( } private native void readMaxPressureAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, MaxPressureAttributeCallback callback); private native void subscribeMaxPressureAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + MaxPressureAttributeCallback callback, + int minInterval, + int maxInterval); private native void readMaxSpeedAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, MaxSpeedAttributeCallback callback); private native void subscribeMaxSpeedAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, MaxSpeedAttributeCallback callback, int minInterval, int maxInterval); private native void readMaxFlowAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, MaxFlowAttributeCallback callback); private native void subscribeMaxFlowAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, MaxFlowAttributeCallback callback, int minInterval, int maxInterval); private native void readMinConstPressureAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, MinConstPressureAttributeCallback callback); private native void subscribeMinConstPressureAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + MinConstPressureAttributeCallback callback, + int minInterval, + int maxInterval); private native void readMaxConstPressureAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, MaxConstPressureAttributeCallback callback); private native void subscribeMaxConstPressureAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + MaxConstPressureAttributeCallback callback, + int minInterval, + int maxInterval); private native void readMinCompPressureAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, MinCompPressureAttributeCallback callback); private native void subscribeMinCompPressureAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + MinCompPressureAttributeCallback callback, + int minInterval, + int maxInterval); private native void readMaxCompPressureAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, MaxCompPressureAttributeCallback callback); private native void subscribeMaxCompPressureAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + MaxCompPressureAttributeCallback callback, + int minInterval, + int maxInterval); private native void readMinConstSpeedAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, MinConstSpeedAttributeCallback callback); private native void subscribeMinConstSpeedAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + MinConstSpeedAttributeCallback callback, + int minInterval, + int maxInterval); private native void readMaxConstSpeedAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, MaxConstSpeedAttributeCallback callback); private native void subscribeMaxConstSpeedAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + MaxConstSpeedAttributeCallback callback, + int minInterval, + int maxInterval); private native void readMinConstFlowAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, MinConstFlowAttributeCallback callback); private native void subscribeMinConstFlowAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + MinConstFlowAttributeCallback callback, + int minInterval, + int maxInterval); private native void readMaxConstFlowAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, MaxConstFlowAttributeCallback callback); private native void subscribeMaxConstFlowAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + MaxConstFlowAttributeCallback callback, + int minInterval, + int maxInterval); private native void readMinConstTempAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, MinConstTempAttributeCallback callback); private native void subscribeMinConstTempAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + MinConstTempAttributeCallback callback, + int minInterval, + int maxInterval); private native void readMaxConstTempAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, MaxConstTempAttributeCallback callback); private native void subscribeMaxConstTempAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + MaxConstTempAttributeCallback callback, + int minInterval, + int maxInterval); private native void readPumpStatusAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -14270,18 +14414,18 @@ private native void subscribeEffectiveControlModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); private native void readCapacityAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, CapacityAttributeCallback callback); private native void subscribeCapacityAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, CapacityAttributeCallback callback, int minInterval, int maxInterval); - private native void readSpeedAttribute(long chipClusterPtr, IntegerAttributeCallback callback); + private native void readSpeedAttribute(long chipClusterPtr, SpeedAttributeCallback callback); private native void subscribeSpeedAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, SpeedAttributeCallback callback, int minInterval, int maxInterval); private native void readLifetimeRunningHoursAttribute( - long chipClusterPtr, LifetimeRunningHoursAttributeCallback callback); + long chipClusterPtr, LongAttributeCallback callback); private native void writeLifetimeRunningHoursAttribute( long chipClusterPtr, @@ -14290,18 +14434,15 @@ private native void writeLifetimeRunningHoursAttribute( @Nullable Integer timedWriteTimeoutMs); private native void subscribeLifetimeRunningHoursAttribute( - long chipClusterPtr, - LifetimeRunningHoursAttributeCallback callback, - int minInterval, - int maxInterval); + long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); - private native void readPowerAttribute(long chipClusterPtr, LongAttributeCallback callback); + private native void readPowerAttribute(long chipClusterPtr, PowerAttributeCallback callback); private native void subscribePowerAttribute( - long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, PowerAttributeCallback callback, int minInterval, int maxInterval); private native void readLifetimeEnergyConsumedAttribute( - long chipClusterPtr, LifetimeEnergyConsumedAttributeCallback callback); + long chipClusterPtr, LongAttributeCallback callback); private native void writeLifetimeEnergyConsumedAttribute( long chipClusterPtr, @@ -14310,10 +14451,7 @@ private native void writeLifetimeEnergyConsumedAttribute( @Nullable Integer timedWriteTimeoutMs); private native void subscribeLifetimeEnergyConsumedAttribute( - long chipClusterPtr, - LifetimeEnergyConsumedAttributeCallback callback, - int minInterval, - int maxInterval); + long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); private native void readOperationModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index dd43ec427421dd..6092a9b0402e24 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -6444,7 +6444,9 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readMaxPressureAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readMaxPressureAttribute( + (ChipClusters.PumpConfigurationAndControlCluster.MaxPressureAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readPumpConfigurationAndControlMaxPressureCommandParams); @@ -6457,7 +6459,9 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readMaxSpeedAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readMaxSpeedAttribute( + (ChipClusters.PumpConfigurationAndControlCluster.MaxSpeedAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readPumpConfigurationAndControlMaxSpeedCommandParams); @@ -6469,7 +6473,9 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readMaxFlowAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readMaxFlowAttribute( + (ChipClusters.PumpConfigurationAndControlCluster.MaxFlowAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readPumpConfigurationAndControlMaxFlowCommandParams); @@ -6481,7 +6487,10 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readMinConstPressureAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readMinConstPressureAttribute( + (ChipClusters.PumpConfigurationAndControlCluster + .MinConstPressureAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readPumpConfigurationAndControlMinConstPressureCommandParams); @@ -6494,7 +6503,10 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readMaxConstPressureAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readMaxConstPressureAttribute( + (ChipClusters.PumpConfigurationAndControlCluster + .MaxConstPressureAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readPumpConfigurationAndControlMaxConstPressureCommandParams); @@ -6507,7 +6519,10 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readMinCompPressureAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readMinCompPressureAttribute( + (ChipClusters.PumpConfigurationAndControlCluster + .MinCompPressureAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readPumpConfigurationAndControlMinCompPressureCommandParams); @@ -6520,7 +6535,10 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readMaxCompPressureAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readMaxCompPressureAttribute( + (ChipClusters.PumpConfigurationAndControlCluster + .MaxCompPressureAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readPumpConfigurationAndControlMaxCompPressureCommandParams); @@ -6533,7 +6551,10 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readMinConstSpeedAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readMinConstSpeedAttribute( + (ChipClusters.PumpConfigurationAndControlCluster + .MinConstSpeedAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readPumpConfigurationAndControlMinConstSpeedCommandParams); @@ -6546,7 +6567,10 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readMaxConstSpeedAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readMaxConstSpeedAttribute( + (ChipClusters.PumpConfigurationAndControlCluster + .MaxConstSpeedAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readPumpConfigurationAndControlMaxConstSpeedCommandParams); @@ -6559,7 +6583,10 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readMinConstFlowAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readMinConstFlowAttribute( + (ChipClusters.PumpConfigurationAndControlCluster + .MinConstFlowAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readPumpConfigurationAndControlMinConstFlowCommandParams); @@ -6572,7 +6599,10 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readMaxConstFlowAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readMaxConstFlowAttribute( + (ChipClusters.PumpConfigurationAndControlCluster + .MaxConstFlowAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readPumpConfigurationAndControlMaxConstFlowCommandParams); @@ -6585,7 +6615,10 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readMinConstTempAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readMinConstTempAttribute( + (ChipClusters.PumpConfigurationAndControlCluster + .MinConstTempAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readPumpConfigurationAndControlMinConstTempCommandParams); @@ -6598,7 +6631,10 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readMaxConstTempAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readMaxConstTempAttribute( + (ChipClusters.PumpConfigurationAndControlCluster + .MaxConstTempAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readPumpConfigurationAndControlMaxConstTempCommandParams); @@ -6654,7 +6690,9 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readCapacityAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readCapacityAttribute( + (ChipClusters.PumpConfigurationAndControlCluster.CapacityAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readPumpConfigurationAndControlCapacityCommandParams); @@ -6666,7 +6704,9 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readSpeedAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readSpeedAttribute( + (ChipClusters.PumpConfigurationAndControlCluster.SpeedAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readPumpConfigurationAndControlSpeedCommandParams); @@ -6679,10 +6719,7 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readLifetimeRunningHoursAttribute( - (ChipClusters.PumpConfigurationAndControlCluster - .LifetimeRunningHoursAttributeCallback) - callback); + .readLifetimeRunningHoursAttribute((ChipClusters.LongAttributeCallback) callback); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), readPumpConfigurationAndControlLifetimeRunningHoursCommandParams); @@ -6695,7 +6732,9 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readPowerAttribute((ChipClusters.LongAttributeCallback) callback); + .readPowerAttribute( + (ChipClusters.PumpConfigurationAndControlCluster.PowerAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), readPumpConfigurationAndControlPowerCommandParams); @@ -6709,9 +6748,7 @@ public Map> getReadAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) .readLifetimeEnergyConsumedAttribute( - (ChipClusters.PumpConfigurationAndControlCluster - .LifetimeEnergyConsumedAttributeCallback) - callback); + (ChipClusters.LongAttributeCallback) callback); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), readPumpConfigurationAndControlLifetimeEnergyConsumedCommandParams); diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 0817a65b407c9e..cde833ad32e7b7 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -19164,29 +19164,29 @@ class PumpConfigurationAndControl(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="maxPressure", Tag=0x00000000, Type=int), - ClusterObjectFieldDescriptor(Label="maxSpeed", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="maxFlow", Tag=0x00000002, Type=uint), - ClusterObjectFieldDescriptor(Label="minConstPressure", Tag=0x00000003, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="maxConstPressure", Tag=0x00000004, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="minCompPressure", Tag=0x00000005, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="maxCompPressure", Tag=0x00000006, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="minConstSpeed", Tag=0x00000007, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="maxConstSpeed", Tag=0x00000008, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="minConstFlow", Tag=0x00000009, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="maxConstFlow", Tag=0x0000000A, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="minConstTemp", Tag=0x0000000B, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="maxConstTemp", Tag=0x0000000C, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="maxPressure", Tag=0x00000000, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="maxSpeed", Tag=0x00000001, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="maxFlow", Tag=0x00000002, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="minConstPressure", Tag=0x00000003, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="maxConstPressure", Tag=0x00000004, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="minCompPressure", Tag=0x00000005, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="maxCompPressure", Tag=0x00000006, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="minConstSpeed", Tag=0x00000007, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="maxConstSpeed", Tag=0x00000008, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="minConstFlow", Tag=0x00000009, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="maxConstFlow", Tag=0x0000000A, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="minConstTemp", Tag=0x0000000B, Type=typing.Union[None, Nullable, int]), + ClusterObjectFieldDescriptor(Label="maxConstTemp", Tag=0x0000000C, Type=typing.Union[None, Nullable, int]), ClusterObjectFieldDescriptor(Label="pumpStatus", Tag=0x00000010, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="effectiveOperationMode", Tag=0x00000011, Type=uint), - ClusterObjectFieldDescriptor(Label="effectiveControlMode", Tag=0x00000012, Type=uint), - ClusterObjectFieldDescriptor(Label="capacity", Tag=0x00000013, Type=int), - ClusterObjectFieldDescriptor(Label="speed", Tag=0x00000014, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="lifetimeRunningHours", Tag=0x00000015, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="power", Tag=0x00000016, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="lifetimeEnergyConsumed", Tag=0x00000017, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="operationMode", Tag=0x00000020, Type=uint), - ClusterObjectFieldDescriptor(Label="controlMode", Tag=0x00000021, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="effectiveOperationMode", Tag=0x00000011, Type=PumpConfigurationAndControl.Enums.PumpOperationMode), + ClusterObjectFieldDescriptor(Label="effectiveControlMode", Tag=0x00000012, Type=PumpConfigurationAndControl.Enums.PumpControlMode), + ClusterObjectFieldDescriptor(Label="capacity", Tag=0x00000013, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="speed", Tag=0x00000014, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="lifetimeRunningHours", Tag=0x00000015, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="power", Tag=0x00000016, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="lifetimeEnergyConsumed", Tag=0x00000017, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="operationMode", Tag=0x00000020, Type=PumpConfigurationAndControl.Enums.PumpOperationMode), + ClusterObjectFieldDescriptor(Label="controlMode", Tag=0x00000021, Type=typing.Optional[PumpConfigurationAndControl.Enums.PumpControlMode]), ClusterObjectFieldDescriptor(Label="alarmMask", Tag=0x00000022, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), @@ -19195,29 +19195,29 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - maxPressure: 'int' = None - maxSpeed: 'uint' = None - maxFlow: 'uint' = None - minConstPressure: 'typing.Optional[int]' = None - maxConstPressure: 'typing.Optional[int]' = None - minCompPressure: 'typing.Optional[int]' = None - maxCompPressure: 'typing.Optional[int]' = None - minConstSpeed: 'typing.Optional[uint]' = None - maxConstSpeed: 'typing.Optional[uint]' = None - minConstFlow: 'typing.Optional[uint]' = None - maxConstFlow: 'typing.Optional[uint]' = None - minConstTemp: 'typing.Optional[int]' = None - maxConstTemp: 'typing.Optional[int]' = None + maxPressure: 'typing.Union[Nullable, int]' = None + maxSpeed: 'typing.Union[Nullable, uint]' = None + maxFlow: 'typing.Union[Nullable, uint]' = None + minConstPressure: 'typing.Union[None, Nullable, int]' = None + maxConstPressure: 'typing.Union[None, Nullable, int]' = None + minCompPressure: 'typing.Union[None, Nullable, int]' = None + maxCompPressure: 'typing.Union[None, Nullable, int]' = None + minConstSpeed: 'typing.Union[None, Nullable, uint]' = None + maxConstSpeed: 'typing.Union[None, Nullable, uint]' = None + minConstFlow: 'typing.Union[None, Nullable, uint]' = None + maxConstFlow: 'typing.Union[None, Nullable, uint]' = None + minConstTemp: 'typing.Union[None, Nullable, int]' = None + maxConstTemp: 'typing.Union[None, Nullable, int]' = None pumpStatus: 'typing.Optional[uint]' = None - effectiveOperationMode: 'uint' = None - effectiveControlMode: 'uint' = None - capacity: 'int' = None - speed: 'typing.Optional[uint]' = None - lifetimeRunningHours: 'typing.Union[None, Nullable, uint]' = None - power: 'typing.Optional[uint]' = None - lifetimeEnergyConsumed: 'typing.Union[None, Nullable, uint]' = None - operationMode: 'uint' = None - controlMode: 'typing.Optional[uint]' = None + effectiveOperationMode: 'PumpConfigurationAndControl.Enums.PumpOperationMode' = None + effectiveControlMode: 'PumpConfigurationAndControl.Enums.PumpControlMode' = None + capacity: 'typing.Union[Nullable, int]' = None + speed: 'typing.Union[None, Nullable, uint]' = None + lifetimeRunningHours: 'typing.Optional[uint]' = None + power: 'typing.Union[None, Nullable, uint]' = None + lifetimeEnergyConsumed: 'typing.Optional[uint]' = None + operationMode: 'PumpConfigurationAndControl.Enums.PumpOperationMode' = None + controlMode: 'typing.Optional[PumpConfigurationAndControl.Enums.PumpControlMode]' = None alarmMask: 'typing.Optional[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None @@ -19256,9 +19256,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=int) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'int' = 0 + value: 'typing.Union[Nullable, int]' = NullValue @dataclass class MaxSpeed(ClusterAttributeDescriptor): @@ -19272,9 +19272,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass class MaxFlow(ClusterAttributeDescriptor): @@ -19288,9 +19288,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass class MinConstPressure(ClusterAttributeDescriptor): @@ -19304,9 +19304,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Optional[int]' = None + value: 'typing.Union[None, Nullable, int]' = None @dataclass class MaxConstPressure(ClusterAttributeDescriptor): @@ -19320,9 +19320,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Optional[int]' = None + value: 'typing.Union[None, Nullable, int]' = None @dataclass class MinCompPressure(ClusterAttributeDescriptor): @@ -19336,9 +19336,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Optional[int]' = None + value: 'typing.Union[None, Nullable, int]' = None @dataclass class MaxCompPressure(ClusterAttributeDescriptor): @@ -19352,9 +19352,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Optional[int]' = None + value: 'typing.Union[None, Nullable, int]' = None @dataclass class MinConstSpeed(ClusterAttributeDescriptor): @@ -19368,9 +19368,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class MaxConstSpeed(ClusterAttributeDescriptor): @@ -19384,9 +19384,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class MinConstFlow(ClusterAttributeDescriptor): @@ -19400,9 +19400,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class MaxConstFlow(ClusterAttributeDescriptor): @@ -19416,9 +19416,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class MinConstTemp(ClusterAttributeDescriptor): @@ -19432,9 +19432,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Optional[int]' = None + value: 'typing.Union[None, Nullable, int]' = None @dataclass class MaxConstTemp(ClusterAttributeDescriptor): @@ -19448,9 +19448,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Optional[int]' = None + value: 'typing.Union[None, Nullable, int]' = None @dataclass class PumpStatus(ClusterAttributeDescriptor): @@ -19480,9 +19480,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.PumpOperationMode) - value: 'uint' = 0 + value: 'PumpConfigurationAndControl.Enums.PumpOperationMode' = 0 @dataclass class EffectiveControlMode(ClusterAttributeDescriptor): @@ -19496,9 +19496,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.PumpControlMode) - value: 'uint' = 0 + value: 'PumpConfigurationAndControl.Enums.PumpControlMode' = 0 @dataclass class Capacity(ClusterAttributeDescriptor): @@ -19512,9 +19512,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=int) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'int' = 0 + value: 'typing.Union[Nullable, int]' = NullValue @dataclass class Speed(ClusterAttributeDescriptor): @@ -19528,9 +19528,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class LifetimeRunningHours(ClusterAttributeDescriptor): @@ -19544,9 +19544,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Optional[uint]' = None @dataclass class Power(ClusterAttributeDescriptor): @@ -19560,9 +19560,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class LifetimeEnergyConsumed(ClusterAttributeDescriptor): @@ -19576,9 +19576,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Optional[uint]' = None @dataclass class OperationMode(ClusterAttributeDescriptor): @@ -19592,9 +19592,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.PumpOperationMode) - value: 'uint' = 0 + value: 'PumpConfigurationAndControl.Enums.PumpOperationMode' = 0 @dataclass class ControlMode(ClusterAttributeDescriptor): @@ -19608,9 +19608,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[PumpConfigurationAndControl.Enums.PumpControlMode]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[PumpConfigurationAndControl.Enums.PumpControlMode]' = None @dataclass class AlarmMask(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index aba8a79a03ef34..6636191cfd8e54 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -8401,8 +8401,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } case Attributes::MaxSpeed::Id: { @@ -8412,8 +8416,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } case Attributes::MaxFlow::Id: { @@ -8423,8 +8431,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } case Attributes::MinConstPressure::Id: { @@ -8434,8 +8446,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } case Attributes::MaxConstPressure::Id: { @@ -8445,8 +8461,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } case Attributes::MinCompPressure::Id: { @@ -8456,8 +8476,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } case Attributes::MaxCompPressure::Id: { @@ -8467,8 +8491,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } case Attributes::MinConstSpeed::Id: { @@ -8478,8 +8506,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } case Attributes::MaxConstSpeed::Id: { @@ -8489,8 +8521,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } case Attributes::MinConstFlow::Id: { @@ -8500,8 +8536,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } case Attributes::MaxConstFlow::Id: { @@ -8511,8 +8551,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } case Attributes::MinConstTemp::Id: { @@ -8522,8 +8566,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } case Attributes::MaxConstTemp::Id: { @@ -8533,8 +8581,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } case Attributes::PumpStatus::Id: { @@ -8556,7 +8608,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::EffectiveControlMode::Id: { @@ -8567,7 +8619,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::Capacity::Id: { @@ -8577,8 +8629,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } case Attributes::Speed::Id: { @@ -8588,27 +8644,16 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::LifetimeRunningHours::Id: { - using TypeInfo = Attributes::LifetimeRunningHours::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } NSNumber * _Nullable value; if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::Power::Id: { - using TypeInfo = Attributes::Power::TypeInfo; + case Attributes::LifetimeRunningHours::Id: { + using TypeInfo = Attributes::LifetimeRunningHours::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -8618,8 +8663,8 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::LifetimeEnergyConsumed::Id: { - using TypeInfo = Attributes::LifetimeEnergyConsumed::TypeInfo; + case Attributes::Power::Id: { + using TypeInfo = Attributes::Power::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -8633,6 +8678,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::LifetimeEnergyConsumed::Id: { + using TypeInfo = Attributes::LifetimeEnergyConsumed::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::OperationMode::Id: { using TypeInfo = Attributes::OperationMode::TypeInfo; TypeInfo::DecodableType cppValue; @@ -8641,7 +8697,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ControlMode::Id: { @@ -8652,7 +8708,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::AlarmMask::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 2e3a15217f9480..e20f9e987707b0 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -9256,7 +9256,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the @@ -9292,7 +9292,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 5089a36557810b..bb264f336bcb58 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -33124,12 +33124,13 @@ @implementation CHIPPumpConfigurationAndControl - (void)readAttributeMaxPressureWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -33138,7 +33139,7 @@ - (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInt subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -33146,11 +33147,11 @@ new CHIPInt16sAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -33163,7 +33164,7 @@ + (void)readAttributeMaxPressureWithAttributeCache:(CHIPAttributeCacheContainer completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; @@ -33172,7 +33173,7 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33185,12 +33186,13 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeMaxSpeedWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -33199,7 +33201,7 @@ - (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterv subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -33207,11 +33209,11 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -33223,7 +33225,7 @@ + (void)readAttributeMaxSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)a queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; @@ -33232,7 +33234,7 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33244,12 +33246,13 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeMaxFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -33258,7 +33261,7 @@ - (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterva subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -33266,11 +33269,11 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -33282,7 +33285,7 @@ + (void)readAttributeMaxFlowWithAttributeCache:(CHIPAttributeCacheContainer *)at queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; @@ -33291,7 +33294,7 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33304,12 +33307,13 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeMinConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -33319,7 +33323,7 @@ - (void)subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)m reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -33327,11 +33331,11 @@ new CHIPInt16sAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -33344,7 +33348,7 @@ + (void)readAttributeMinConstPressureWithAttributeCache:(CHIPAttributeCacheConta completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; @@ -33353,7 +33357,7 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33366,12 +33370,13 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeMaxConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -33381,7 +33386,7 @@ - (void)subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)m reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -33389,11 +33394,11 @@ new CHIPInt16sAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -33406,7 +33411,7 @@ + (void)readAttributeMaxConstPressureWithAttributeCache:(CHIPAttributeCacheConta completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; @@ -33415,7 +33420,7 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33428,12 +33433,13 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeMinCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -33443,7 +33449,7 @@ - (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)mi reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -33451,11 +33457,11 @@ new CHIPInt16sAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -33468,7 +33474,7 @@ + (void)readAttributeMinCompPressureWithAttributeCache:(CHIPAttributeCacheContai completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; @@ -33477,7 +33483,7 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33490,12 +33496,13 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeMaxCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -33505,7 +33512,7 @@ - (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)mi reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -33513,11 +33520,11 @@ new CHIPInt16sAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -33530,7 +33537,7 @@ + (void)readAttributeMaxCompPressureWithAttributeCache:(CHIPAttributeCacheContai completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; @@ -33539,7 +33546,7 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33552,12 +33559,13 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeMinConstSpeedWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -33567,7 +33575,7 @@ - (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minI reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -33575,11 +33583,11 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -33592,7 +33600,7 @@ + (void)readAttributeMinConstSpeedWithAttributeCache:(CHIPAttributeCacheContaine completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; @@ -33601,7 +33609,7 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33614,12 +33622,13 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeMaxConstSpeedWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -33629,7 +33638,7 @@ - (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minI reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -33637,11 +33646,11 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -33654,7 +33663,7 @@ + (void)readAttributeMaxConstSpeedWithAttributeCache:(CHIPAttributeCacheContaine completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; @@ -33663,7 +33672,7 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33676,12 +33685,13 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeMinConstFlowWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -33690,7 +33700,7 @@ - (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minIn subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -33698,11 +33708,11 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -33715,7 +33725,7 @@ + (void)readAttributeMinConstFlowWithAttributeCache:(CHIPAttributeCacheContainer completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; @@ -33724,7 +33734,7 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33737,12 +33747,13 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeMaxConstFlowWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -33751,7 +33762,7 @@ - (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minIn subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -33759,11 +33770,11 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -33776,7 +33787,7 @@ + (void)readAttributeMaxConstFlowWithAttributeCache:(CHIPAttributeCacheContainer completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; @@ -33785,7 +33796,7 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33798,12 +33809,13 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeMinConstTempWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -33812,7 +33824,7 @@ - (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minIn subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -33820,11 +33832,11 @@ new CHIPInt16sAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -33837,7 +33849,7 @@ + (void)readAttributeMinConstTempWithAttributeCache:(CHIPAttributeCacheContainer completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; @@ -33846,7 +33858,7 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33859,12 +33871,13 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeMaxConstTempWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -33873,7 +33886,7 @@ - (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minIn subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -33881,11 +33894,11 @@ new CHIPInt16sAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -33898,7 +33911,7 @@ + (void)readAttributeMaxConstTempWithAttributeCache:(CHIPAttributeCacheContainer completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; @@ -33907,7 +33920,7 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33980,12 +33993,14 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -33996,7 +34011,7 @@ - (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Non reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -34004,11 +34019,13 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34021,34 +34038,37 @@ + (void)readAttributeEffectiveOperationModeWithAttributeCache:(CHIPAttributeCach completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -34059,7 +34079,7 @@ - (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnu reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -34067,11 +34087,11 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34084,34 +34104,37 @@ + (void)readAttributeEffectiveControlModeWithAttributeCache:(CHIPAttributeCacheC completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeCapacityWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -34120,7 +34143,7 @@ - (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterv subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -34128,11 +34151,11 @@ new CHIPInt16sAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34144,7 +34167,7 @@ + (void)readAttributeCapacityWithAttributeCache:(CHIPAttributeCacheContainer *)a queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; @@ -34153,7 +34176,7 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -34165,12 +34188,13 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -34179,7 +34203,7 @@ - (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -34187,11 +34211,11 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34203,7 +34227,7 @@ + (void)readAttributeSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attr queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; @@ -34212,7 +34236,7 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -34225,17 +34249,15 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt32uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -34246,12 +34268,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } + cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -34266,7 +34283,7 @@ - (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnu reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -34274,11 +34291,11 @@ new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34291,7 +34308,7 @@ + (void)readAttributeLifetimeRunningHoursWithAttributeCache:(CHIPAttributeCacheC completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; @@ -34300,7 +34317,7 @@ new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancel path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -34312,12 +34329,13 @@ new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancel - (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt32uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -34326,7 +34344,7 @@ - (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -34334,11 +34352,11 @@ new CHIPInt32uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34350,7 +34368,7 @@ + (void)readAttributePowerWithAttributeCache:(CHIPAttributeCacheContainer *)attr queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; @@ -34359,7 +34377,7 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -34372,16 +34390,15 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt32uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -34393,12 +34410,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } + cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -34413,7 +34425,7 @@ - (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Non reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -34421,11 +34433,11 @@ new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34438,7 +34450,7 @@ + (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(CHIPAttributeCach completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; @@ -34447,7 +34459,7 @@ new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancel path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -34460,12 +34472,14 @@ new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancel - (void)readAttributeOperationModeWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -34479,7 +34493,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -34493,7 +34507,7 @@ - (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minI reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -34501,11 +34515,13 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34518,34 +34534,37 @@ + (void)readAttributeOperationModeWithAttributeCache:(CHIPAttributeCacheContaine completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeControlModeWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -34559,7 +34578,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -34572,7 +34591,7 @@ - (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInt subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -34580,11 +34599,11 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34597,23 +34616,25 @@ + (void)readAttributeControlModeWithAttributeCache:(CHIPAttributeCacheContainer completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAlarmMaskWithCompletionHandler:(void (^)( diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index c82bdd48a90c92..6d585e9fc2fbc6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -886,27 +886,27 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestPumpConfigurationAndControl : CHIPPumpConfigurationAndControl -- (void)writeAttributeMaxPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMaxSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMaxFlowWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMinConstPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMaxConstPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMinCompPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMaxCompPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMinConstSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMaxConstSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMinConstFlowWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMaxConstFlowWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMinConstTempWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMaxConstTempWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxFlowWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinConstPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxConstPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinCompPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxCompPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinConstSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxConstSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinConstFlowWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxConstFlowWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinConstTempWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxConstTempWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributePumpStatusWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeEffectiveOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeEffectiveControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeCapacityWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePowerWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAlarmMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index 52cbde53b9c0dd..ca3ab1af19d853 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -11606,7 +11606,7 @@ @implementation CHIPTestPumpConfigurationAndControl return &_cppCluster; } -- (void)writeAttributeMaxPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11617,14 +11617,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11635,14 +11640,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxFlowWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxFlowWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11653,14 +11663,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMinConstPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinConstPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11671,14 +11686,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxConstPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxConstPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11689,14 +11709,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMinCompPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinCompPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11707,14 +11732,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxCompPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxCompPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11725,14 +11755,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMinConstSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinConstSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11743,14 +11778,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxConstSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxConstSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11761,14 +11801,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMinConstFlowWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinConstFlowWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11779,14 +11824,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxConstFlowWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxConstFlowWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11797,14 +11847,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMinConstTempWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinConstTempWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11815,14 +11870,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxConstTempWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxConstTempWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11833,7 +11893,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -11870,7 +11935,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -11888,14 +11953,14 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeCapacityWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11906,14 +11971,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11924,14 +11994,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributePowerWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11942,7 +12017,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index b1c3c40387393c..c945e884bf7ec1 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -21236,7 +21236,6 @@ - (void)testSendClusterTest_TC_PCC_2_1_000026_ReadAttribute { id actualValue = value; - XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 0UL); } @@ -21320,7 +21319,6 @@ - (void)testSendClusterTest_TC_PCC_2_1_000029_ReadAttribute { id actualValue = value; - XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 0UL); } @@ -21772,7 +21770,6 @@ - (void)testSendClusterTest_TC_PCC_2_1_000045_ReadAttribute { id actualValue = value; - XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 0UL); } @@ -21856,7 +21853,6 @@ - (void)testSendClusterTest_TC_PCC_2_1_000048_ReadAttribute { id actualValue = value; - XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 0UL); } @@ -22255,7 +22251,6 @@ - (void)testSendClusterTest_TC_PCC_2_4_000002_ReadAttribute { id actualValue = value; - XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 1UL); } @@ -22306,7 +22301,6 @@ - (void)testSendClusterTest_TC_PCC_2_4_000004_ReadAttribute { id actualValue = value; - XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 2UL); } @@ -22357,7 +22351,6 @@ - (void)testSendClusterTest_TC_PCC_2_4_000006_ReadAttribute { id actualValue = value; - XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 3UL); } @@ -22432,7 +22425,6 @@ - (void)testSendClusterTest_TC_PCC_2_4_000009_ReadAttribute { id actualValue = value; - XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 2UL); } @@ -22483,7 +22475,6 @@ - (void)testSendClusterTest_TC_PCC_2_4_000011_ReadAttribute { id actualValue = value; - XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 3UL); } diff --git a/zzz_generated/all-clusters-app/zap-generated/access.h b/zzz_generated/all-clusters-app/zap-generated/access.h index 0fb1ab3c1aeeb6..7a5fc17a112535 100644 --- a/zzz_generated/all-clusters-app/zap-generated/access.h +++ b/zzz_generated/all-clusters-app/zap-generated/access.h @@ -70,6 +70,10 @@ 49, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: view */ \ 62, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: view */ \ @@ -126,6 +130,10 @@ 7, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: view */ \ 0, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: view */ \ @@ -182,6 +190,10 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: view */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: view */ \ @@ -234,6 +246,10 @@ 8, /* Cluster: Level Control, Attribute: start up current level, Privilege: manage */ \ 49, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ 6, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: manage */ \ 513, /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: manage */ \ 513, /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: manage */ \ 513, /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: manage */ \ @@ -284,6 +300,10 @@ 16384, /* Cluster: Level Control, Attribute: start up current level, Privilege: manage */ \ 4, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ 16387, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \ + 21, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ + 23, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ + 32, /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: manage */ \ + 33, /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: manage */ \ 21, /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: manage */ \ 22, /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: manage */ \ 23, /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: manage */ \ @@ -334,6 +354,10 @@ kMatterAccessPrivilegeManage, /* Cluster: Level Control, Attribute: start up current level, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ kMatterAccessPrivilegeManage, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: manage */ \ diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 495c5e23b52797..1643f90d45a215 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1007,8 +1007,8 @@ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xF }, /* Mode */ \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* OperationMode */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* ControlMode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* OperationMode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x7 }, /* ControlMode */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ { (uint16_t) 0x2BC, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* min heat setpoint limit */ \ @@ -1570,28 +1570,28 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ - { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxPressure */ \ - { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxSpeed */ \ - { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxFlow */ \ - { 0x00000003, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstPressure */ \ - { 0x00000004, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstPressure */ \ - { 0x00000005, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinCompPressure */ \ - { 0x00000006, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxCompPressure */ \ - { 0x00000007, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstSpeed */ \ - { 0x00000008, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstSpeed */ \ - { 0x00000009, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstFlow */ \ - { 0x0000000A, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstFlow */ \ - { 0x0000000B, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstTemp */ \ - { 0x0000000C, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstTemp */ \ - { 0x00000010, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* PumpStatus */ \ - { 0x00000011, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveOperationMode */ \ - { 0x00000012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ - { 0x00000013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ - { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ - { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(413) }, /* LifetimeRunningHours */ \ - { 0x00000016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* Power */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000000, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxPressure */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxSpeed */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxFlow */ \ + { 0x00000003, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinConstPressure */ \ + { 0x00000004, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxConstPressure */ \ + { 0x00000005, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinCompPressure */ \ + { 0x00000006, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxCompPressure */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinConstSpeed */ \ + { 0x00000008, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxConstSpeed */ \ + { 0x00000009, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinConstFlow */ \ + { 0x0000000A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxConstFlow */ \ + { 0x0000000B, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinConstTemp */ \ + { 0x0000000C, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxConstTemp */ \ + { 0x00000010, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* PumpStatus */ \ + { 0x00000011, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveOperationMode */ \ + { 0x00000012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ + { 0x00000013, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Speed */ \ + { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(413) }, /* LifetimeRunningHours */ \ + { 0x00000016, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_LONG_DEFAULTS_INDEX(416) }, /* Power */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_LONG_DEFAULTS_INDEX(419) }, /* LifetimeEnergyConsumed */ \ { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* OperationMode */ \ diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 58303bae6c58b6..963add7ebda04e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -16630,7 +16630,7 @@ namespace Attributes { namespace MaxPressure { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16638,17 +16638,20 @@ EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -16659,11 +16662,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) ZCL_INT16S_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace MaxPressure namespace MaxSpeed { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16671,17 +16694,20 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -16692,11 +16718,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) ZCL_INT16U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace MaxSpeed namespace MaxFlow { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16704,17 +16750,20 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -16725,11 +16774,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) ZCL_INT16U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace MaxFlow namespace MinConstPressure { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16737,17 +16806,20 @@ EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -16758,11 +16830,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) ZCL_INT16S_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace MinConstPressure namespace MaxConstPressure { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16770,17 +16862,20 @@ EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -16791,11 +16886,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) ZCL_INT16S_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace MaxConstPressure namespace MinCompPressure { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16803,17 +16918,20 @@ EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -16824,11 +16942,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) ZCL_INT16S_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace MinCompPressure namespace MaxCompPressure { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16836,17 +16974,20 @@ EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -16857,11 +16998,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) ZCL_INT16S_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace MaxCompPressure namespace MinConstSpeed { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16869,17 +17030,20 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -16890,11 +17054,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) ZCL_INT16U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace MinConstSpeed namespace MaxConstSpeed { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16902,17 +17086,20 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -16923,11 +17110,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) ZCL_INT16U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace MaxConstSpeed namespace MinConstFlow { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16935,32 +17142,55 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (value.IsNull()) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + return SetNull(endpoint); } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + + return Set(endpoint, value.Value()); } } // namespace MinConstFlow namespace MaxConstFlow { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16968,17 +17198,20 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -16989,11 +17222,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) ZCL_INT16U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace MaxConstFlow namespace MinConstTemp { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17001,17 +17254,20 @@ EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -17022,11 +17278,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) ZCL_INT16S_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace MinConstTemp namespace MaxConstTemp { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17034,17 +17310,20 @@ EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -17055,6 +17334,26 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) ZCL_INT16S_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace MaxConstTemp namespace PumpStatus { @@ -17092,9 +17391,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace EffectiveOperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -17107,9 +17406,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17124,9 +17423,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace EffectiveControlMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -17139,9 +17438,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17156,7 +17455,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace Capacity { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17164,17 +17463,20 @@ EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -17185,46 +17487,33 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace Capacity - -namespace Speed { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus SetNull(chip::EndpointId endpoint) { - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16S_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (value.IsNull()) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + return SetNull(endpoint); } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + + return Set(endpoint, value.Value()); } -} // namespace Speed +} // namespace Capacity -namespace LifetimeRunningHours { +namespace Speed { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -17240,9 +17529,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & val } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17251,20 +17540,20 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT24U_ATTRIBUTE_TYPE); + ZCL_INT16U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT24U_ATTRIBUTE_TYPE); + ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -17274,9 +17563,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl return Set(endpoint, value.Value()); } -} // namespace LifetimeRunningHours +} // namespace Speed -namespace Power { +namespace LifetimeRunningHours { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { @@ -17307,13 +17596,13 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) ZCL_INT24U_ATTRIBUTE_TYPE); } -} // namespace Power +} // namespace LifetimeRunningHours -namespace LifetimeEnergyConsumed { +namespace Power { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -17331,7 +17620,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & val } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17340,17 +17629,17 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT32U_ATTRIBUTE_TYPE); + ZCL_INT24U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT32U_ATTRIBUTE_TYPE); + ZCL_INT24U_ATTRIBUTE_TYPE); } EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -17363,13 +17652,46 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl return Set(endpoint, value.Value()); } +} // namespace Power + +namespace LifetimeEnergyConsumed { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT32U_ATTRIBUTE_TYPE); +} + } // namespace LifetimeEnergyConsumed namespace OperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -17382,9 +17704,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17399,9 +17721,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ControlMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -17414,9 +17736,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index e157a820801822..889a1f1a38a156 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -2953,68 +2953,94 @@ namespace PumpConfigurationAndControl { namespace Attributes { namespace MaxPressure { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace MaxPressure namespace MaxSpeed { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace MaxSpeed namespace MaxFlow { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace MaxFlow namespace MinConstPressure { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace MinConstPressure namespace MaxConstPressure { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace MaxConstPressure namespace MinCompPressure { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace MinCompPressure namespace MaxCompPressure { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace MaxCompPressure namespace MinConstSpeed { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace MinConstSpeed namespace MaxConstSpeed { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace MaxConstSpeed namespace MinConstFlow { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace MinConstFlow namespace MaxConstFlow { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace MaxConstFlow namespace MinConstTemp { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace MinConstTemp namespace MaxConstTemp { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace MaxConstTemp namespace PumpStatus { @@ -3023,52 +3049,58 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace PumpStatus namespace EffectiveOperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode * value); // PumpOperationMode +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value); } // namespace EffectiveOperationMode namespace EffectiveControlMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode * value); // PumpControlMode +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value); } // namespace EffectiveControlMode namespace Capacity { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace Capacity namespace Speed { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace Speed namespace LifetimeRunningHours { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int24u EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace LifetimeRunningHours namespace Power { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int24u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace Power namespace LifetimeEnergyConsumed { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int32u EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace LifetimeEnergyConsumed namespace OperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode * value); // PumpOperationMode +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value); } // namespace OperationMode namespace ControlMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode * value); // PumpControlMode +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value); } // namespace ControlMode namespace AlarmMask { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 670dd3ef6f29c5..53a60140810c57 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -21026,9 +21026,9 @@ namespace Attributes { namespace MaxPressure { struct TypeInfo { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::MaxPressure::Id; } @@ -21038,9 +21038,9 @@ struct TypeInfo namespace MaxSpeed { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::MaxSpeed::Id; } @@ -21050,9 +21050,9 @@ struct TypeInfo namespace MaxFlow { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::MaxFlow::Id; } @@ -21062,9 +21062,9 @@ struct TypeInfo namespace MinConstPressure { struct TypeInfo { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::MinConstPressure::Id; } @@ -21074,9 +21074,9 @@ struct TypeInfo namespace MaxConstPressure { struct TypeInfo { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstPressure::Id; } @@ -21086,9 +21086,9 @@ struct TypeInfo namespace MinCompPressure { struct TypeInfo { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::MinCompPressure::Id; } @@ -21098,9 +21098,9 @@ struct TypeInfo namespace MaxCompPressure { struct TypeInfo { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::MaxCompPressure::Id; } @@ -21110,9 +21110,9 @@ struct TypeInfo namespace MinConstSpeed { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::MinConstSpeed::Id; } @@ -21122,9 +21122,9 @@ struct TypeInfo namespace MaxConstSpeed { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstSpeed::Id; } @@ -21134,9 +21134,9 @@ struct TypeInfo namespace MinConstFlow { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::MinConstFlow::Id; } @@ -21146,9 +21146,9 @@ struct TypeInfo namespace MaxConstFlow { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstFlow::Id; } @@ -21158,9 +21158,9 @@ struct TypeInfo namespace MinConstTemp { struct TypeInfo { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::MinConstTemp::Id; } @@ -21170,9 +21170,9 @@ struct TypeInfo namespace MaxConstTemp { struct TypeInfo { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstTemp::Id; } @@ -21194,9 +21194,9 @@ struct TypeInfo namespace EffectiveOperationMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; + using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; + using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::EffectiveOperationMode::Id; } @@ -21206,9 +21206,9 @@ struct TypeInfo namespace EffectiveControlMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; + using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; + using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::EffectiveControlMode::Id; } @@ -21218,9 +21218,9 @@ struct TypeInfo namespace Capacity { struct TypeInfo { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Capacity::Id; } @@ -21230,9 +21230,9 @@ struct TypeInfo namespace Speed { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Speed::Id; } @@ -21242,9 +21242,9 @@ struct TypeInfo namespace LifetimeRunningHours { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::LifetimeRunningHours::Id; } @@ -21254,9 +21254,9 @@ struct TypeInfo namespace Power { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Power::Id; } @@ -21266,9 +21266,9 @@ struct TypeInfo namespace LifetimeEnergyConsumed { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::LifetimeEnergyConsumed::Id; } @@ -21278,9 +21278,9 @@ struct TypeInfo namespace OperationMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; + using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; + using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OperationMode::Id; } @@ -21290,9 +21290,9 @@ struct TypeInfo namespace ControlMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; + using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; + using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ControlMode::Id; } @@ -21380,30 +21380,34 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MaxPressure::TypeInfo::DecodableType maxPressure = static_cast(0); - Attributes::MaxSpeed::TypeInfo::DecodableType maxSpeed = static_cast(0); - Attributes::MaxFlow::TypeInfo::DecodableType maxFlow = static_cast(0); - Attributes::MinConstPressure::TypeInfo::DecodableType minConstPressure = static_cast(0); - Attributes::MaxConstPressure::TypeInfo::DecodableType maxConstPressure = static_cast(0); - Attributes::MinCompPressure::TypeInfo::DecodableType minCompPressure = static_cast(0); - Attributes::MaxCompPressure::TypeInfo::DecodableType maxCompPressure = static_cast(0); - Attributes::MinConstSpeed::TypeInfo::DecodableType minConstSpeed = static_cast(0); - Attributes::MaxConstSpeed::TypeInfo::DecodableType maxConstSpeed = static_cast(0); - Attributes::MinConstFlow::TypeInfo::DecodableType minConstFlow = static_cast(0); - Attributes::MaxConstFlow::TypeInfo::DecodableType maxConstFlow = static_cast(0); - Attributes::MinConstTemp::TypeInfo::DecodableType minConstTemp = static_cast(0); - Attributes::MaxConstTemp::TypeInfo::DecodableType maxConstTemp = static_cast(0); - Attributes::PumpStatus::TypeInfo::DecodableType pumpStatus = static_cast(0); - Attributes::EffectiveOperationMode::TypeInfo::DecodableType effectiveOperationMode = static_cast(0); - Attributes::EffectiveControlMode::TypeInfo::DecodableType effectiveControlMode = static_cast(0); - Attributes::Capacity::TypeInfo::DecodableType capacity = static_cast(0); - Attributes::Speed::TypeInfo::DecodableType speed = static_cast(0); - Attributes::LifetimeRunningHours::TypeInfo::DecodableType lifetimeRunningHours; - Attributes::Power::TypeInfo::DecodableType power = static_cast(0); - Attributes::LifetimeEnergyConsumed::TypeInfo::DecodableType lifetimeEnergyConsumed; - Attributes::OperationMode::TypeInfo::DecodableType operationMode = static_cast(0); - Attributes::ControlMode::TypeInfo::DecodableType controlMode = static_cast(0); - Attributes::AlarmMask::TypeInfo::DecodableType alarmMask = static_cast(0); + Attributes::MaxPressure::TypeInfo::DecodableType maxPressure; + Attributes::MaxSpeed::TypeInfo::DecodableType maxSpeed; + Attributes::MaxFlow::TypeInfo::DecodableType maxFlow; + Attributes::MinConstPressure::TypeInfo::DecodableType minConstPressure; + Attributes::MaxConstPressure::TypeInfo::DecodableType maxConstPressure; + Attributes::MinCompPressure::TypeInfo::DecodableType minCompPressure; + Attributes::MaxCompPressure::TypeInfo::DecodableType maxCompPressure; + Attributes::MinConstSpeed::TypeInfo::DecodableType minConstSpeed; + Attributes::MaxConstSpeed::TypeInfo::DecodableType maxConstSpeed; + Attributes::MinConstFlow::TypeInfo::DecodableType minConstFlow; + Attributes::MaxConstFlow::TypeInfo::DecodableType maxConstFlow; + Attributes::MinConstTemp::TypeInfo::DecodableType minConstTemp; + Attributes::MaxConstTemp::TypeInfo::DecodableType maxConstTemp; + Attributes::PumpStatus::TypeInfo::DecodableType pumpStatus = static_cast(0); + Attributes::EffectiveOperationMode::TypeInfo::DecodableType effectiveOperationMode = + static_cast(0); + Attributes::EffectiveControlMode::TypeInfo::DecodableType effectiveControlMode = + static_cast(0); + Attributes::Capacity::TypeInfo::DecodableType capacity; + Attributes::Speed::TypeInfo::DecodableType speed; + Attributes::LifetimeRunningHours::TypeInfo::DecodableType lifetimeRunningHours = static_cast(0); + Attributes::Power::TypeInfo::DecodableType power; + Attributes::LifetimeEnergyConsumed::TypeInfo::DecodableType lifetimeEnergyConsumed = static_cast(0); + Attributes::OperationMode::TypeInfo::DecodableType operationMode = + static_cast(0); + Attributes::ControlMode::TypeInfo::DecodableType controlMode = + static_cast(0); + Attributes::AlarmMask::TypeInfo::DecodableType alarmMask = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.h b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.h index c82bdd48a90c92..6d585e9fc2fbc6 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.h @@ -886,27 +886,27 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestPumpConfigurationAndControl : CHIPPumpConfigurationAndControl -- (void)writeAttributeMaxPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMaxSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMaxFlowWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMinConstPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMaxConstPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMinCompPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMaxCompPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMinConstSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMaxConstSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMinConstFlowWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMaxConstFlowWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMinConstTempWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMaxConstTempWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxFlowWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinConstPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxConstPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinCompPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxCompPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinConstSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxConstSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinConstFlowWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxConstFlowWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinConstTempWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxConstTempWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributePumpStatusWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeEffectiveOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeEffectiveControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeCapacityWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePowerWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAlarmMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm index 52cbde53b9c0dd..ca3ab1af19d853 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm @@ -11606,7 +11606,7 @@ @implementation CHIPTestPumpConfigurationAndControl return &_cppCluster; } -- (void)writeAttributeMaxPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11617,14 +11617,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11635,14 +11640,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxFlowWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxFlowWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11653,14 +11663,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMinConstPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinConstPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11671,14 +11686,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxConstPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxConstPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11689,14 +11709,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMinCompPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinCompPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11707,14 +11732,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxCompPressureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxCompPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11725,14 +11755,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMinConstSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinConstSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11743,14 +11778,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxConstSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxConstSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11761,14 +11801,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMinConstFlowWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinConstFlowWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11779,14 +11824,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxConstFlowWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxConstFlowWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11797,14 +11847,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMinConstTempWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinConstTempWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11815,14 +11870,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxConstTempWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxConstTempWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11833,7 +11893,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -11870,7 +11935,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -11888,14 +11953,14 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeCapacityWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11906,14 +11971,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11924,14 +11994,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributePowerWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -11942,7 +12017,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h index d5ec58cb111ae3..1c0ca41aad4100 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h @@ -46904,7 +46904,7 @@ class WritePumpConfigurationAndControlLifetimeRunningHours : public ModelCommand queue:callbackQueue]; CHIP_ERROR __block chipError = CHIP_NO_ERROR; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; [cluster writeAttributeLifetimeRunningHoursWithValue:value completionHandler:^(NSError * _Nullable error) { @@ -47104,7 +47104,7 @@ class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public ModelComma queue:callbackQueue]; CHIP_ERROR __block chipError = CHIP_NO_ERROR; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; [cluster writeAttributeLifetimeEnergyConsumedWithValue:value diff --git a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h index cb96942c66e3db..c163473eba9979 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h @@ -29797,7 +29797,6 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("LifetimeRunningHours", actualValue)); VerifyOrReturn(CheckValue("LifetimeRunningHours", actualValue, 0UL)); } @@ -29877,7 +29876,6 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("LifetimeEnergyConsumed", actualValue)); VerifyOrReturn(CheckValue("LifetimeEnergyConsumed", actualValue, 0UL)); } @@ -30297,7 +30295,6 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("LifetimeRunningHours", actualValue)); VerifyOrReturn(CheckValue("LifetimeRunningHours", actualValue, 0UL)); } @@ -30377,7 +30374,6 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("LifetimeEnergyConsumed", actualValue)); VerifyOrReturn(CheckValue("LifetimeEnergyConsumed", actualValue, 0UL)); } @@ -31064,7 +31060,6 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("LifetimeRunningHours", actualValue)); VerifyOrReturn(CheckValue("LifetimeRunningHours", actualValue, 1UL)); } @@ -31111,7 +31106,6 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("LifetimeRunningHours", actualValue)); VerifyOrReturn(CheckValue("LifetimeRunningHours", actualValue, 2UL)); } @@ -31158,7 +31152,6 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("LifetimeRunningHours", actualValue)); VerifyOrReturn(CheckValue("LifetimeRunningHours", actualValue, 3UL)); } @@ -31227,7 +31220,6 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("LifetimeEnergyConsumed", actualValue)); VerifyOrReturn(CheckValue("LifetimeEnergyConsumed", actualValue, 2UL)); } @@ -31274,7 +31266,6 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("LifetimeEnergyConsumed", actualValue)); VerifyOrReturn(CheckValue("LifetimeEnergyConsumed", actualValue, 3UL)); } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 0d19de27ab8b34..f356c4bf828b29 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -9760,7 +9760,7 @@ class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribu } private: - chip::app::DataModel::Nullable mValue; + uint32_t mValue; }; class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttribute @@ -9787,7 +9787,7 @@ class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttri } private: - chip::app::DataModel::Nullable mValue; + uint32_t mValue; }; class WritePumpConfigurationAndControlOperationMode : public WriteAttribute @@ -9814,7 +9814,7 @@ class WritePumpConfigurationAndControlOperationMode : public WriteAttribute } private: - uint8_t mValue; + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode mValue; }; class WritePumpConfigurationAndControlControlMode : public WriteAttribute @@ -9841,7 +9841,7 @@ class WritePumpConfigurationAndControlControlMode : public WriteAttribute } private: - uint8_t mValue; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode mValue; }; /*----------------------------------------------------------------------------*\ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 257d2b7c028c3d..c1a15b9ccf831a 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -8017,67 +8017,67 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP switch (path.mAttributeId) { case PumpConfigurationAndControl::Attributes::MaxPressure::Id: { - int16_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("MaxPressure", 1, value); } case PumpConfigurationAndControl::Attributes::MaxSpeed::Id: { - uint16_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("MaxSpeed", 1, value); } case PumpConfigurationAndControl::Attributes::MaxFlow::Id: { - uint16_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("MaxFlow", 1, value); } case PumpConfigurationAndControl::Attributes::MinConstPressure::Id: { - int16_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("MinConstPressure", 1, value); } case PumpConfigurationAndControl::Attributes::MaxConstPressure::Id: { - int16_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("MaxConstPressure", 1, value); } case PumpConfigurationAndControl::Attributes::MinCompPressure::Id: { - int16_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("MinCompPressure", 1, value); } case PumpConfigurationAndControl::Attributes::MaxCompPressure::Id: { - int16_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("MaxCompPressure", 1, value); } case PumpConfigurationAndControl::Attributes::MinConstSpeed::Id: { - uint16_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("MinConstSpeed", 1, value); } case PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id: { - uint16_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("MaxConstSpeed", 1, value); } case PumpConfigurationAndControl::Attributes::MinConstFlow::Id: { - uint16_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("MinConstFlow", 1, value); } case PumpConfigurationAndControl::Attributes::MaxConstFlow::Id: { - uint16_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("MaxConstFlow", 1, value); } case PumpConfigurationAndControl::Attributes::MinConstTemp::Id: { - int16_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("MinConstTemp", 1, value); } case PumpConfigurationAndControl::Attributes::MaxConstTemp::Id: { - int16_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("MaxConstTemp", 1, value); } @@ -8087,47 +8087,47 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("PumpStatus", 1, value); } case PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id: { - uint8_t value; + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EffectiveOperationMode", 1, value); } case PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id: { - uint8_t value; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EffectiveControlMode", 1, value); } case PumpConfigurationAndControl::Attributes::Capacity::Id: { - int16_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("Capacity", 1, value); } case PumpConfigurationAndControl::Attributes::Speed::Id: { - uint16_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("Speed", 1, value); } case PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id: { - chip::app::DataModel::Nullable value; + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("LifetimeRunningHours", 1, value); } case PumpConfigurationAndControl::Attributes::Power::Id: { - uint32_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("Power", 1, value); } case PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id: { - chip::app::DataModel::Nullable value; + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("LifetimeEnergyConsumed", 1, value); } case PumpConfigurationAndControl::Attributes::OperationMode::Id: { - uint8_t value; + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("OperationMode", 1, value); } case PumpConfigurationAndControl::Attributes::ControlMode::Id: { - uint8_t value; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ControlMode", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index e511f3f2d3475b..bbaaabdba28cfc 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -41563,7 +41563,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_1(error); } - static void OnSuccessCallback_1(void * context, int16_t maxPressure) + static void OnSuccessCallback_1(void * context, const chip::app::DataModel::Nullable & maxPressure) { (static_cast(context))->OnSuccessResponse_1(maxPressure); } @@ -41573,7 +41573,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context, uint16_t maxSpeed) + static void OnSuccessCallback_2(void * context, const chip::app::DataModel::Nullable & maxSpeed) { (static_cast(context))->OnSuccessResponse_2(maxSpeed); } @@ -41583,7 +41583,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_3(error); } - static void OnSuccessCallback_3(void * context, uint16_t maxFlow) + static void OnSuccessCallback_3(void * context, const chip::app::DataModel::Nullable & maxFlow) { (static_cast(context))->OnSuccessResponse_3(maxFlow); } @@ -41593,7 +41593,8 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_4(error); } - static void OnSuccessCallback_4(void * context, uint8_t effectiveOperationMode) + static void OnSuccessCallback_4(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { (static_cast(context))->OnSuccessResponse_4(effectiveOperationMode); } @@ -41603,7 +41604,8 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_5(error); } - static void OnSuccessCallback_5(void * context, uint8_t effectiveControlMode) + static void OnSuccessCallback_5(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { (static_cast(context))->OnSuccessResponse_5(effectiveControlMode); } @@ -41613,7 +41615,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_6(error); } - static void OnSuccessCallback_6(void * context, int16_t capacity) + static void OnSuccessCallback_6(void * context, const chip::app::DataModel::Nullable & capacity) { (static_cast(context))->OnSuccessResponse_6(capacity); } @@ -41623,7 +41625,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_7(error); } - static void OnSuccessCallback_7(void * context, int16_t maxPressure) + static void OnSuccessCallback_7(void * context, const chip::app::DataModel::Nullable & maxPressure) { (static_cast(context))->OnSuccessResponse_7(maxPressure); } @@ -41633,7 +41635,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_8(error); } - static void OnSuccessCallback_8(void * context, uint16_t maxSpeed) + static void OnSuccessCallback_8(void * context, const chip::app::DataModel::Nullable & maxSpeed) { (static_cast(context))->OnSuccessResponse_8(maxSpeed); } @@ -41643,7 +41645,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_9(error); } - static void OnSuccessCallback_9(void * context, uint16_t maxFlow) + static void OnSuccessCallback_9(void * context, const chip::app::DataModel::Nullable & maxFlow) { (static_cast(context))->OnSuccessResponse_9(maxFlow); } @@ -41653,7 +41655,8 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_10(error); } - static void OnSuccessCallback_10(void * context, uint8_t effectiveOperationMode) + static void OnSuccessCallback_10(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { (static_cast(context))->OnSuccessResponse_10(effectiveOperationMode); } @@ -41663,7 +41666,8 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_11(error); } - static void OnSuccessCallback_11(void * context, uint8_t effectiveControlMode) + static void OnSuccessCallback_11(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { (static_cast(context))->OnSuccessResponse_11(effectiveControlMode); } @@ -41673,7 +41677,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_12(error); } - static void OnSuccessCallback_12(void * context, int16_t capacity) + static void OnSuccessCallback_12(void * context, const chip::app::DataModel::Nullable & capacity) { (static_cast(context))->OnSuccessResponse_12(capacity); } @@ -41683,7 +41687,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_13(error); } - static void OnSuccessCallback_13(void * context, int16_t minConstPressure) + static void OnSuccessCallback_13(void * context, const chip::app::DataModel::Nullable & minConstPressure) { (static_cast(context))->OnSuccessResponse_13(minConstPressure); } @@ -41693,7 +41697,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_14(error); } - static void OnSuccessCallback_14(void * context, int16_t maxConstPressure) + static void OnSuccessCallback_14(void * context, const chip::app::DataModel::Nullable & maxConstPressure) { (static_cast(context))->OnSuccessResponse_14(maxConstPressure); } @@ -41703,7 +41707,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_15(error); } - static void OnSuccessCallback_15(void * context, int16_t minCompPressure) + static void OnSuccessCallback_15(void * context, const chip::app::DataModel::Nullable & minCompPressure) { (static_cast(context))->OnSuccessResponse_15(minCompPressure); } @@ -41713,7 +41717,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_16(error); } - static void OnSuccessCallback_16(void * context, int16_t maxCompPressure) + static void OnSuccessCallback_16(void * context, const chip::app::DataModel::Nullable & maxCompPressure) { (static_cast(context))->OnSuccessResponse_16(maxCompPressure); } @@ -41723,7 +41727,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_17(error); } - static void OnSuccessCallback_17(void * context, uint16_t minConstSpeed) + static void OnSuccessCallback_17(void * context, const chip::app::DataModel::Nullable & minConstSpeed) { (static_cast(context))->OnSuccessResponse_17(minConstSpeed); } @@ -41733,7 +41737,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_18(error); } - static void OnSuccessCallback_18(void * context, uint16_t maxConstSpeed) + static void OnSuccessCallback_18(void * context, const chip::app::DataModel::Nullable & maxConstSpeed) { (static_cast(context))->OnSuccessResponse_18(maxConstSpeed); } @@ -41743,7 +41747,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_19(error); } - static void OnSuccessCallback_19(void * context, uint16_t minConstFlow) + static void OnSuccessCallback_19(void * context, const chip::app::DataModel::Nullable & minConstFlow) { (static_cast(context))->OnSuccessResponse_19(minConstFlow); } @@ -41753,7 +41757,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_20(error); } - static void OnSuccessCallback_20(void * context, uint16_t maxConstFlow) + static void OnSuccessCallback_20(void * context, const chip::app::DataModel::Nullable & maxConstFlow) { (static_cast(context))->OnSuccessResponse_20(maxConstFlow); } @@ -41763,7 +41767,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_21(error); } - static void OnSuccessCallback_21(void * context, int16_t minConstTemp) + static void OnSuccessCallback_21(void * context, const chip::app::DataModel::Nullable & minConstTemp) { (static_cast(context))->OnSuccessResponse_21(minConstTemp); } @@ -41773,7 +41777,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_22(error); } - static void OnSuccessCallback_22(void * context, int16_t maxConstTemp) + static void OnSuccessCallback_22(void * context, const chip::app::DataModel::Nullable & maxConstTemp) { (static_cast(context))->OnSuccessResponse_22(maxConstTemp); } @@ -41803,7 +41807,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_25(error); } - static void OnSuccessCallback_25(void * context, uint16_t speed) + static void OnSuccessCallback_25(void * context, const chip::app::DataModel::Nullable & speed) { (static_cast(context))->OnSuccessResponse_25(speed); } @@ -41813,7 +41817,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_26(error); } - static void OnSuccessCallback_26(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) + static void OnSuccessCallback_26(void * context, uint32_t lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_26(lifetimeRunningHours); } @@ -41823,7 +41827,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_27(error); } - static void OnSuccessCallback_27(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) + static void OnSuccessCallback_27(void * context, uint32_t lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_27(lifetimeRunningHours); } @@ -41833,7 +41837,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_28(error); } - static void OnSuccessCallback_28(void * context, uint32_t power) + static void OnSuccessCallback_28(void * context, const chip::app::DataModel::Nullable & power) { (static_cast(context))->OnSuccessResponse_28(power); } @@ -41843,7 +41847,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_29(error); } - static void OnSuccessCallback_29(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + static void OnSuccessCallback_29(void * context, uint32_t lifetimeEnergyConsumed) { (static_cast(context))->OnSuccessResponse_29(lifetimeEnergyConsumed); } @@ -41853,7 +41857,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_30(error); } - static void OnSuccessCallback_30(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + static void OnSuccessCallback_30(void * context, uint32_t lifetimeEnergyConsumed) { (static_cast(context))->OnSuccessResponse_30(lifetimeEnergyConsumed); } @@ -41870,7 +41874,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_32(error); } - static void OnSuccessCallback_32(void * context, int16_t minConstPressure) + static void OnSuccessCallback_32(void * context, const chip::app::DataModel::Nullable & minConstPressure) { (static_cast(context))->OnSuccessResponse_32(minConstPressure); } @@ -41880,7 +41884,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_33(error); } - static void OnSuccessCallback_33(void * context, int16_t maxConstPressure) + static void OnSuccessCallback_33(void * context, const chip::app::DataModel::Nullable & maxConstPressure) { (static_cast(context))->OnSuccessResponse_33(maxConstPressure); } @@ -41890,7 +41894,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_34(error); } - static void OnSuccessCallback_34(void * context, int16_t minCompPressure) + static void OnSuccessCallback_34(void * context, const chip::app::DataModel::Nullable & minCompPressure) { (static_cast(context))->OnSuccessResponse_34(minCompPressure); } @@ -41900,7 +41904,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_35(error); } - static void OnSuccessCallback_35(void * context, int16_t maxCompPressure) + static void OnSuccessCallback_35(void * context, const chip::app::DataModel::Nullable & maxCompPressure) { (static_cast(context))->OnSuccessResponse_35(maxCompPressure); } @@ -41910,7 +41914,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_36(error); } - static void OnSuccessCallback_36(void * context, uint16_t minConstSpeed) + static void OnSuccessCallback_36(void * context, const chip::app::DataModel::Nullable & minConstSpeed) { (static_cast(context))->OnSuccessResponse_36(minConstSpeed); } @@ -41920,7 +41924,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_37(error); } - static void OnSuccessCallback_37(void * context, uint16_t maxConstSpeed) + static void OnSuccessCallback_37(void * context, const chip::app::DataModel::Nullable & maxConstSpeed) { (static_cast(context))->OnSuccessResponse_37(maxConstSpeed); } @@ -41930,7 +41934,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_38(error); } - static void OnSuccessCallback_38(void * context, uint16_t minConstFlow) + static void OnSuccessCallback_38(void * context, const chip::app::DataModel::Nullable & minConstFlow) { (static_cast(context))->OnSuccessResponse_38(minConstFlow); } @@ -41940,7 +41944,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_39(error); } - static void OnSuccessCallback_39(void * context, uint16_t maxConstFlow) + static void OnSuccessCallback_39(void * context, const chip::app::DataModel::Nullable & maxConstFlow) { (static_cast(context))->OnSuccessResponse_39(maxConstFlow); } @@ -41950,7 +41954,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_40(error); } - static void OnSuccessCallback_40(void * context, int16_t minConstTemp) + static void OnSuccessCallback_40(void * context, const chip::app::DataModel::Nullable & minConstTemp) { (static_cast(context))->OnSuccessResponse_40(minConstTemp); } @@ -41960,7 +41964,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_41(error); } - static void OnSuccessCallback_41(void * context, int16_t maxConstTemp) + static void OnSuccessCallback_41(void * context, const chip::app::DataModel::Nullable & maxConstTemp) { (static_cast(context))->OnSuccessResponse_41(maxConstTemp); } @@ -41990,7 +41994,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_44(error); } - static void OnSuccessCallback_44(void * context, uint16_t speed) + static void OnSuccessCallback_44(void * context, const chip::app::DataModel::Nullable & speed) { (static_cast(context))->OnSuccessResponse_44(speed); } @@ -42000,7 +42004,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_45(error); } - static void OnSuccessCallback_45(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) + static void OnSuccessCallback_45(void * context, uint32_t lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_45(lifetimeRunningHours); } @@ -42010,7 +42014,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_46(error); } - static void OnSuccessCallback_46(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) + static void OnSuccessCallback_46(void * context, uint32_t lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_46(lifetimeRunningHours); } @@ -42020,7 +42024,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_47(error); } - static void OnSuccessCallback_47(void * context, uint32_t power) + static void OnSuccessCallback_47(void * context, const chip::app::DataModel::Nullable & power) { (static_cast(context))->OnSuccessResponse_47(power); } @@ -42030,7 +42034,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_48(error); } - static void OnSuccessCallback_48(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + static void OnSuccessCallback_48(void * context, uint32_t lifetimeEnergyConsumed) { (static_cast(context))->OnSuccessResponse_48(lifetimeEnergyConsumed); } @@ -42040,7 +42044,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_49(error); } - static void OnSuccessCallback_49(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + static void OnSuccessCallback_49(void * context, uint32_t lifetimeEnergyConsumed) { (static_cast(context))->OnSuccessResponse_49(lifetimeEnergyConsumed); } @@ -42073,7 +42077,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_1(int16_t maxPressure) + void OnSuccessResponse_1(const chip::app::DataModel::Nullable & maxPressure) { VerifyOrReturn(CheckConstraintType("maxPressure", "", "int16")); NextTest(); @@ -42097,7 +42101,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_2(uint16_t maxSpeed) + void OnSuccessResponse_2(const chip::app::DataModel::Nullable & maxSpeed) { VerifyOrReturn(CheckConstraintType("maxSpeed", "", "uint16")); NextTest(); @@ -42120,7 +42124,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_3(uint16_t maxFlow) + void OnSuccessResponse_3(const chip::app::DataModel::Nullable & maxFlow) { VerifyOrReturn(CheckConstraintType("maxFlow", "", "uint16")); NextTest(); @@ -42144,7 +42148,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_4(uint8_t effectiveOperationMode) + void OnSuccessResponse_4(chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "", "enum8")); NextTest(); @@ -42168,7 +42172,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_5(uint8_t effectiveControlMode) + void OnSuccessResponse_5(chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { VerifyOrReturn(CheckConstraintType("effectiveControlMode", "", "enum8")); NextTest(); @@ -42192,7 +42196,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_6(int16_t capacity) + void OnSuccessResponse_6(const chip::app::DataModel::Nullable & capacity) { VerifyOrReturn(CheckConstraintType("capacity", "", "int16")); NextTest(); @@ -42216,7 +42220,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_7(int16_t maxPressure) + void OnSuccessResponse_7(const chip::app::DataModel::Nullable & maxPressure) { VerifyOrReturn(CheckConstraintType("maxPressure", "", "int16")); NextTest(); @@ -42240,7 +42244,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_8(uint16_t maxSpeed) + void OnSuccessResponse_8(const chip::app::DataModel::Nullable & maxSpeed) { VerifyOrReturn(CheckConstraintType("maxSpeed", "", "uint16")); NextTest(); @@ -42263,7 +42267,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_9(uint16_t maxFlow) + void OnSuccessResponse_9(const chip::app::DataModel::Nullable & maxFlow) { VerifyOrReturn(CheckConstraintType("maxFlow", "", "uint16")); NextTest(); @@ -42287,7 +42291,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_10(uint8_t effectiveOperationMode) + void OnSuccessResponse_10(chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "", "enum8")); NextTest(); @@ -42311,7 +42315,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_11(uint8_t effectiveControlMode) + void OnSuccessResponse_11(chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { VerifyOrReturn(CheckConstraintType("effectiveControlMode", "", "enum8")); NextTest(); @@ -42335,7 +42339,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_12(int16_t capacity) + void OnSuccessResponse_12(const chip::app::DataModel::Nullable & capacity) { VerifyOrReturn(CheckConstraintType("capacity", "", "int16")); NextTest(); @@ -42359,7 +42363,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_13(int16_t minConstPressure) + void OnSuccessResponse_13(const chip::app::DataModel::Nullable & minConstPressure) { VerifyOrReturn(CheckConstraintType("minConstPressure", "", "int16")); NextTest(); @@ -42383,7 +42387,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_14(int16_t maxConstPressure) + void OnSuccessResponse_14(const chip::app::DataModel::Nullable & maxConstPressure) { VerifyOrReturn(CheckConstraintType("maxConstPressure", "", "int16")); NextTest(); @@ -42407,7 +42411,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_15(int16_t minCompPressure) + void OnSuccessResponse_15(const chip::app::DataModel::Nullable & minCompPressure) { VerifyOrReturn(CheckConstraintType("minCompPressure", "", "int16")); NextTest(); @@ -42431,7 +42435,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_16(int16_t maxCompPressure) + void OnSuccessResponse_16(const chip::app::DataModel::Nullable & maxCompPressure) { VerifyOrReturn(CheckConstraintType("maxCompPressure", "", "int16")); NextTest(); @@ -42455,7 +42459,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_17(uint16_t minConstSpeed) + void OnSuccessResponse_17(const chip::app::DataModel::Nullable & minConstSpeed) { VerifyOrReturn(CheckConstraintType("minConstSpeed", "", "uint16")); NextTest(); @@ -42479,7 +42483,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_18(uint16_t maxConstSpeed) + void OnSuccessResponse_18(const chip::app::DataModel::Nullable & maxConstSpeed) { VerifyOrReturn(CheckConstraintType("maxConstSpeed", "", "uint16")); NextTest(); @@ -42503,7 +42507,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_19(uint16_t minConstFlow) + void OnSuccessResponse_19(const chip::app::DataModel::Nullable & minConstFlow) { VerifyOrReturn(CheckConstraintType("minConstFlow", "", "uint16")); NextTest(); @@ -42527,7 +42531,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_20(uint16_t maxConstFlow) + void OnSuccessResponse_20(const chip::app::DataModel::Nullable & maxConstFlow) { VerifyOrReturn(CheckConstraintType("maxConstFlow", "", "uint16")); NextTest(); @@ -42551,7 +42555,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_21(int16_t minConstTemp) + void OnSuccessResponse_21(const chip::app::DataModel::Nullable & minConstTemp) { VerifyOrReturn(CheckConstraintType("minConstTemp", "", "int16")); VerifyOrReturn(CheckConstraintMinValue("minConstTemp", minConstTemp, -27315)); @@ -42576,7 +42580,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_22(int16_t maxConstTemp) + void OnSuccessResponse_22(const chip::app::DataModel::Nullable & maxConstTemp) { VerifyOrReturn(CheckConstraintType("maxConstTemp", "", "int16")); VerifyOrReturn(CheckConstraintMinValue("maxConstTemp", maxConstTemp, -27315)); @@ -42649,7 +42653,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_25(uint16_t speed) + void OnSuccessResponse_25(const chip::app::DataModel::Nullable & speed) { VerifyOrReturn(CheckConstraintType("speed", "", "uint16")); NextTest(); @@ -42673,10 +42677,9 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_26(const chip::app::DataModel::Nullable & lifetimeRunningHours) + void OnSuccessResponse_26(uint32_t lifetimeRunningHours) { - VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", lifetimeRunningHours)); - VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", lifetimeRunningHours.Value(), 0UL)); + VerifyOrReturn(CheckValue("lifetimeRunningHours", lifetimeRunningHours, 0UL)); NextTest(); } @@ -42699,7 +42702,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_27(const chip::app::DataModel::Nullable & lifetimeRunningHours) + void OnSuccessResponse_27(uint32_t lifetimeRunningHours) { VerifyOrReturn(CheckConstraintType("lifetimeRunningHours", "", "uint24")); NextTest(); @@ -42722,7 +42725,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_28(uint32_t power) + void OnSuccessResponse_28(const chip::app::DataModel::Nullable & power) { VerifyOrReturn(CheckConstraintType("power", "", "uint24")); NextTest(); @@ -42746,10 +42749,9 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_29(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + void OnSuccessResponse_29(uint32_t lifetimeEnergyConsumed) { - VerifyOrReturn(CheckValueNonNull("lifetimeEnergyConsumed", lifetimeEnergyConsumed)); - VerifyOrReturn(CheckValue("lifetimeEnergyConsumed.Value()", lifetimeEnergyConsumed.Value(), 0UL)); + VerifyOrReturn(CheckValue("lifetimeEnergyConsumed", lifetimeEnergyConsumed, 0UL)); NextTest(); } @@ -42772,7 +42774,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_30(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + void OnSuccessResponse_30(uint32_t lifetimeEnergyConsumed) { VerifyOrReturn(CheckConstraintType("lifetimeEnergyConsumed", "", "uint32")); NextTest(); @@ -42784,9 +42786,8 @@ class Test_TC_PCC_2_1Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable lifetimeEnergyConsumedArgument; - lifetimeEnergyConsumedArgument.SetNonNull(); - lifetimeEnergyConsumedArgument.Value() = 0UL; + uint32_t lifetimeEnergyConsumedArgument; + lifetimeEnergyConsumedArgument = 0UL; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -42820,7 +42821,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_32(int16_t minConstPressure) + void OnSuccessResponse_32(const chip::app::DataModel::Nullable & minConstPressure) { VerifyOrReturn(CheckConstraintType("minConstPressure", "", "int16")); NextTest(); @@ -42844,7 +42845,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_33(int16_t maxConstPressure) + void OnSuccessResponse_33(const chip::app::DataModel::Nullable & maxConstPressure) { VerifyOrReturn(CheckConstraintType("maxConstPressure", "", "int16")); NextTest(); @@ -42868,7 +42869,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_34(int16_t minCompPressure) + void OnSuccessResponse_34(const chip::app::DataModel::Nullable & minCompPressure) { VerifyOrReturn(CheckConstraintType("minCompPressure", "", "int16")); NextTest(); @@ -42892,7 +42893,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_35(int16_t maxCompPressure) + void OnSuccessResponse_35(const chip::app::DataModel::Nullable & maxCompPressure) { VerifyOrReturn(CheckConstraintType("maxCompPressure", "", "int16")); NextTest(); @@ -42916,7 +42917,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_36(uint16_t minConstSpeed) + void OnSuccessResponse_36(const chip::app::DataModel::Nullable & minConstSpeed) { VerifyOrReturn(CheckConstraintType("minConstSpeed", "", "uint16")); NextTest(); @@ -42940,7 +42941,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_37(uint16_t maxConstSpeed) + void OnSuccessResponse_37(const chip::app::DataModel::Nullable & maxConstSpeed) { VerifyOrReturn(CheckConstraintType("maxConstSpeed", "", "uint16")); NextTest(); @@ -42964,7 +42965,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_38(uint16_t minConstFlow) + void OnSuccessResponse_38(const chip::app::DataModel::Nullable & minConstFlow) { VerifyOrReturn(CheckConstraintType("minConstFlow", "", "uint16")); NextTest(); @@ -42988,7 +42989,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_39(uint16_t maxConstFlow) + void OnSuccessResponse_39(const chip::app::DataModel::Nullable & maxConstFlow) { VerifyOrReturn(CheckConstraintType("maxConstFlow", "", "uint16")); NextTest(); @@ -43012,7 +43013,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_40(int16_t minConstTemp) + void OnSuccessResponse_40(const chip::app::DataModel::Nullable & minConstTemp) { VerifyOrReturn(CheckConstraintType("minConstTemp", "", "int16")); VerifyOrReturn(CheckConstraintMinValue("minConstTemp", minConstTemp, -27315)); @@ -43038,7 +43039,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_41(int16_t maxConstTemp) + void OnSuccessResponse_41(const chip::app::DataModel::Nullable & maxConstTemp) { VerifyOrReturn(CheckConstraintType("maxConstTemp", "", "int16")); VerifyOrReturn(CheckConstraintMinValue("maxConstTemp", maxConstTemp, -27315)); @@ -43112,7 +43113,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_44(uint16_t speed) + void OnSuccessResponse_44(const chip::app::DataModel::Nullable & speed) { VerifyOrReturn(CheckConstraintType("speed", "", "uint16")); NextTest(); @@ -43136,10 +43137,9 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_45(const chip::app::DataModel::Nullable & lifetimeRunningHours) + void OnSuccessResponse_45(uint32_t lifetimeRunningHours) { - VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", lifetimeRunningHours)); - VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", lifetimeRunningHours.Value(), 0UL)); + VerifyOrReturn(CheckValue("lifetimeRunningHours", lifetimeRunningHours, 0UL)); NextTest(); } @@ -43162,7 +43162,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_46(const chip::app::DataModel::Nullable & lifetimeRunningHours) + void OnSuccessResponse_46(uint32_t lifetimeRunningHours) { VerifyOrReturn(CheckConstraintType("lifetimeRunningHours", "", "uint24")); NextTest(); @@ -43185,7 +43185,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_47(uint32_t power) + void OnSuccessResponse_47(const chip::app::DataModel::Nullable & power) { VerifyOrReturn(CheckConstraintType("power", "", "uint24")); NextTest(); @@ -43209,10 +43209,9 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_48(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + void OnSuccessResponse_48(uint32_t lifetimeEnergyConsumed) { - VerifyOrReturn(CheckValueNonNull("lifetimeEnergyConsumed", lifetimeEnergyConsumed)); - VerifyOrReturn(CheckValue("lifetimeEnergyConsumed.Value()", lifetimeEnergyConsumed.Value(), 0UL)); + VerifyOrReturn(CheckValue("lifetimeEnergyConsumed", lifetimeEnergyConsumed, 0UL)); NextTest(); } @@ -43235,7 +43234,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_49(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + void OnSuccessResponse_49(uint32_t lifetimeEnergyConsumed) { VerifyOrReturn(CheckConstraintType("lifetimeEnergyConsumed", "", "uint32")); NextTest(); @@ -43392,8 +43391,8 @@ class Test_TC_PCC_2_2Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t operationModeArgument; - operationModeArgument = 1; + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode operationModeArgument; + operationModeArgument = static_cast(1); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -43415,8 +43414,8 @@ class Test_TC_PCC_2_2Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t operationModeArgument; - operationModeArgument = 2; + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode operationModeArgument; + operationModeArgument = static_cast(2); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -43438,8 +43437,8 @@ class Test_TC_PCC_2_2Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t operationModeArgument; - operationModeArgument = 3; + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode operationModeArgument; + operationModeArgument = static_cast(3); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -43635,7 +43634,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context, uint8_t effectiveOperationMode) + static void OnSuccessCallback_2(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { (static_cast(context))->OnSuccessResponse_2(effectiveOperationMode); } @@ -43652,7 +43652,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand (static_cast(context))->OnFailureResponse_4(error); } - static void OnSuccessCallback_4(void * context, uint8_t effectiveControlMode) + static void OnSuccessCallback_4(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { (static_cast(context))->OnSuccessResponse_4(effectiveControlMode); } @@ -43708,8 +43709,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t operationModeArgument; - operationModeArgument = 0; + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode operationModeArgument; + operationModeArgument = static_cast(0); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -43743,7 +43744,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_2(uint8_t effectiveOperationMode) + void OnSuccessResponse_2(chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { VerifyOrReturn(CheckValue("effectiveOperationMode", effectiveOperationMode, 0)); @@ -43756,8 +43757,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t controlModeArgument; - controlModeArgument = 0; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; + controlModeArgument = static_cast(0); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -43791,7 +43792,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_4(uint8_t effectiveControlMode) + void OnSuccessResponse_4(chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { VerifyOrReturn(CheckValue("effectiveControlMode", effectiveControlMode, 0)); @@ -43804,8 +43805,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t controlModeArgument; - controlModeArgument = 1; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; + controlModeArgument = static_cast(1); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -43827,8 +43828,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t controlModeArgument; - controlModeArgument = 2; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; + controlModeArgument = static_cast(2); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -43850,8 +43851,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t controlModeArgument; - controlModeArgument = 3; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; + controlModeArgument = static_cast(3); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -43873,8 +43874,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t controlModeArgument; - controlModeArgument = 5; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; + controlModeArgument = static_cast(5); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -43896,8 +43897,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t controlModeArgument; - controlModeArgument = 7; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; + controlModeArgument = static_cast(7); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44056,7 +44057,7 @@ class Test_TC_PCC_2_4Suite : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) + static void OnSuccessCallback_2(void * context, uint32_t lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_2(lifetimeRunningHours); } @@ -44073,7 +44074,7 @@ class Test_TC_PCC_2_4Suite : public TestCommand (static_cast(context))->OnFailureResponse_4(error); } - static void OnSuccessCallback_4(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) + static void OnSuccessCallback_4(void * context, uint32_t lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_4(lifetimeRunningHours); } @@ -44090,7 +44091,7 @@ class Test_TC_PCC_2_4Suite : public TestCommand (static_cast(context))->OnFailureResponse_6(error); } - static void OnSuccessCallback_6(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) + static void OnSuccessCallback_6(void * context, uint32_t lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_6(lifetimeRunningHours); } @@ -44114,7 +44115,7 @@ class Test_TC_PCC_2_4Suite : public TestCommand (static_cast(context))->OnFailureResponse_9(error); } - static void OnSuccessCallback_9(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + static void OnSuccessCallback_9(void * context, uint32_t lifetimeEnergyConsumed) { (static_cast(context))->OnSuccessResponse_9(lifetimeEnergyConsumed); } @@ -44131,7 +44132,7 @@ class Test_TC_PCC_2_4Suite : public TestCommand (static_cast(context))->OnFailureResponse_11(error); } - static void OnSuccessCallback_11(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + static void OnSuccessCallback_11(void * context, uint32_t lifetimeEnergyConsumed) { (static_cast(context))->OnSuccessResponse_11(lifetimeEnergyConsumed); } @@ -44152,9 +44153,8 @@ class Test_TC_PCC_2_4Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable lifetimeRunningHoursArgument; - lifetimeRunningHoursArgument.SetNonNull(); - lifetimeRunningHoursArgument.Value() = 1UL; + uint32_t lifetimeRunningHoursArgument; + lifetimeRunningHoursArgument = 1UL; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44188,10 +44188,9 @@ class Test_TC_PCC_2_4Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_2(const chip::app::DataModel::Nullable & lifetimeRunningHours) + void OnSuccessResponse_2(uint32_t lifetimeRunningHours) { - VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", lifetimeRunningHours)); - VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", lifetimeRunningHours.Value(), 1UL)); + VerifyOrReturn(CheckValue("lifetimeRunningHours", lifetimeRunningHours, 1UL)); NextTest(); } @@ -44202,9 +44201,8 @@ class Test_TC_PCC_2_4Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable lifetimeRunningHoursArgument; - lifetimeRunningHoursArgument.SetNonNull(); - lifetimeRunningHoursArgument.Value() = 2UL; + uint32_t lifetimeRunningHoursArgument; + lifetimeRunningHoursArgument = 2UL; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44238,10 +44236,9 @@ class Test_TC_PCC_2_4Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_4(const chip::app::DataModel::Nullable & lifetimeRunningHours) + void OnSuccessResponse_4(uint32_t lifetimeRunningHours) { - VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", lifetimeRunningHours)); - VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", lifetimeRunningHours.Value(), 2UL)); + VerifyOrReturn(CheckValue("lifetimeRunningHours", lifetimeRunningHours, 2UL)); NextTest(); } @@ -44252,9 +44249,8 @@ class Test_TC_PCC_2_4Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable lifetimeRunningHoursArgument; - lifetimeRunningHoursArgument.SetNonNull(); - lifetimeRunningHoursArgument.Value() = 3UL; + uint32_t lifetimeRunningHoursArgument; + lifetimeRunningHoursArgument = 3UL; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44288,10 +44284,9 @@ class Test_TC_PCC_2_4Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_6(const chip::app::DataModel::Nullable & lifetimeRunningHours) + void OnSuccessResponse_6(uint32_t lifetimeRunningHours) { - VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", lifetimeRunningHours)); - VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", lifetimeRunningHours.Value(), 3UL)); + VerifyOrReturn(CheckValue("lifetimeRunningHours", lifetimeRunningHours, 3UL)); NextTest(); } @@ -44302,9 +44297,8 @@ class Test_TC_PCC_2_4Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable lifetimeEnergyConsumedArgument; - lifetimeEnergyConsumedArgument.SetNonNull(); - lifetimeEnergyConsumedArgument.Value() = 1UL; + uint32_t lifetimeEnergyConsumedArgument; + lifetimeEnergyConsumedArgument = 1UL; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44326,9 +44320,8 @@ class Test_TC_PCC_2_4Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable lifetimeEnergyConsumedArgument; - lifetimeEnergyConsumedArgument.SetNonNull(); - lifetimeEnergyConsumedArgument.Value() = 2UL; + uint32_t lifetimeEnergyConsumedArgument; + lifetimeEnergyConsumedArgument = 2UL; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44362,10 +44355,9 @@ class Test_TC_PCC_2_4Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_9(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + void OnSuccessResponse_9(uint32_t lifetimeEnergyConsumed) { - VerifyOrReturn(CheckValueNonNull("lifetimeEnergyConsumed", lifetimeEnergyConsumed)); - VerifyOrReturn(CheckValue("lifetimeEnergyConsumed.Value()", lifetimeEnergyConsumed.Value(), 2UL)); + VerifyOrReturn(CheckValue("lifetimeEnergyConsumed", lifetimeEnergyConsumed, 2UL)); NextTest(); } @@ -44376,9 +44368,8 @@ class Test_TC_PCC_2_4Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable lifetimeEnergyConsumedArgument; - lifetimeEnergyConsumedArgument.SetNonNull(); - lifetimeEnergyConsumedArgument.Value() = 3UL; + uint32_t lifetimeEnergyConsumedArgument; + lifetimeEnergyConsumedArgument = 3UL; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44412,10 +44403,9 @@ class Test_TC_PCC_2_4Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_11(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) + void OnSuccessResponse_11(uint32_t lifetimeEnergyConsumed) { - VerifyOrReturn(CheckValueNonNull("lifetimeEnergyConsumed", lifetimeEnergyConsumed)); - VerifyOrReturn(CheckValue("lifetimeEnergyConsumed.Value()", lifetimeEnergyConsumed.Value(), 3UL)); + VerifyOrReturn(CheckValue("lifetimeEnergyConsumed", lifetimeEnergyConsumed, 3UL)); NextTest(); } @@ -119159,11 +119149,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 120U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -119198,11 +119188,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 1000U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -119237,11 +119227,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 180U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); diff --git a/zzz_generated/placeholder/app1/zap-generated/access.h b/zzz_generated/placeholder/app1/zap-generated/access.h index 7305fea621c8b2..4bbe080b592b7d 100644 --- a/zzz_generated/placeholder/app1/zap-generated/access.h +++ b/zzz_generated/placeholder/app1/zap-generated/access.h @@ -41,6 +41,10 @@ 49, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: view */ \ @@ -67,6 +71,10 @@ 6, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ 7, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: view */ \ @@ -93,6 +101,10 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: view */ \ @@ -116,6 +128,10 @@ 48, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ 6, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: manage */ \ 513, /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: manage */ \ 513, /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: manage */ \ 513, /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: manage */ \ @@ -137,6 +153,10 @@ 0, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ 4, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ 16387, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \ + 21, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ + 23, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ + 32, /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: manage */ \ + 33, /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: manage */ \ 21, /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: manage */ \ 22, /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: manage */ \ 23, /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: manage */ \ @@ -158,6 +178,10 @@ kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ kMatterAccessPrivilegeManage, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: manage */ \ diff --git a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h index 559c724580092a..0c56bcfbf810e3 100644 --- a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h @@ -379,8 +379,8 @@ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xF }, /* Mode */ \ \ /* Endpoint: 0, Cluster: Pump Configuration and Control (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* OperationMode */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* ControlMode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* OperationMode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x7 }, /* ControlMode */ \ \ /* Endpoint: 0, Cluster: Thermostat (server) */ \ { (uint16_t) 0x2BC, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* min heat setpoint limit */ \ @@ -644,28 +644,28 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Pump Configuration and Control (server) */ \ - { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxPressure */ \ - { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxSpeed */ \ - { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxFlow */ \ - { 0x00000003, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstPressure */ \ - { 0x00000004, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstPressure */ \ - { 0x00000005, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinCompPressure */ \ - { 0x00000006, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxCompPressure */ \ - { 0x00000007, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstSpeed */ \ - { 0x00000008, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstSpeed */ \ - { 0x00000009, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstFlow */ \ - { 0x0000000A, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstFlow */ \ - { 0x0000000B, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstTemp */ \ - { 0x0000000C, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstTemp */ \ - { 0x00000010, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* PumpStatus */ \ - { 0x00000011, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveOperationMode */ \ - { 0x00000012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ - { 0x00000013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ - { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ - { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(184) }, /* LifetimeRunningHours */ \ - { 0x00000016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(187) }, /* Power */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000000, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxPressure */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxSpeed */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxFlow */ \ + { 0x00000003, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinConstPressure */ \ + { 0x00000004, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxConstPressure */ \ + { 0x00000005, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinCompPressure */ \ + { 0x00000006, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxCompPressure */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinConstSpeed */ \ + { 0x00000008, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxConstSpeed */ \ + { 0x00000009, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinConstFlow */ \ + { 0x0000000A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxConstFlow */ \ + { 0x0000000B, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinConstTemp */ \ + { 0x0000000C, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxConstTemp */ \ + { 0x00000010, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* PumpStatus */ \ + { 0x00000011, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveOperationMode */ \ + { 0x00000012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ + { 0x00000013, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Speed */ \ + { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(184) }, /* LifetimeRunningHours */ \ + { 0x00000016, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_LONG_DEFAULTS_INDEX(187) }, /* Power */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_LONG_DEFAULTS_INDEX(190) }, /* LifetimeEnergyConsumed */ \ { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* OperationMode */ \ diff --git a/zzz_generated/placeholder/app2/zap-generated/access.h b/zzz_generated/placeholder/app2/zap-generated/access.h index 6f5bfe79c4eb51..6bb18e8c24042b 100644 --- a/zzz_generated/placeholder/app2/zap-generated/access.h +++ b/zzz_generated/placeholder/app2/zap-generated/access.h @@ -41,6 +41,10 @@ 49, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: view */ \ @@ -67,6 +71,10 @@ 6, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ 7, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: view */ \ @@ -93,6 +101,10 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: view */ \ /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: view */ \ @@ -116,6 +128,10 @@ 48, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ 49, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ 6, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: manage */ \ 513, /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: manage */ \ 513, /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: manage */ \ 513, /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: manage */ \ @@ -137,6 +153,10 @@ 0, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ 4, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ 16387, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \ + 21, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ + 23, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ + 32, /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: manage */ \ + 33, /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: manage */ \ 21, /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: manage */ \ 22, /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: manage */ \ 23, /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: manage */ \ @@ -158,6 +178,10 @@ kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ kMatterAccessPrivilegeManage, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: manage */ \ diff --git a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h index 4f92066274c5b7..d000755ad46606 100644 --- a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h @@ -225,8 +225,8 @@ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xF }, /* Mode */ \ \ /* Endpoint: 0, Cluster: Pump Configuration and Control (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* OperationMode */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* ControlMode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* OperationMode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x7 }, /* ControlMode */ \ \ /* Endpoint: 0, Cluster: Thermostat (server) */ \ { (uint16_t) 0x2BC, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* min heat setpoint limit */ \ @@ -416,28 +416,28 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Pump Configuration and Control (server) */ \ - { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxPressure */ \ - { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxSpeed */ \ - { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxFlow */ \ - { 0x00000003, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstPressure */ \ - { 0x00000004, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstPressure */ \ - { 0x00000005, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinCompPressure */ \ - { 0x00000006, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxCompPressure */ \ - { 0x00000007, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstSpeed */ \ - { 0x00000008, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstSpeed */ \ - { 0x00000009, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstFlow */ \ - { 0x0000000A, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstFlow */ \ - { 0x0000000B, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstTemp */ \ - { 0x0000000C, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstTemp */ \ - { 0x00000010, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* PumpStatus */ \ - { 0x00000011, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveOperationMode */ \ - { 0x00000012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ - { 0x00000013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ - { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ - { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(48) }, /* LifetimeRunningHours */ \ - { 0x00000016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(51) }, /* Power */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000000, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxPressure */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxSpeed */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxFlow */ \ + { 0x00000003, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinConstPressure */ \ + { 0x00000004, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxConstPressure */ \ + { 0x00000005, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinCompPressure */ \ + { 0x00000006, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxCompPressure */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinConstSpeed */ \ + { 0x00000008, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxConstSpeed */ \ + { 0x00000009, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinConstFlow */ \ + { 0x0000000A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxConstFlow */ \ + { 0x0000000B, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinConstTemp */ \ + { 0x0000000C, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxConstTemp */ \ + { 0x00000010, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* PumpStatus */ \ + { 0x00000011, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveOperationMode */ \ + { 0x00000012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ + { 0x00000013, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Speed */ \ + { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(48) }, /* LifetimeRunningHours */ \ + { 0x00000016, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_LONG_DEFAULTS_INDEX(51) }, /* Power */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_LONG_DEFAULTS_INDEX(54) }, /* LifetimeEnergyConsumed */ \ { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* OperationMode */ \ diff --git a/zzz_generated/pump-app/zap-generated/access.h b/zzz_generated/pump-app/zap-generated/access.h index eff18b86f55893..cc73137d7b977a 100644 --- a/zzz_generated/pump-app/zap-generated/access.h +++ b/zzz_generated/pump-app/zap-generated/access.h @@ -45,6 +45,10 @@ 49, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: view */ \ 62, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ /* Cluster: User Label, Attribute: label list, Privilege: view */ \ } @@ -66,6 +70,10 @@ 7, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: view */ \ 0, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ /* Cluster: User Label, Attribute: label list, Privilege: view */ \ } @@ -87,6 +95,10 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: view */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ /* Cluster: User Label, Attribute: label list, Privilege: view */ \ } @@ -104,6 +116,10 @@ 8, /* Cluster: Level Control, Attribute: start up current level, Privilege: manage */ \ 49, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ 6, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: manage */ \ 65, /* Cluster: User Label, Attribute: label list, Privilege: manage */ \ } @@ -119,6 +135,10 @@ 16384, /* Cluster: Level Control, Attribute: start up current level, Privilege: manage */ \ 4, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ 16387, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \ + 21, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ + 23, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ + 32, /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: manage */ \ + 33, /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: manage */ \ 0, /* Cluster: User Label, Attribute: label list, Privilege: manage */ \ } @@ -134,6 +154,10 @@ kMatterAccessPrivilegeManage, /* Cluster: Level Control, Attribute: start up current level, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ kMatterAccessPrivilegeManage, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: User Label, Attribute: label list, Privilege: manage */ \ } diff --git a/zzz_generated/pump-app/zap-generated/endpoint_config.h b/zzz_generated/pump-app/zap-generated/endpoint_config.h index 23bbca1bf8353c..efd2019cd001a8 100644 --- a/zzz_generated/pump-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-app/zap-generated/endpoint_config.h @@ -458,9 +458,9 @@ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* options */ \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* OperationMode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* OperationMode */ \ { \ - (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x7 \ } /* ControlMode */ \ } @@ -765,28 +765,28 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ - { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxPressure */ \ - { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxSpeed */ \ - { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxFlow */ \ - { 0x00000003, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstPressure */ \ - { 0x00000004, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstPressure */ \ - { 0x00000005, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinCompPressure */ \ - { 0x00000006, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxCompPressure */ \ - { 0x00000007, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstSpeed */ \ - { 0x00000008, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstSpeed */ \ - { 0x00000009, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstFlow */ \ - { 0x0000000A, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstFlow */ \ - { 0x0000000B, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstTemp */ \ - { 0x0000000C, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstTemp */ \ - { 0x00000010, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* PumpStatus */ \ - { 0x00000011, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveOperationMode */ \ - { 0x00000012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ - { 0x00000013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ - { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ - { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(259) }, /* LifetimeRunningHours */ \ - { 0x00000016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(262) }, /* Power */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000000, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxPressure */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxSpeed */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxFlow */ \ + { 0x00000003, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinConstPressure */ \ + { 0x00000004, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxConstPressure */ \ + { 0x00000005, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinCompPressure */ \ + { 0x00000006, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxCompPressure */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinConstSpeed */ \ + { 0x00000008, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxConstSpeed */ \ + { 0x00000009, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinConstFlow */ \ + { 0x0000000A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxConstFlow */ \ + { 0x0000000B, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MinConstTemp */ \ + { 0x0000000C, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* MaxConstTemp */ \ + { 0x00000010, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* PumpStatus */ \ + { 0x00000011, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveOperationMode */ \ + { 0x00000012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ + { 0x00000013, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Speed */ \ + { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(259) }, /* LifetimeRunningHours */ \ + { 0x00000016, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_LONG_DEFAULTS_INDEX(262) }, /* Power */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_LONG_DEFAULTS_INDEX(265) }, /* LifetimeEnergyConsumed */ \ { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* OperationMode */ \ From 10dff53ea49f29cbfe23589a164e92e47da63605 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Fri, 8 Apr 2022 06:46:06 +0000 Subject: [PATCH 08/16] Restyled by clang-format --- .../chip-tool/zap-generated/test/Commands.h | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index bbaaabdba28cfc..640b77373851ba 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -119149,11 +119149,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 120U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -119188,11 +119188,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 1000U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -119227,11 +119227,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 180U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); From bf38ba428a47dd46ceb3c2fae2035077c2fd167d Mon Sep 17 00:00:00 2001 From: Thomas Lykkeberg Date: Mon, 11 Apr 2022 15:56:57 +0200 Subject: [PATCH 09/16] * Set the LifetimeRunningHours and LifetimeEnergyConsumed to Nullable --- .../all-clusters-app.matter | 4 +- .../placeholder/linux/apps/app1/config.matter | 4 +- .../placeholder/linux/apps/app2/config.matter | 4 +- examples/pump-app/pump-common/pump-app.matter | 4 +- ...pump-configuration-and-control-cluster.xml | 4 +- .../data_model/controller-clusters.matter | 4 +- .../CHIPAttributeTLVValueDecoder.cpp | 30 +++- .../zap-generated/CHIPClustersWrite-JNI.cpp | 22 ++- .../java/zap-generated/CHIPReadCallbacks.cpp | 136 +++++++++++++++++ .../java/zap-generated/CHIPReadCallbacks.h | 60 ++++++++ .../chip/devicecontroller/ChipClusters.java | 39 ++++- .../devicecontroller/ClusterReadMapping.java | 9 +- .../python/chip/clusters/Objects.py | 16 +- .../CHIPAttributeTLVValueDecoder.mm | 16 +- .../CHIP/zap-generated/CHIPClustersObjc.h | 4 +- .../CHIP/zap-generated/CHIPClustersObjc.mm | 65 ++++---- .../Framework/CHIPTests/CHIPClustersTests.m | 9 ++ .../zap-generated/endpoint_config.h | 4 +- .../zap-generated/attributes/Accessors.cpp | 66 ++++++-- .../zap-generated/attributes/Accessors.h | 8 +- .../zap-generated/cluster-objects.h | 16 +- .../zap-generated/cluster/Commands.h | 4 +- .../zap-generated/test/Commands.h | 9 ++ .../zap-generated/cluster/Commands.h | 4 +- .../cluster/logging/DataModelLogger.cpp | 4 +- .../chip-tool/zap-generated/test/Commands.h | 144 ++++++++++-------- .../app1/zap-generated/endpoint_config.h | 4 +- .../app2/zap-generated/endpoint_config.h | 4 +- .../pump-app/zap-generated/endpoint_config.h | 4 +- 29 files changed, 531 insertions(+), 170 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index f896d8da346feb..05f4d076176097 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2644,9 +2644,9 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute PumpControlMode effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; readonly attribute nullable int16u speed = 20; - attribute int24u lifetimeRunningHours = 21; + attribute nullable int24u lifetimeRunningHours = 21; readonly attribute nullable int24u power = 22; - attribute int32u lifetimeEnergyConsumed = 23; + attribute nullable int32u lifetimeEnergyConsumed = 23; attribute PumpOperationMode operationMode = 32; attribute PumpControlMode controlMode = 33; readonly attribute bitmap16 alarmMask = 34; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 8699be136c79b3..d1fe053eaa5f4a 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1872,9 +1872,9 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute PumpControlMode effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; readonly attribute nullable int16u speed = 20; - attribute int24u lifetimeRunningHours = 21; + attribute nullable int24u lifetimeRunningHours = 21; readonly attribute nullable int24u power = 22; - attribute int32u lifetimeEnergyConsumed = 23; + attribute nullable int32u lifetimeEnergyConsumed = 23; attribute PumpOperationMode operationMode = 32; attribute PumpControlMode controlMode = 33; readonly attribute bitmap16 alarmMask = 34; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 5c491fb78105c2..f216cac7e51b6c 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1603,9 +1603,9 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute PumpControlMode effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; readonly attribute nullable int16u speed = 20; - attribute int24u lifetimeRunningHours = 21; + attribute nullable int24u lifetimeRunningHours = 21; readonly attribute nullable int24u power = 22; - attribute int32u lifetimeEnergyConsumed = 23; + attribute nullable int32u lifetimeEnergyConsumed = 23; attribute PumpOperationMode operationMode = 32; attribute PumpControlMode controlMode = 33; readonly attribute bitmap16 alarmMask = 34; diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index da99f73449d4bc..e01021fd42734d 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -1179,9 +1179,9 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute PumpControlMode effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; readonly attribute nullable int16u speed = 20; - attribute int24u lifetimeRunningHours = 21; + attribute nullable int24u lifetimeRunningHours = 21; readonly attribute nullable int24u power = 22; - attribute int32u lifetimeEnergyConsumed = 23; + attribute nullable int32u lifetimeEnergyConsumed = 23; attribute PumpOperationMode operationMode = 32; attribute PumpControlMode controlMode = 33; readonly attribute bitmap16 alarmMask = 34; diff --git a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml index 3ffc1adcc9c106..7074810fc6f00a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml @@ -43,13 +43,13 @@ limitations under the License. EffectiveControlMode Capacity Speed - + LifetimeRunningHours Power - + LifetimeEnergyConsumed diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index d9185852d2f04f..c3db6679108704 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3096,9 +3096,9 @@ client cluster PumpConfigurationAndControl = 512 { readonly attribute PumpControlMode effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; readonly attribute nullable int16u speed = 20; - attribute int24u lifetimeRunningHours = 21; + attribute nullable int24u lifetimeRunningHours = 21; readonly attribute nullable int24u power = 22; - attribute int32u lifetimeEnergyConsumed = 23; + attribute nullable int32u lifetimeEnergyConsumed = 23; attribute PumpOperationMode operationMode = 32; attribute PumpControlMode controlMode = 33; readonly attribute bitmap16 alarmMask = 34; diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 40bf8239e38bb8..976e6e96a54919 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -10475,10 +10475,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } return value; } case Attributes::Power::Id: { @@ -10512,10 +10519,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } return value; } case Attributes::OperationMode::Id: { diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index 3e0eb5008ce702..8097fdea6c08c0 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -3098,7 +3098,16 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeRunningHoursAt std::vector> cleanupByteArrays; std::vector> cleanupStrings; - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); + } std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3149,7 +3158,16 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeEnergyConsumed std::vector> cleanupByteArrays; std::vector> cleanupStrings; - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); + } std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index ca1836f7d45eff..444a10867939e0 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -16503,6 +16503,74 @@ void CHIPPumpConfigurationAndControlSpeedAttributeCallback::CallbackFn(void * co env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } +CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: + CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(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"); + } +} + +CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: + ~CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::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/Long;)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/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + CHIPPumpConfigurationAndControlPowerAttributeCallback::CHIPPumpConfigurationAndControlPowerAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), @@ -16570,6 +16638,74 @@ void CHIPPumpConfigurationAndControlPowerAttributeCallback::CallbackFn(void * co env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } +CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: + CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(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"); + } +} + +CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: + ~CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::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/Long;)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/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback:: CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback(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 7c7e18c98aacea..08653886c9758d 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -6879,6 +6879,36 @@ class CHIPPumpConfigurationAndControlSpeedAttributeCallback bool keepAlive; }; +class CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback * 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_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPPumpConfigurationAndControlPowerAttributeCallback : public chip::Callback::Callback { @@ -6909,6 +6939,36 @@ class CHIPPumpConfigurationAndControlPowerAttributeCallback bool keepAlive; }; +class CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback * 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_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPPumpConfigurationAndControlGeneratedCommandListAttributeCallback : 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 517356118b46e3..51b6a5711a7877 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -13955,6 +13955,14 @@ public interface SpeedAttributeCallback { default void onSubscriptionEstablished() {} } + public interface LifetimeRunningHoursAttributeCallback { + void onSuccess(@Nullable Long value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + public interface PowerAttributeCallback { void onSuccess(@Nullable Long value); @@ -13963,6 +13971,14 @@ public interface PowerAttributeCallback { default void onSubscriptionEstablished() {} } + public interface LifetimeEnergyConsumedAttributeCallback { + void onSuccess(@Nullable Long value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + public interface GeneratedCommandListAttributeCallback { void onSuccess(List valueList); @@ -14149,7 +14165,7 @@ public void subscribeSpeedAttribute( subscribeSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readLifetimeRunningHoursAttribute(LongAttributeCallback callback) { + public void readLifetimeRunningHoursAttribute(LifetimeRunningHoursAttributeCallback callback) { readLifetimeRunningHoursAttribute(chipClusterPtr, callback); } @@ -14163,7 +14179,7 @@ public void writeLifetimeRunningHoursAttribute( } public void subscribeLifetimeRunningHoursAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { + LifetimeRunningHoursAttributeCallback callback, int minInterval, int maxInterval) { subscribeLifetimeRunningHoursAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -14176,7 +14192,8 @@ public void subscribePowerAttribute( subscribePowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readLifetimeEnergyConsumedAttribute(LongAttributeCallback callback) { + public void readLifetimeEnergyConsumedAttribute( + LifetimeEnergyConsumedAttributeCallback callback) { readLifetimeEnergyConsumedAttribute(chipClusterPtr, callback); } @@ -14190,7 +14207,7 @@ public void writeLifetimeEnergyConsumedAttribute( } public void subscribeLifetimeEnergyConsumedAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { + LifetimeEnergyConsumedAttributeCallback callback, int minInterval, int maxInterval) { subscribeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -14425,7 +14442,7 @@ private native void subscribeSpeedAttribute( long chipClusterPtr, SpeedAttributeCallback callback, int minInterval, int maxInterval); private native void readLifetimeRunningHoursAttribute( - long chipClusterPtr, LongAttributeCallback callback); + long chipClusterPtr, LifetimeRunningHoursAttributeCallback callback); private native void writeLifetimeRunningHoursAttribute( long chipClusterPtr, @@ -14434,7 +14451,10 @@ private native void writeLifetimeRunningHoursAttribute( @Nullable Integer timedWriteTimeoutMs); private native void subscribeLifetimeRunningHoursAttribute( - long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + LifetimeRunningHoursAttributeCallback callback, + int minInterval, + int maxInterval); private native void readPowerAttribute(long chipClusterPtr, PowerAttributeCallback callback); @@ -14442,7 +14462,7 @@ private native void subscribePowerAttribute( long chipClusterPtr, PowerAttributeCallback callback, int minInterval, int maxInterval); private native void readLifetimeEnergyConsumedAttribute( - long chipClusterPtr, LongAttributeCallback callback); + long chipClusterPtr, LifetimeEnergyConsumedAttributeCallback callback); private native void writeLifetimeEnergyConsumedAttribute( long chipClusterPtr, @@ -14451,7 +14471,10 @@ private native void writeLifetimeEnergyConsumedAttribute( @Nullable Integer timedWriteTimeoutMs); private native void subscribeLifetimeEnergyConsumedAttribute( - long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + LifetimeEnergyConsumedAttributeCallback callback, + int minInterval, + int maxInterval); private native void readOperationModeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 6092a9b0402e24..589b00edb11a46 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -6719,7 +6719,10 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readLifetimeRunningHoursAttribute((ChipClusters.LongAttributeCallback) callback); + .readLifetimeRunningHoursAttribute( + (ChipClusters.PumpConfigurationAndControlCluster + .LifetimeRunningHoursAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), readPumpConfigurationAndControlLifetimeRunningHoursCommandParams); @@ -6748,7 +6751,9 @@ public Map> getReadAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) .readLifetimeEnergyConsumedAttribute( - (ChipClusters.LongAttributeCallback) callback); + (ChipClusters.PumpConfigurationAndControlCluster + .LifetimeEnergyConsumedAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), readPumpConfigurationAndControlLifetimeEnergyConsumedCommandParams); diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index cde833ad32e7b7..07c8c96bde9d5a 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -19182,9 +19182,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="effectiveControlMode", Tag=0x00000012, Type=PumpConfigurationAndControl.Enums.PumpControlMode), ClusterObjectFieldDescriptor(Label="capacity", Tag=0x00000013, Type=typing.Union[Nullable, int]), ClusterObjectFieldDescriptor(Label="speed", Tag=0x00000014, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="lifetimeRunningHours", Tag=0x00000015, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="lifetimeRunningHours", Tag=0x00000015, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="power", Tag=0x00000016, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="lifetimeEnergyConsumed", Tag=0x00000017, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="lifetimeEnergyConsumed", Tag=0x00000017, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="operationMode", Tag=0x00000020, Type=PumpConfigurationAndControl.Enums.PumpOperationMode), ClusterObjectFieldDescriptor(Label="controlMode", Tag=0x00000021, Type=typing.Optional[PumpConfigurationAndControl.Enums.PumpControlMode]), ClusterObjectFieldDescriptor(Label="alarmMask", Tag=0x00000022, Type=typing.Optional[uint]), @@ -19213,9 +19213,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: effectiveControlMode: 'PumpConfigurationAndControl.Enums.PumpControlMode' = None capacity: 'typing.Union[Nullable, int]' = None speed: 'typing.Union[None, Nullable, uint]' = None - lifetimeRunningHours: 'typing.Optional[uint]' = None + lifetimeRunningHours: 'typing.Union[None, Nullable, uint]' = None power: 'typing.Union[None, Nullable, uint]' = None - lifetimeEnergyConsumed: 'typing.Optional[uint]' = None + lifetimeEnergyConsumed: 'typing.Union[None, Nullable, uint]' = None operationMode: 'PumpConfigurationAndControl.Enums.PumpOperationMode' = None controlMode: 'typing.Optional[PumpConfigurationAndControl.Enums.PumpControlMode]' = None alarmMask: 'typing.Optional[uint]' = None @@ -19544,9 +19544,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class Power(ClusterAttributeDescriptor): @@ -19576,9 +19576,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class OperationMode(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 6636191cfd8e54..eef82b1fb41d55 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -8659,8 +8659,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } return value; } case Attributes::Power::Id: { @@ -8685,8 +8689,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } return value; } case Attributes::OperationMode::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index e20f9e987707b0..2e3a15217f9480 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -9256,7 +9256,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the @@ -9292,7 +9292,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index bb264f336bcb58..afdb88a45270a5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -34249,15 +34249,17 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel - (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt32uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -34268,7 +34270,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -34283,7 +34290,7 @@ - (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnu reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -34291,11 +34298,11 @@ new CHIPInt32uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34308,7 +34315,7 @@ + (void)readAttributeLifetimeRunningHoursWithAttributeCache:(CHIPAttributeCacheC completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; @@ -34317,7 +34324,7 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -34390,15 +34397,16 @@ new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancel - (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt32uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -34410,7 +34418,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -34425,7 +34438,7 @@ - (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Non reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -34433,11 +34446,11 @@ new CHIPInt32uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34450,7 +34463,7 @@ + (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(CHIPAttributeCach completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; @@ -34459,7 +34472,7 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index c945e884bf7ec1..b1c3c40387393c 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -21236,6 +21236,7 @@ - (void)testSendClusterTest_TC_PCC_2_1_000026_ReadAttribute { id actualValue = value; + XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 0UL); } @@ -21319,6 +21320,7 @@ - (void)testSendClusterTest_TC_PCC_2_1_000029_ReadAttribute { id actualValue = value; + XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 0UL); } @@ -21770,6 +21772,7 @@ - (void)testSendClusterTest_TC_PCC_2_1_000045_ReadAttribute { id actualValue = value; + XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 0UL); } @@ -21853,6 +21856,7 @@ - (void)testSendClusterTest_TC_PCC_2_1_000048_ReadAttribute { id actualValue = value; + XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 0UL); } @@ -22251,6 +22255,7 @@ - (void)testSendClusterTest_TC_PCC_2_4_000002_ReadAttribute { id actualValue = value; + XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 1UL); } @@ -22301,6 +22306,7 @@ - (void)testSendClusterTest_TC_PCC_2_4_000004_ReadAttribute { id actualValue = value; + XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 2UL); } @@ -22351,6 +22357,7 @@ - (void)testSendClusterTest_TC_PCC_2_4_000006_ReadAttribute { id actualValue = value; + XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 3UL); } @@ -22425,6 +22432,7 @@ - (void)testSendClusterTest_TC_PCC_2_4_000009_ReadAttribute { id actualValue = value; + XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 2UL); } @@ -22475,6 +22483,7 @@ - (void)testSendClusterTest_TC_PCC_2_4_000011_ReadAttribute { id actualValue = value; + XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedIntValue], 3UL); } diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 1643f90d45a215..0d3b9f6686aeea 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1588,10 +1588,10 @@ { 0x00000012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ { 0x00000013, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Speed */ \ - { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(413) }, /* LifetimeRunningHours */ \ { 0x00000016, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_LONG_DEFAULTS_INDEX(416) }, /* Power */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(419) }, /* LifetimeEnergyConsumed */ \ { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* OperationMode */ \ diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 963add7ebda04e..b82c74f257f8aa 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -17567,7 +17567,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace LifetimeRunningHours { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -17575,17 +17575,20 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits>; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -17596,6 +17599,26 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) ZCL_INT24U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT24U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace LifetimeRunningHours namespace Power { @@ -17656,7 +17679,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace LifetimeEnergyConsumed { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17664,17 +17687,20 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -17685,6 +17711,26 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) ZCL_INT32U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT32U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace LifetimeEnergyConsumed namespace OperationMode { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 889a1f1a38a156..944cba5e8fffa6 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -3075,8 +3075,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl } // namespace Speed namespace LifetimeRunningHours { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int24u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace LifetimeRunningHours namespace Power { @@ -3087,8 +3089,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl } // namespace Power namespace LifetimeEnergyConsumed { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int32u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace LifetimeEnergyConsumed namespace OperationMode { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 53a60140810c57..6b4c92acfcc18e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -21242,9 +21242,9 @@ struct TypeInfo namespace LifetimeRunningHours { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::LifetimeRunningHours::Id; } @@ -21266,9 +21266,9 @@ struct TypeInfo namespace LifetimeEnergyConsumed { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::LifetimeEnergyConsumed::Id; } @@ -21400,9 +21400,9 @@ struct TypeInfo static_cast(0); Attributes::Capacity::TypeInfo::DecodableType capacity; Attributes::Speed::TypeInfo::DecodableType speed; - Attributes::LifetimeRunningHours::TypeInfo::DecodableType lifetimeRunningHours = static_cast(0); + Attributes::LifetimeRunningHours::TypeInfo::DecodableType lifetimeRunningHours; Attributes::Power::TypeInfo::DecodableType power; - Attributes::LifetimeEnergyConsumed::TypeInfo::DecodableType lifetimeEnergyConsumed = static_cast(0); + Attributes::LifetimeEnergyConsumed::TypeInfo::DecodableType lifetimeEnergyConsumed; Attributes::OperationMode::TypeInfo::DecodableType operationMode = static_cast(0); Attributes::ControlMode::TypeInfo::DecodableType controlMode = diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h index 1c0ca41aad4100..d5ec58cb111ae3 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h @@ -46904,7 +46904,7 @@ class WritePumpConfigurationAndControlLifetimeRunningHours : public ModelCommand queue:callbackQueue]; CHIP_ERROR __block chipError = CHIP_NO_ERROR; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; [cluster writeAttributeLifetimeRunningHoursWithValue:value completionHandler:^(NSError * _Nullable error) { @@ -47104,7 +47104,7 @@ class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public ModelComma queue:callbackQueue]; CHIP_ERROR __block chipError = CHIP_NO_ERROR; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; [cluster writeAttributeLifetimeEnergyConsumedWithValue:value diff --git a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h index c163473eba9979..cb96942c66e3db 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h @@ -29797,6 +29797,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { { id actualValue = value; + VerifyOrReturn(CheckValueNonNull("LifetimeRunningHours", actualValue)); VerifyOrReturn(CheckValue("LifetimeRunningHours", actualValue, 0UL)); } @@ -29876,6 +29877,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { { id actualValue = value; + VerifyOrReturn(CheckValueNonNull("LifetimeEnergyConsumed", actualValue)); VerifyOrReturn(CheckValue("LifetimeEnergyConsumed", actualValue, 0UL)); } @@ -30295,6 +30297,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { { id actualValue = value; + VerifyOrReturn(CheckValueNonNull("LifetimeRunningHours", actualValue)); VerifyOrReturn(CheckValue("LifetimeRunningHours", actualValue, 0UL)); } @@ -30374,6 +30377,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { { id actualValue = value; + VerifyOrReturn(CheckValueNonNull("LifetimeEnergyConsumed", actualValue)); VerifyOrReturn(CheckValue("LifetimeEnergyConsumed", actualValue, 0UL)); } @@ -31060,6 +31064,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { { id actualValue = value; + VerifyOrReturn(CheckValueNonNull("LifetimeRunningHours", actualValue)); VerifyOrReturn(CheckValue("LifetimeRunningHours", actualValue, 1UL)); } @@ -31106,6 +31111,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { { id actualValue = value; + VerifyOrReturn(CheckValueNonNull("LifetimeRunningHours", actualValue)); VerifyOrReturn(CheckValue("LifetimeRunningHours", actualValue, 2UL)); } @@ -31152,6 +31158,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { { id actualValue = value; + VerifyOrReturn(CheckValueNonNull("LifetimeRunningHours", actualValue)); VerifyOrReturn(CheckValue("LifetimeRunningHours", actualValue, 3UL)); } @@ -31220,6 +31227,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { { id actualValue = value; + VerifyOrReturn(CheckValueNonNull("LifetimeEnergyConsumed", actualValue)); VerifyOrReturn(CheckValue("LifetimeEnergyConsumed", actualValue, 2UL)); } @@ -31266,6 +31274,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { { id actualValue = value; + VerifyOrReturn(CheckValueNonNull("LifetimeEnergyConsumed", actualValue)); VerifyOrReturn(CheckValue("LifetimeEnergyConsumed", actualValue, 3UL)); } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index f356c4bf828b29..c6b669ef589f93 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -9760,7 +9760,7 @@ class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribu } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttribute @@ -9787,7 +9787,7 @@ class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttri } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class WritePumpConfigurationAndControlOperationMode : public WriteAttribute diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index c1a15b9ccf831a..b341eaaa427c1e 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -8107,7 +8107,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("Speed", 1, value); } case PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id: { - uint32_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("LifetimeRunningHours", 1, value); } @@ -8117,7 +8117,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("Power", 1, value); } case PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id: { - uint32_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("LifetimeEnergyConsumed", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 640b77373851ba..5d6fe41b322c7b 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -41817,7 +41817,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_26(error); } - static void OnSuccessCallback_26(void * context, uint32_t lifetimeRunningHours) + static void OnSuccessCallback_26(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_26(lifetimeRunningHours); } @@ -41827,7 +41827,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_27(error); } - static void OnSuccessCallback_27(void * context, uint32_t lifetimeRunningHours) + static void OnSuccessCallback_27(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_27(lifetimeRunningHours); } @@ -41847,7 +41847,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_29(error); } - static void OnSuccessCallback_29(void * context, uint32_t lifetimeEnergyConsumed) + static void OnSuccessCallback_29(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { (static_cast(context))->OnSuccessResponse_29(lifetimeEnergyConsumed); } @@ -41857,7 +41857,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_30(error); } - static void OnSuccessCallback_30(void * context, uint32_t lifetimeEnergyConsumed) + static void OnSuccessCallback_30(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { (static_cast(context))->OnSuccessResponse_30(lifetimeEnergyConsumed); } @@ -42004,7 +42004,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_45(error); } - static void OnSuccessCallback_45(void * context, uint32_t lifetimeRunningHours) + static void OnSuccessCallback_45(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_45(lifetimeRunningHours); } @@ -42014,7 +42014,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_46(error); } - static void OnSuccessCallback_46(void * context, uint32_t lifetimeRunningHours) + static void OnSuccessCallback_46(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_46(lifetimeRunningHours); } @@ -42034,7 +42034,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_48(error); } - static void OnSuccessCallback_48(void * context, uint32_t lifetimeEnergyConsumed) + static void OnSuccessCallback_48(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { (static_cast(context))->OnSuccessResponse_48(lifetimeEnergyConsumed); } @@ -42044,7 +42044,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_49(error); } - static void OnSuccessCallback_49(void * context, uint32_t lifetimeEnergyConsumed) + static void OnSuccessCallback_49(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { (static_cast(context))->OnSuccessResponse_49(lifetimeEnergyConsumed); } @@ -42677,9 +42677,10 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_26(uint32_t lifetimeRunningHours) + void OnSuccessResponse_26(const chip::app::DataModel::Nullable & lifetimeRunningHours) { - VerifyOrReturn(CheckValue("lifetimeRunningHours", lifetimeRunningHours, 0UL)); + VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", lifetimeRunningHours)); + VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", lifetimeRunningHours.Value(), 0UL)); NextTest(); } @@ -42702,7 +42703,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_27(uint32_t lifetimeRunningHours) + void OnSuccessResponse_27(const chip::app::DataModel::Nullable & lifetimeRunningHours) { VerifyOrReturn(CheckConstraintType("lifetimeRunningHours", "", "uint24")); NextTest(); @@ -42749,9 +42750,10 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_29(uint32_t lifetimeEnergyConsumed) + void OnSuccessResponse_29(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { - VerifyOrReturn(CheckValue("lifetimeEnergyConsumed", lifetimeEnergyConsumed, 0UL)); + VerifyOrReturn(CheckValueNonNull("lifetimeEnergyConsumed", lifetimeEnergyConsumed)); + VerifyOrReturn(CheckValue("lifetimeEnergyConsumed.Value()", lifetimeEnergyConsumed.Value(), 0UL)); NextTest(); } @@ -42774,7 +42776,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_30(uint32_t lifetimeEnergyConsumed) + void OnSuccessResponse_30(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { VerifyOrReturn(CheckConstraintType("lifetimeEnergyConsumed", "", "uint32")); NextTest(); @@ -42786,8 +42788,9 @@ class Test_TC_PCC_2_1Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint32_t lifetimeEnergyConsumedArgument; - lifetimeEnergyConsumedArgument = 0UL; + chip::app::DataModel::Nullable lifetimeEnergyConsumedArgument; + lifetimeEnergyConsumedArgument.SetNonNull(); + lifetimeEnergyConsumedArgument.Value() = 0UL; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -43137,9 +43140,10 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_45(uint32_t lifetimeRunningHours) + void OnSuccessResponse_45(const chip::app::DataModel::Nullable & lifetimeRunningHours) { - VerifyOrReturn(CheckValue("lifetimeRunningHours", lifetimeRunningHours, 0UL)); + VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", lifetimeRunningHours)); + VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", lifetimeRunningHours.Value(), 0UL)); NextTest(); } @@ -43162,7 +43166,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_46(uint32_t lifetimeRunningHours) + void OnSuccessResponse_46(const chip::app::DataModel::Nullable & lifetimeRunningHours) { VerifyOrReturn(CheckConstraintType("lifetimeRunningHours", "", "uint24")); NextTest(); @@ -43209,9 +43213,10 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_48(uint32_t lifetimeEnergyConsumed) + void OnSuccessResponse_48(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { - VerifyOrReturn(CheckValue("lifetimeEnergyConsumed", lifetimeEnergyConsumed, 0UL)); + VerifyOrReturn(CheckValueNonNull("lifetimeEnergyConsumed", lifetimeEnergyConsumed)); + VerifyOrReturn(CheckValue("lifetimeEnergyConsumed.Value()", lifetimeEnergyConsumed.Value(), 0UL)); NextTest(); } @@ -43234,7 +43239,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_49(uint32_t lifetimeEnergyConsumed) + void OnSuccessResponse_49(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { VerifyOrReturn(CheckConstraintType("lifetimeEnergyConsumed", "", "uint32")); NextTest(); @@ -44057,7 +44062,7 @@ class Test_TC_PCC_2_4Suite : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context, uint32_t lifetimeRunningHours) + static void OnSuccessCallback_2(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_2(lifetimeRunningHours); } @@ -44074,7 +44079,7 @@ class Test_TC_PCC_2_4Suite : public TestCommand (static_cast(context))->OnFailureResponse_4(error); } - static void OnSuccessCallback_4(void * context, uint32_t lifetimeRunningHours) + static void OnSuccessCallback_4(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_4(lifetimeRunningHours); } @@ -44091,7 +44096,7 @@ class Test_TC_PCC_2_4Suite : public TestCommand (static_cast(context))->OnFailureResponse_6(error); } - static void OnSuccessCallback_6(void * context, uint32_t lifetimeRunningHours) + static void OnSuccessCallback_6(void * context, const chip::app::DataModel::Nullable & lifetimeRunningHours) { (static_cast(context))->OnSuccessResponse_6(lifetimeRunningHours); } @@ -44115,7 +44120,7 @@ class Test_TC_PCC_2_4Suite : public TestCommand (static_cast(context))->OnFailureResponse_9(error); } - static void OnSuccessCallback_9(void * context, uint32_t lifetimeEnergyConsumed) + static void OnSuccessCallback_9(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { (static_cast(context))->OnSuccessResponse_9(lifetimeEnergyConsumed); } @@ -44132,7 +44137,7 @@ class Test_TC_PCC_2_4Suite : public TestCommand (static_cast(context))->OnFailureResponse_11(error); } - static void OnSuccessCallback_11(void * context, uint32_t lifetimeEnergyConsumed) + static void OnSuccessCallback_11(void * context, const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { (static_cast(context))->OnSuccessResponse_11(lifetimeEnergyConsumed); } @@ -44153,8 +44158,9 @@ class Test_TC_PCC_2_4Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint32_t lifetimeRunningHoursArgument; - lifetimeRunningHoursArgument = 1UL; + chip::app::DataModel::Nullable lifetimeRunningHoursArgument; + lifetimeRunningHoursArgument.SetNonNull(); + lifetimeRunningHoursArgument.Value() = 1UL; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44188,9 +44194,10 @@ class Test_TC_PCC_2_4Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_2(uint32_t lifetimeRunningHours) + void OnSuccessResponse_2(const chip::app::DataModel::Nullable & lifetimeRunningHours) { - VerifyOrReturn(CheckValue("lifetimeRunningHours", lifetimeRunningHours, 1UL)); + VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", lifetimeRunningHours)); + VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", lifetimeRunningHours.Value(), 1UL)); NextTest(); } @@ -44201,8 +44208,9 @@ class Test_TC_PCC_2_4Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint32_t lifetimeRunningHoursArgument; - lifetimeRunningHoursArgument = 2UL; + chip::app::DataModel::Nullable lifetimeRunningHoursArgument; + lifetimeRunningHoursArgument.SetNonNull(); + lifetimeRunningHoursArgument.Value() = 2UL; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44236,9 +44244,10 @@ class Test_TC_PCC_2_4Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_4(uint32_t lifetimeRunningHours) + void OnSuccessResponse_4(const chip::app::DataModel::Nullable & lifetimeRunningHours) { - VerifyOrReturn(CheckValue("lifetimeRunningHours", lifetimeRunningHours, 2UL)); + VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", lifetimeRunningHours)); + VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", lifetimeRunningHours.Value(), 2UL)); NextTest(); } @@ -44249,8 +44258,9 @@ class Test_TC_PCC_2_4Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint32_t lifetimeRunningHoursArgument; - lifetimeRunningHoursArgument = 3UL; + chip::app::DataModel::Nullable lifetimeRunningHoursArgument; + lifetimeRunningHoursArgument.SetNonNull(); + lifetimeRunningHoursArgument.Value() = 3UL; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44284,9 +44294,10 @@ class Test_TC_PCC_2_4Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_6(uint32_t lifetimeRunningHours) + void OnSuccessResponse_6(const chip::app::DataModel::Nullable & lifetimeRunningHours) { - VerifyOrReturn(CheckValue("lifetimeRunningHours", lifetimeRunningHours, 3UL)); + VerifyOrReturn(CheckValueNonNull("lifetimeRunningHours", lifetimeRunningHours)); + VerifyOrReturn(CheckValue("lifetimeRunningHours.Value()", lifetimeRunningHours.Value(), 3UL)); NextTest(); } @@ -44297,8 +44308,9 @@ class Test_TC_PCC_2_4Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint32_t lifetimeEnergyConsumedArgument; - lifetimeEnergyConsumedArgument = 1UL; + chip::app::DataModel::Nullable lifetimeEnergyConsumedArgument; + lifetimeEnergyConsumedArgument.SetNonNull(); + lifetimeEnergyConsumedArgument.Value() = 1UL; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44320,8 +44332,9 @@ class Test_TC_PCC_2_4Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint32_t lifetimeEnergyConsumedArgument; - lifetimeEnergyConsumedArgument = 2UL; + chip::app::DataModel::Nullable lifetimeEnergyConsumedArgument; + lifetimeEnergyConsumedArgument.SetNonNull(); + lifetimeEnergyConsumedArgument.Value() = 2UL; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44355,9 +44368,10 @@ class Test_TC_PCC_2_4Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_9(uint32_t lifetimeEnergyConsumed) + void OnSuccessResponse_9(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { - VerifyOrReturn(CheckValue("lifetimeEnergyConsumed", lifetimeEnergyConsumed, 2UL)); + VerifyOrReturn(CheckValueNonNull("lifetimeEnergyConsumed", lifetimeEnergyConsumed)); + VerifyOrReturn(CheckValue("lifetimeEnergyConsumed.Value()", lifetimeEnergyConsumed.Value(), 2UL)); NextTest(); } @@ -44368,8 +44382,9 @@ class Test_TC_PCC_2_4Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint32_t lifetimeEnergyConsumedArgument; - lifetimeEnergyConsumedArgument = 3UL; + chip::app::DataModel::Nullable lifetimeEnergyConsumedArgument; + lifetimeEnergyConsumedArgument.SetNonNull(); + lifetimeEnergyConsumedArgument.Value() = 3UL; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44403,9 +44418,10 @@ class Test_TC_PCC_2_4Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_11(uint32_t lifetimeEnergyConsumed) + void OnSuccessResponse_11(const chip::app::DataModel::Nullable & lifetimeEnergyConsumed) { - VerifyOrReturn(CheckValue("lifetimeEnergyConsumed", lifetimeEnergyConsumed, 3UL)); + VerifyOrReturn(CheckValueNonNull("lifetimeEnergyConsumed", lifetimeEnergyConsumed)); + VerifyOrReturn(CheckValue("lifetimeEnergyConsumed.Value()", lifetimeEnergyConsumed.Value(), 3UL)); NextTest(); } @@ -119149,11 +119165,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 120U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -119188,11 +119204,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 1000U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -119227,11 +119243,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 180U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); diff --git a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h index 0c56bcfbf810e3..b3a023f59530d8 100644 --- a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h @@ -662,10 +662,10 @@ { 0x00000012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ { 0x00000013, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Speed */ \ - { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(184) }, /* LifetimeRunningHours */ \ { 0x00000016, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_LONG_DEFAULTS_INDEX(187) }, /* Power */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(190) }, /* LifetimeEnergyConsumed */ \ { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* OperationMode */ \ diff --git a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h index d000755ad46606..28cf94983d2611 100644 --- a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h @@ -434,10 +434,10 @@ { 0x00000012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ { 0x00000013, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Speed */ \ - { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(48) }, /* LifetimeRunningHours */ \ { 0x00000016, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_LONG_DEFAULTS_INDEX(51) }, /* Power */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(54) }, /* LifetimeEnergyConsumed */ \ { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* OperationMode */ \ diff --git a/zzz_generated/pump-app/zap-generated/endpoint_config.h b/zzz_generated/pump-app/zap-generated/endpoint_config.h index efd2019cd001a8..028c18ec911a20 100644 --- a/zzz_generated/pump-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-app/zap-generated/endpoint_config.h @@ -783,10 +783,10 @@ { 0x00000012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ { 0x00000013, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* Speed */ \ - { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(259) }, /* LifetimeRunningHours */ \ { 0x00000016, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_LONG_DEFAULTS_INDEX(262) }, /* Power */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(265) }, /* LifetimeEnergyConsumed */ \ { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* OperationMode */ \ From 93f9e753257faf6a82db56069c59b2fdaf82c65c Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Mon, 11 Apr 2022 14:12:29 +0000 Subject: [PATCH 10/16] Restyled by clang-format --- .../chip-tool/zap-generated/test/Commands.h | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 5d6fe41b322c7b..f3f29aa4e44938 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -119165,11 +119165,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 120U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -119204,11 +119204,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 1000U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -119243,11 +119243,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 180U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); From ceb6b1f65558c77cb01d07cd3599a92ee896421d Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 12 Apr 2022 07:30:28 +0000 Subject: [PATCH 11/16] Restyled by clang-format --- .../chip-tool/zap-generated/test/Commands.h | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 5d6fe41b322c7b..f3f29aa4e44938 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -119165,11 +119165,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 120U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -119204,11 +119204,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 1000U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -119243,11 +119243,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 180U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); From 49e7e4fea083f15553033052892dc4fb985898b4 Mon Sep 17 00:00:00 2001 From: Thomas Lykkeberg Date: Wed, 13 Apr 2022 07:22:26 +0200 Subject: [PATCH 12/16] Fix error in PCC server implementation: use correct attribute types --- .../pump-configuration-and-control-server.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp b/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp index c830a543f24583..3108f1fc2259a8 100644 --- a/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp +++ b/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp @@ -24,6 +24,7 @@ #include using namespace chip; +using namespace chip::app::Clusters::PumpConfigurationAndControl; using namespace chip::app::Clusters::PumpConfigurationAndControl::Attributes; void emberAfPumpConfigurationAndControlClusterServerInitCallback(EndpointId endpoint) @@ -40,15 +41,15 @@ void MatterPumpConfigurationAndControlClusterServerAttributeChangedCallback(cons switch (attributePath.mAttributeId) { case ControlMode::Id: { - uint8_t value; - ControlMode::Get(attributePath.mEndpointId, &value); - EffectiveControlMode::Set(attributePath.mEndpointId, value); + PumpControlMode controlMode; + ControlMode::Get(attributePath.mEndpointId, &controlMode); + EffectiveControlMode::Set(attributePath.mEndpointId, controlMode); } break; case OperationMode::Id: { - uint8_t value; - OperationMode::Get(attributePath.mEndpointId, &value); - EffectiveOperationMode::Set(attributePath.mEndpointId, value); + PumpOperationMode operationMode; + OperationMode::Get(attributePath.mEndpointId, &operationMode); + EffectiveOperationMode::Set(attributePath.mEndpointId, operationMode); } break; default: From 77e0a98a3ee3dac79f0864790b3d1a80d4db79ab Mon Sep 17 00:00:00 2001 From: Thomas Lykkeberg Date: Tue, 19 Apr 2022 09:06:54 +0200 Subject: [PATCH 13/16] Changed back to ENUM8 as type in XML files for PCC --- .../all-clusters-app.matter | 12 +- .../placeholder/linux/apps/app1/config.matter | 12 +- .../placeholder/linux/apps/app2/config.matter | 12 +- examples/pump-app/pump-common/pump-app.matter | 12 +- .../pump-controller-app.matter | 6 +- .../pump-configuration-and-control-server.cpp | 5 +- ...pump-configuration-and-control-cluster.xml | 8 +- .../data_model/controller-clusters.matter | 12 +- .../CHIPAttributeTLVValueDecoder.cpp | 8 +- .../python/chip/clusters/Objects.py | 32 +-- .../CHIPAttributeTLVValueDecoder.mm | 8 +- .../CHIP/zap-generated/CHIPClustersObjc.mm | 222 ++++++++---------- .../zap-generated/CHIPTestClustersObjc.mm | 4 +- .../zap-generated/attributes/Accessors.cpp | 32 +-- .../zap-generated/attributes/Accessors.h | 20 +- .../zap-generated/cluster-objects.h | 40 ++-- .../cluster/CHIPTestClustersObjc.mm | 4 +- .../zap-generated/cluster/Commands.h | 4 +- .../cluster/logging/DataModelLogger.cpp | 8 +- .../chip-tool/zap-generated/test/Commands.h | 100 ++++---- 20 files changed, 264 insertions(+), 297 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 11b4eca86aa54f..852ce18e7a1646 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2700,15 +2700,15 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s minConstTemp = 11; readonly attribute nullable int16s maxConstTemp = 12; readonly attribute bitmap16 pumpStatus = 16; - readonly attribute PumpOperationMode effectiveOperationMode = 17; - readonly attribute PumpControlMode effectiveControlMode = 18; + readonly attribute enum8 effectiveOperationMode = 17; + readonly attribute enum8 effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; readonly attribute nullable int16u speed = 20; - attribute nullable int24u lifetimeRunningHours = 21; + attribute access(write: manage) nullable int24u lifetimeRunningHours = 21; readonly attribute nullable int24u power = 22; - attribute nullable int32u lifetimeEnergyConsumed = 23; - attribute PumpOperationMode operationMode = 32; - attribute PumpControlMode controlMode = 33; + attribute access(write: manage) nullable int32u lifetimeEnergyConsumed = 23; + attribute access(write: manage) enum8 operationMode = 32; + attribute access(write: manage) enum8 controlMode = 33; readonly attribute bitmap16 alarmMask = 34; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index dcfc41da8dfded..37b167746dfc24 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1902,15 +1902,15 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s minConstTemp = 11; readonly attribute nullable int16s maxConstTemp = 12; readonly attribute bitmap16 pumpStatus = 16; - readonly attribute PumpOperationMode effectiveOperationMode = 17; - readonly attribute PumpControlMode effectiveControlMode = 18; + readonly attribute enum8 effectiveOperationMode = 17; + readonly attribute enum8 effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; readonly attribute nullable int16u speed = 20; - attribute nullable int24u lifetimeRunningHours = 21; + attribute access(write: manage) nullable int24u lifetimeRunningHours = 21; readonly attribute nullable int24u power = 22; - attribute nullable int32u lifetimeEnergyConsumed = 23; - attribute PumpOperationMode operationMode = 32; - attribute PumpControlMode controlMode = 33; + attribute access(write: manage) nullable int32u lifetimeEnergyConsumed = 23; + attribute access(write: manage) enum8 operationMode = 32; + attribute access(write: manage) enum8 controlMode = 33; readonly attribute bitmap16 alarmMask = 34; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index dcfc41da8dfded..37b167746dfc24 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1902,15 +1902,15 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s minConstTemp = 11; readonly attribute nullable int16s maxConstTemp = 12; readonly attribute bitmap16 pumpStatus = 16; - readonly attribute PumpOperationMode effectiveOperationMode = 17; - readonly attribute PumpControlMode effectiveControlMode = 18; + readonly attribute enum8 effectiveOperationMode = 17; + readonly attribute enum8 effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; readonly attribute nullable int16u speed = 20; - attribute nullable int24u lifetimeRunningHours = 21; + attribute access(write: manage) nullable int24u lifetimeRunningHours = 21; readonly attribute nullable int24u power = 22; - attribute nullable int32u lifetimeEnergyConsumed = 23; - attribute PumpOperationMode operationMode = 32; - attribute PumpControlMode controlMode = 33; + attribute access(write: manage) nullable int32u lifetimeEnergyConsumed = 23; + attribute access(write: manage) enum8 operationMode = 32; + attribute access(write: manage) enum8 controlMode = 33; readonly attribute bitmap16 alarmMask = 34; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 6d204574f45679..bb0cbcab0a07cf 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -1203,15 +1203,15 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s minConstTemp = 11; readonly attribute nullable int16s maxConstTemp = 12; readonly attribute bitmap16 pumpStatus = 16; - readonly attribute PumpOperationMode effectiveOperationMode = 17; - readonly attribute PumpControlMode effectiveControlMode = 18; + readonly attribute enum8 effectiveOperationMode = 17; + readonly attribute enum8 effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; readonly attribute nullable int16u speed = 20; - attribute nullable int24u lifetimeRunningHours = 21; + attribute access(write: manage) nullable int24u lifetimeRunningHours = 21; readonly attribute nullable int24u power = 22; - attribute nullable int32u lifetimeEnergyConsumed = 23; - attribute PumpOperationMode operationMode = 32; - attribute PumpControlMode controlMode = 33; + attribute access(write: manage) nullable int32u lifetimeEnergyConsumed = 23; + attribute access(write: manage) enum8 operationMode = 32; + attribute access(write: manage) enum8 controlMode = 33; readonly attribute bitmap16 alarmMask = 34; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index 5d8261a994e454..ef3ef5a5393f62 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -1053,10 +1053,10 @@ client cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s maxPressure = 0; readonly attribute nullable int16u maxSpeed = 1; readonly attribute nullable int16u maxFlow = 2; - readonly attribute PumpOperationMode effectiveOperationMode = 17; - readonly attribute PumpControlMode effectiveControlMode = 18; + readonly attribute enum8 effectiveOperationMode = 17; + readonly attribute enum8 effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; - attribute PumpOperationMode operationMode = 32; + attribute access(write: manage) enum8 operationMode = 32; readonly attribute int16u clusterRevision = 65533; } diff --git a/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp b/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp index 3108f1fc2259a8..b05c7c4d995e2e 100644 --- a/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp +++ b/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp @@ -24,7 +24,6 @@ #include using namespace chip; -using namespace chip::app::Clusters::PumpConfigurationAndControl; using namespace chip::app::Clusters::PumpConfigurationAndControl::Attributes; void emberAfPumpConfigurationAndControlClusterServerInitCallback(EndpointId endpoint) @@ -41,13 +40,13 @@ void MatterPumpConfigurationAndControlClusterServerAttributeChangedCallback(cons switch (attributePath.mAttributeId) { case ControlMode::Id: { - PumpControlMode controlMode; + uint8_t controlMode; ControlMode::Get(attributePath.mEndpointId, &controlMode); EffectiveControlMode::Set(attributePath.mEndpointId, controlMode); } break; case OperationMode::Id: { - PumpOperationMode operationMode; + uint8_t operationMode; OperationMode::Get(attributePath.mEndpointId, &operationMode); EffectiveOperationMode::Set(attributePath.mEndpointId, operationMode); } diff --git a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml index 7074810fc6f00a..a0b703040993bd 100644 --- a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml @@ -39,8 +39,8 @@ limitations under the License. MinConstTemp MaxConstTemp PumpStatus - EffectiveOperationMode - EffectiveControlMode + EffectiveOperationMode + EffectiveControlMode Capacity Speed @@ -54,12 +54,12 @@ limitations under the License. - + OperationMode - + ControlMode diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 224c1cea72d643..d9539e1915a592 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3152,15 +3152,15 @@ client cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s minConstTemp = 11; readonly attribute nullable int16s maxConstTemp = 12; readonly attribute bitmap16 pumpStatus = 16; - readonly attribute PumpOperationMode effectiveOperationMode = 17; - readonly attribute PumpControlMode effectiveControlMode = 18; + readonly attribute enum8 effectiveOperationMode = 17; + readonly attribute enum8 effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; readonly attribute nullable int16u speed = 20; - attribute nullable int24u lifetimeRunningHours = 21; + attribute access(write: manage) nullable int24u lifetimeRunningHours = 21; readonly attribute nullable int24u power = 22; - attribute nullable int32u lifetimeEnergyConsumed = 23; - attribute PumpOperationMode operationMode = 32; - attribute PumpControlMode controlMode = 33; + attribute access(write: manage) nullable int32u lifetimeEnergyConsumed = 23; + attribute access(write: manage) enum8 operationMode = 32; + attribute access(write: manage) enum8 controlMode = 33; readonly attribute bitmap16 alarmMask = 34; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 4bded8dca49121..de763911b1e0d2 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -10626,7 +10626,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + cppValue, value); return value; } case Attributes::EffectiveControlMode::Id: { @@ -10641,7 +10641,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + cppValue, value); return value; } case Attributes::Capacity::Id: { @@ -10766,7 +10766,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + cppValue, value); return value; } case Attributes::ControlMode::Id: { @@ -10781,7 +10781,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - static_cast(cppValue), value); + cppValue, value); return value; } case Attributes::AlarmMask::Id: { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index c7de06fc590ad7..bd042ba52fc5b8 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -19265,15 +19265,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="minConstTemp", Tag=0x0000000B, Type=typing.Union[None, Nullable, int]), ClusterObjectFieldDescriptor(Label="maxConstTemp", Tag=0x0000000C, Type=typing.Union[None, Nullable, int]), ClusterObjectFieldDescriptor(Label="pumpStatus", Tag=0x00000010, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="effectiveOperationMode", Tag=0x00000011, Type=PumpConfigurationAndControl.Enums.PumpOperationMode), - ClusterObjectFieldDescriptor(Label="effectiveControlMode", Tag=0x00000012, Type=PumpConfigurationAndControl.Enums.PumpControlMode), + ClusterObjectFieldDescriptor(Label="effectiveOperationMode", Tag=0x00000011, Type=uint), + ClusterObjectFieldDescriptor(Label="effectiveControlMode", Tag=0x00000012, Type=uint), ClusterObjectFieldDescriptor(Label="capacity", Tag=0x00000013, Type=typing.Union[Nullable, int]), ClusterObjectFieldDescriptor(Label="speed", Tag=0x00000014, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="lifetimeRunningHours", Tag=0x00000015, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="power", Tag=0x00000016, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="lifetimeEnergyConsumed", Tag=0x00000017, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="operationMode", Tag=0x00000020, Type=PumpConfigurationAndControl.Enums.PumpOperationMode), - ClusterObjectFieldDescriptor(Label="controlMode", Tag=0x00000021, Type=typing.Optional[PumpConfigurationAndControl.Enums.PumpControlMode]), + ClusterObjectFieldDescriptor(Label="operationMode", Tag=0x00000020, Type=uint), + ClusterObjectFieldDescriptor(Label="controlMode", Tag=0x00000021, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="alarmMask", Tag=0x00000022, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), @@ -19296,15 +19296,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: minConstTemp: 'typing.Union[None, Nullable, int]' = None maxConstTemp: 'typing.Union[None, Nullable, int]' = None pumpStatus: 'typing.Optional[uint]' = None - effectiveOperationMode: 'PumpConfigurationAndControl.Enums.PumpOperationMode' = None - effectiveControlMode: 'PumpConfigurationAndControl.Enums.PumpControlMode' = None + effectiveOperationMode: 'uint' = None + effectiveControlMode: 'uint' = None capacity: 'typing.Union[Nullable, int]' = None speed: 'typing.Union[None, Nullable, uint]' = None lifetimeRunningHours: 'typing.Union[None, Nullable, uint]' = None power: 'typing.Union[None, Nullable, uint]' = None lifetimeEnergyConsumed: 'typing.Union[None, Nullable, uint]' = None - operationMode: 'PumpConfigurationAndControl.Enums.PumpOperationMode' = None - controlMode: 'typing.Optional[PumpConfigurationAndControl.Enums.PumpControlMode]' = None + operationMode: 'uint' = None + controlMode: 'typing.Optional[uint]' = None alarmMask: 'typing.Optional[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None @@ -19567,9 +19567,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.PumpOperationMode) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'PumpConfigurationAndControl.Enums.PumpOperationMode' = 0 + value: 'uint' = 0 @dataclass class EffectiveControlMode(ClusterAttributeDescriptor): @@ -19583,9 +19583,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.PumpControlMode) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'PumpConfigurationAndControl.Enums.PumpControlMode' = 0 + value: 'uint' = 0 @dataclass class Capacity(ClusterAttributeDescriptor): @@ -19679,9 +19679,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.PumpOperationMode) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'PumpConfigurationAndControl.Enums.PumpOperationMode' = 0 + value: 'uint' = 0 @dataclass class ControlMode(ClusterAttributeDescriptor): @@ -19695,9 +19695,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[PumpConfigurationAndControl.Enums.PumpControlMode]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[PumpConfigurationAndControl.Enums.PumpControlMode]' = None + value: 'typing.Optional[uint]' = None @dataclass class AlarmMask(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index a58498468163e5..65dee305f110a5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -8753,7 +8753,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } case Attributes::EffectiveControlMode::Id: { @@ -8764,7 +8764,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } case Attributes::Capacity::Id: { @@ -8850,7 +8850,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } case Attributes::ControlMode::Id: { @@ -8861,7 +8861,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } case Attributes::AlarmMask::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 24e832d2b0917c..8ef66740cf79ac 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -34868,14 +34868,12 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -34886,7 +34884,7 @@ - (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Non reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -34894,13 +34892,11 @@ new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubs return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34913,37 +34909,34 @@ + (void)readAttributeEffectiveOperationModeWithAttributeCache:(CHIPAttributeCach completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -34954,7 +34947,7 @@ - (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnu reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -34962,11 +34955,11 @@ new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscr return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34979,25 +34972,23 @@ + (void)readAttributeEffectiveControlModeWithAttributeCache:(CHIPAttributeCacheC completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeCapacityWithCompletionHandler:(void (^)( @@ -35360,14 +35351,12 @@ new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancel - (void)readAttributeOperationModeWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -35381,7 +35370,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -35395,7 +35384,7 @@ - (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minI reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -35403,13 +35392,11 @@ new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubs return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -35422,37 +35409,34 @@ + (void)readAttributeOperationModeWithAttributeCache:(CHIPAttributeCacheContaine completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeControlModeWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -35466,7 +35450,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -35479,7 +35463,7 @@ - (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInt subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -35487,11 +35471,11 @@ new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscr return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -35504,25 +35488,23 @@ + (void)readAttributeControlModeWithAttributeCache:(CHIPAttributeCacheContainer completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAlarmMaskWithCompletionHandler:(void (^)( diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index 59303c6da4da8a..000d50f750d99c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -12102,7 +12102,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -12120,7 +12120,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 2d2167172ad879..edc1e621f1faa2 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -17484,9 +17484,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace EffectiveOperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -17499,9 +17499,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurat *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17516,9 +17516,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurat namespace EffectiveControlMode { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -17531,9 +17531,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurat *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17828,9 +17828,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace OperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -17843,9 +17843,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurat *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17860,9 +17860,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurat namespace ControlMode { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -17875,9 +17875,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurat *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 350d7567df13d9..761be9b687d2b4 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -3064,15 +3064,13 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace PumpStatus namespace EffectiveOperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode * value); // PumpOperationMode -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value); +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace EffectiveOperationMode namespace EffectiveControlMode { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode * value); // PumpControlMode -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value); +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace EffectiveControlMode namespace Capacity { @@ -3111,15 +3109,13 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl } // namespace LifetimeEnergyConsumed namespace OperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode * value); // PumpOperationMode -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value); +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace OperationMode namespace ControlMode { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode * value); // PumpControlMode -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value); +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace ControlMode namespace AlarmMask { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index f0d81ac512a733..2d8ac2bbf0091a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -21271,9 +21271,9 @@ struct TypeInfo namespace EffectiveOperationMode { struct TypeInfo { - using Type = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; - using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; - using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::EffectiveOperationMode::Id; } @@ -21283,9 +21283,9 @@ struct TypeInfo namespace EffectiveControlMode { struct TypeInfo { - using Type = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; - using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; - using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::EffectiveControlMode::Id; } @@ -21355,9 +21355,9 @@ struct TypeInfo namespace OperationMode { struct TypeInfo { - using Type = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; - using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; - using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OperationMode::Id; } @@ -21367,9 +21367,9 @@ struct TypeInfo namespace ControlMode { struct TypeInfo { - using Type = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; - using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; - using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ControlMode::Id; } @@ -21470,21 +21470,17 @@ struct TypeInfo Attributes::MaxConstFlow::TypeInfo::DecodableType maxConstFlow; Attributes::MinConstTemp::TypeInfo::DecodableType minConstTemp; Attributes::MaxConstTemp::TypeInfo::DecodableType maxConstTemp; - Attributes::PumpStatus::TypeInfo::DecodableType pumpStatus = static_cast(0); - Attributes::EffectiveOperationMode::TypeInfo::DecodableType effectiveOperationMode = - static_cast(0); - Attributes::EffectiveControlMode::TypeInfo::DecodableType effectiveControlMode = - static_cast(0); + Attributes::PumpStatus::TypeInfo::DecodableType pumpStatus = static_cast(0); + Attributes::EffectiveOperationMode::TypeInfo::DecodableType effectiveOperationMode = static_cast(0); + Attributes::EffectiveControlMode::TypeInfo::DecodableType effectiveControlMode = static_cast(0); Attributes::Capacity::TypeInfo::DecodableType capacity; Attributes::Speed::TypeInfo::DecodableType speed; Attributes::LifetimeRunningHours::TypeInfo::DecodableType lifetimeRunningHours; Attributes::Power::TypeInfo::DecodableType power; Attributes::LifetimeEnergyConsumed::TypeInfo::DecodableType lifetimeEnergyConsumed; - Attributes::OperationMode::TypeInfo::DecodableType operationMode = - static_cast(0); - Attributes::ControlMode::TypeInfo::DecodableType controlMode = - static_cast(0); - Attributes::AlarmMask::TypeInfo::DecodableType alarmMask = static_cast(0); + Attributes::OperationMode::TypeInfo::DecodableType operationMode = static_cast(0); + Attributes::ControlMode::TypeInfo::DecodableType controlMode = static_cast(0); + Attributes::AlarmMask::TypeInfo::DecodableType alarmMask = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm index 59303c6da4da8a..000d50f750d99c 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm @@ -12102,7 +12102,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -12120,7 +12120,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 2234c68a3fa503..df540ac64a693d 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -9818,7 +9818,7 @@ class WritePumpConfigurationAndControlOperationMode : public WriteAttribute } private: - chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode mValue; + uint8_t mValue; }; class WritePumpConfigurationAndControlControlMode : public WriteAttribute @@ -9845,7 +9845,7 @@ class WritePumpConfigurationAndControlControlMode : public WriteAttribute } private: - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode mValue; + uint8_t mValue; }; /*----------------------------------------------------------------------------*\ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 3c497628a117f7..db94f82b10826b 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -8176,12 +8176,12 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("PumpStatus", 1, value); } case PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id: { - chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EffectiveOperationMode", 1, value); } case PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id: { - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value; + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EffectiveControlMode", 1, value); } @@ -8211,12 +8211,12 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("LifetimeEnergyConsumed", 1, value); } case PumpConfigurationAndControl::Attributes::OperationMode::Id: { - chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("OperationMode", 1, value); } case PumpConfigurationAndControl::Attributes::ControlMode::Id: { - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value; + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ControlMode", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index d91a8a6c1aa080..83c0908a2213ad 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -42599,8 +42599,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_4(error); } - static void OnSuccessCallback_4(void * context, - chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) + static void OnSuccessCallback_4(void * context, uint8_t effectiveOperationMode) { (static_cast(context))->OnSuccessResponse_4(effectiveOperationMode); } @@ -42610,8 +42609,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_5(error); } - static void OnSuccessCallback_5(void * context, - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) + static void OnSuccessCallback_5(void * context, uint8_t effectiveControlMode) { (static_cast(context))->OnSuccessResponse_5(effectiveControlMode); } @@ -42661,8 +42659,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_10(error); } - static void OnSuccessCallback_10(void * context, - chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) + static void OnSuccessCallback_10(void * context, uint8_t effectiveOperationMode) { (static_cast(context))->OnSuccessResponse_10(effectiveOperationMode); } @@ -42672,8 +42669,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_11(error); } - static void OnSuccessCallback_11(void * context, - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) + static void OnSuccessCallback_11(void * context, uint8_t effectiveControlMode) { (static_cast(context))->OnSuccessResponse_11(effectiveControlMode); } @@ -43154,7 +43150,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_4(chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) + void OnSuccessResponse_4(uint8_t effectiveOperationMode) { VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "", "enum8")); NextTest(); @@ -43178,7 +43174,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_5(chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) + void OnSuccessResponse_5(uint8_t effectiveControlMode) { VerifyOrReturn(CheckConstraintType("effectiveControlMode", "", "enum8")); NextTest(); @@ -43297,7 +43293,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_10(chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) + void OnSuccessResponse_10(uint8_t effectiveOperationMode) { VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "", "enum8")); NextTest(); @@ -43321,7 +43317,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_11(chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) + void OnSuccessResponse_11(uint8_t effectiveControlMode) { VerifyOrReturn(CheckConstraintType("effectiveControlMode", "", "enum8")); NextTest(); @@ -44495,8 +44491,8 @@ class Test_TC_PCC_2_2Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode operationModeArgument; - operationModeArgument = static_cast(1); + uint8_t operationModeArgument; + operationModeArgument = 1; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44543,8 +44539,8 @@ class Test_TC_PCC_2_2Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode operationModeArgument; - operationModeArgument = static_cast(2); + uint8_t operationModeArgument; + operationModeArgument = 2; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44591,8 +44587,8 @@ class Test_TC_PCC_2_2Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode operationModeArgument; - operationModeArgument = static_cast(3); + uint8_t operationModeArgument; + operationModeArgument = 3; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44858,8 +44854,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context, - chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) + static void OnSuccessCallback_2(void * context, uint8_t effectiveOperationMode) { (static_cast(context))->OnSuccessResponse_2(effectiveOperationMode); } @@ -44876,8 +44871,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand (static_cast(context))->OnFailureResponse_4(error); } - static void OnSuccessCallback_4(void * context, - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) + static void OnSuccessCallback_4(void * context, uint8_t effectiveControlMode) { (static_cast(context))->OnSuccessResponse_4(effectiveControlMode); } @@ -44983,8 +44977,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode operationModeArgument; - operationModeArgument = static_cast(0); + uint8_t operationModeArgument; + operationModeArgument = 0; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -45018,7 +45012,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_2(chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) + void OnSuccessResponse_2(uint8_t effectiveOperationMode) { VerifyOrReturn(CheckValue("effectiveOperationMode", effectiveOperationMode, 0)); @@ -45031,8 +45025,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; - controlModeArgument = static_cast(0); + uint8_t controlModeArgument; + controlModeArgument = 0; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -45066,7 +45060,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_4(chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) + void OnSuccessResponse_4(uint8_t effectiveControlMode) { VerifyOrReturn(CheckValue("effectiveControlMode", effectiveControlMode, 0)); @@ -45079,8 +45073,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; - controlModeArgument = static_cast(1); + uint8_t controlModeArgument; + controlModeArgument = 1; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -45127,8 +45121,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; - controlModeArgument = static_cast(2); + uint8_t controlModeArgument; + controlModeArgument = 2; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -45175,8 +45169,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; - controlModeArgument = static_cast(3); + uint8_t controlModeArgument; + controlModeArgument = 3; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -45223,8 +45217,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; - controlModeArgument = static_cast(5); + uint8_t controlModeArgument; + controlModeArgument = 5; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -45271,8 +45265,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; - controlModeArgument = static_cast(7); + uint8_t controlModeArgument; + controlModeArgument = 7; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -120685,11 +120679,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 120U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -120724,11 +120718,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 1000U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -120763,11 +120757,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 180U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); From af20719290877c6219ddc1ec37a7d47f5709586c Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 19 Apr 2022 07:07:44 +0000 Subject: [PATCH 14/16] Restyled by clang-format --- .../chip-tool/zap-generated/test/Commands.h | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 83c0908a2213ad..1419eee8c0b5de 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -120679,11 +120679,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 120U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -120718,11 +120718,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 1000U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -120757,11 +120757,11 @@ class Test_TC_MF_1_3Suite : public TestCommand RequestType request; request.commissioningTimeout = 180U; request.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); request.discriminator = 3840U; request.iterations = 1000UL; request.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); From fe3568dd3a8592b7e0bd5d33f977d9482ba421d5 Mon Sep 17 00:00:00 2001 From: Thomas Lykkeberg Date: Tue, 19 Apr 2022 18:50:42 +0200 Subject: [PATCH 15/16] * Re-inserted the PumpOperationMode and PumpControlMode as valid types in the PCC XML * Re-generate zap with zap_regen_all.py --- .../all-clusters-app.matter | 8 +- .../placeholder/linux/apps/app1/config.matter | 8 +- .../placeholder/linux/apps/app2/config.matter | 8 +- examples/pump-app/pump-common/pump-app.matter | 8 +- .../pump-controller-app.matter | 6 +- ...pump-configuration-and-control-cluster.xml | 8 +- .../data_model/controller-clusters.matter | 8 +- .../CHIPAttributeTLVValueDecoder.cpp | 8 +- .../python/chip/clusters/Objects.py | 32 +-- .../CHIPAttributeTLVValueDecoder.mm | 8 +- .../CHIP/zap-generated/CHIPClustersObjc.mm | 222 ++++++++++-------- .../zap-generated/CHIPTestClustersObjc.mm | 4 +- .../zap-generated/attributes/Accessors.cpp | 32 +-- .../zap-generated/attributes/Accessors.h | 20 +- .../zap-generated/cluster-objects.h | 40 ++-- .../cluster/CHIPTestClustersObjc.mm | 4 +- .../zap-generated/cluster/Commands.h | 4 +- .../cluster/logging/DataModelLogger.cpp | 8 +- .../chip-tool/zap-generated/test/Commands.h | 110 +++++---- 19 files changed, 293 insertions(+), 253 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 852ce18e7a1646..dd9006676f20d9 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2700,15 +2700,15 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s minConstTemp = 11; readonly attribute nullable int16s maxConstTemp = 12; readonly attribute bitmap16 pumpStatus = 16; - readonly attribute enum8 effectiveOperationMode = 17; - readonly attribute enum8 effectiveControlMode = 18; + readonly attribute PumpOperationMode effectiveOperationMode = 17; + readonly attribute PumpControlMode effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; readonly attribute nullable int16u speed = 20; attribute access(write: manage) nullable int24u lifetimeRunningHours = 21; readonly attribute nullable int24u power = 22; attribute access(write: manage) nullable int32u lifetimeEnergyConsumed = 23; - attribute access(write: manage) enum8 operationMode = 32; - attribute access(write: manage) enum8 controlMode = 33; + attribute access(write: manage) PumpOperationMode operationMode = 32; + attribute access(write: manage) PumpControlMode controlMode = 33; readonly attribute bitmap16 alarmMask = 34; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 37b167746dfc24..e5875fead42b6a 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1902,15 +1902,15 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s minConstTemp = 11; readonly attribute nullable int16s maxConstTemp = 12; readonly attribute bitmap16 pumpStatus = 16; - readonly attribute enum8 effectiveOperationMode = 17; - readonly attribute enum8 effectiveControlMode = 18; + readonly attribute PumpOperationMode effectiveOperationMode = 17; + readonly attribute PumpControlMode effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; readonly attribute nullable int16u speed = 20; attribute access(write: manage) nullable int24u lifetimeRunningHours = 21; readonly attribute nullable int24u power = 22; attribute access(write: manage) nullable int32u lifetimeEnergyConsumed = 23; - attribute access(write: manage) enum8 operationMode = 32; - attribute access(write: manage) enum8 controlMode = 33; + attribute access(write: manage) PumpOperationMode operationMode = 32; + attribute access(write: manage) PumpControlMode controlMode = 33; readonly attribute bitmap16 alarmMask = 34; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 37b167746dfc24..e5875fead42b6a 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1902,15 +1902,15 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s minConstTemp = 11; readonly attribute nullable int16s maxConstTemp = 12; readonly attribute bitmap16 pumpStatus = 16; - readonly attribute enum8 effectiveOperationMode = 17; - readonly attribute enum8 effectiveControlMode = 18; + readonly attribute PumpOperationMode effectiveOperationMode = 17; + readonly attribute PumpControlMode effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; readonly attribute nullable int16u speed = 20; attribute access(write: manage) nullable int24u lifetimeRunningHours = 21; readonly attribute nullable int24u power = 22; attribute access(write: manage) nullable int32u lifetimeEnergyConsumed = 23; - attribute access(write: manage) enum8 operationMode = 32; - attribute access(write: manage) enum8 controlMode = 33; + attribute access(write: manage) PumpOperationMode operationMode = 32; + attribute access(write: manage) PumpControlMode controlMode = 33; readonly attribute bitmap16 alarmMask = 34; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index bb0cbcab0a07cf..914510c6fd4973 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -1203,15 +1203,15 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s minConstTemp = 11; readonly attribute nullable int16s maxConstTemp = 12; readonly attribute bitmap16 pumpStatus = 16; - readonly attribute enum8 effectiveOperationMode = 17; - readonly attribute enum8 effectiveControlMode = 18; + readonly attribute PumpOperationMode effectiveOperationMode = 17; + readonly attribute PumpControlMode effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; readonly attribute nullable int16u speed = 20; attribute access(write: manage) nullable int24u lifetimeRunningHours = 21; readonly attribute nullable int24u power = 22; attribute access(write: manage) nullable int32u lifetimeEnergyConsumed = 23; - attribute access(write: manage) enum8 operationMode = 32; - attribute access(write: manage) enum8 controlMode = 33; + attribute access(write: manage) PumpOperationMode operationMode = 32; + attribute access(write: manage) PumpControlMode controlMode = 33; readonly attribute bitmap16 alarmMask = 34; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index ef3ef5a5393f62..35d673a6f45a97 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -1053,10 +1053,10 @@ client cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s maxPressure = 0; readonly attribute nullable int16u maxSpeed = 1; readonly attribute nullable int16u maxFlow = 2; - readonly attribute enum8 effectiveOperationMode = 17; - readonly attribute enum8 effectiveControlMode = 18; + readonly attribute PumpOperationMode effectiveOperationMode = 17; + readonly attribute PumpControlMode effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; - attribute access(write: manage) enum8 operationMode = 32; + attribute access(write: manage) PumpOperationMode operationMode = 32; readonly attribute int16u clusterRevision = 65533; } diff --git a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml index a0b703040993bd..7074810fc6f00a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml @@ -39,8 +39,8 @@ limitations under the License. MinConstTemp MaxConstTemp PumpStatus - EffectiveOperationMode - EffectiveControlMode + EffectiveOperationMode + EffectiveControlMode Capacity Speed @@ -54,12 +54,12 @@ limitations under the License. - + OperationMode - + ControlMode diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index d9539e1915a592..fb045d327dc400 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3152,15 +3152,15 @@ client cluster PumpConfigurationAndControl = 512 { readonly attribute nullable int16s minConstTemp = 11; readonly attribute nullable int16s maxConstTemp = 12; readonly attribute bitmap16 pumpStatus = 16; - readonly attribute enum8 effectiveOperationMode = 17; - readonly attribute enum8 effectiveControlMode = 18; + readonly attribute PumpOperationMode effectiveOperationMode = 17; + readonly attribute PumpControlMode effectiveControlMode = 18; readonly attribute nullable int16s capacity = 19; readonly attribute nullable int16u speed = 20; attribute access(write: manage) nullable int24u lifetimeRunningHours = 21; readonly attribute nullable int24u power = 22; attribute access(write: manage) nullable int32u lifetimeEnergyConsumed = 23; - attribute access(write: manage) enum8 operationMode = 32; - attribute access(write: manage) enum8 controlMode = 33; + attribute access(write: manage) PumpOperationMode operationMode = 32; + attribute access(write: manage) PumpControlMode controlMode = 33; readonly attribute bitmap16 alarmMask = 34; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index de763911b1e0d2..4bded8dca49121 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -10626,7 +10626,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + static_cast(cppValue), value); return value; } case Attributes::EffectiveControlMode::Id: { @@ -10641,7 +10641,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + static_cast(cppValue), value); return value; } case Attributes::Capacity::Id: { @@ -10766,7 +10766,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + static_cast(cppValue), value); return value; } case Attributes::ControlMode::Id: { @@ -10781,7 +10781,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + static_cast(cppValue), value); return value; } case Attributes::AlarmMask::Id: { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index bd042ba52fc5b8..c7de06fc590ad7 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -19265,15 +19265,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="minConstTemp", Tag=0x0000000B, Type=typing.Union[None, Nullable, int]), ClusterObjectFieldDescriptor(Label="maxConstTemp", Tag=0x0000000C, Type=typing.Union[None, Nullable, int]), ClusterObjectFieldDescriptor(Label="pumpStatus", Tag=0x00000010, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="effectiveOperationMode", Tag=0x00000011, Type=uint), - ClusterObjectFieldDescriptor(Label="effectiveControlMode", Tag=0x00000012, Type=uint), + ClusterObjectFieldDescriptor(Label="effectiveOperationMode", Tag=0x00000011, Type=PumpConfigurationAndControl.Enums.PumpOperationMode), + ClusterObjectFieldDescriptor(Label="effectiveControlMode", Tag=0x00000012, Type=PumpConfigurationAndControl.Enums.PumpControlMode), ClusterObjectFieldDescriptor(Label="capacity", Tag=0x00000013, Type=typing.Union[Nullable, int]), ClusterObjectFieldDescriptor(Label="speed", Tag=0x00000014, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="lifetimeRunningHours", Tag=0x00000015, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="power", Tag=0x00000016, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="lifetimeEnergyConsumed", Tag=0x00000017, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="operationMode", Tag=0x00000020, Type=uint), - ClusterObjectFieldDescriptor(Label="controlMode", Tag=0x00000021, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="operationMode", Tag=0x00000020, Type=PumpConfigurationAndControl.Enums.PumpOperationMode), + ClusterObjectFieldDescriptor(Label="controlMode", Tag=0x00000021, Type=typing.Optional[PumpConfigurationAndControl.Enums.PumpControlMode]), ClusterObjectFieldDescriptor(Label="alarmMask", Tag=0x00000022, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), @@ -19296,15 +19296,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: minConstTemp: 'typing.Union[None, Nullable, int]' = None maxConstTemp: 'typing.Union[None, Nullable, int]' = None pumpStatus: 'typing.Optional[uint]' = None - effectiveOperationMode: 'uint' = None - effectiveControlMode: 'uint' = None + effectiveOperationMode: 'PumpConfigurationAndControl.Enums.PumpOperationMode' = None + effectiveControlMode: 'PumpConfigurationAndControl.Enums.PumpControlMode' = None capacity: 'typing.Union[Nullable, int]' = None speed: 'typing.Union[None, Nullable, uint]' = None lifetimeRunningHours: 'typing.Union[None, Nullable, uint]' = None power: 'typing.Union[None, Nullable, uint]' = None lifetimeEnergyConsumed: 'typing.Union[None, Nullable, uint]' = None - operationMode: 'uint' = None - controlMode: 'typing.Optional[uint]' = None + operationMode: 'PumpConfigurationAndControl.Enums.PumpOperationMode' = None + controlMode: 'typing.Optional[PumpConfigurationAndControl.Enums.PumpControlMode]' = None alarmMask: 'typing.Optional[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None @@ -19567,9 +19567,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.PumpOperationMode) - value: 'uint' = 0 + value: 'PumpConfigurationAndControl.Enums.PumpOperationMode' = 0 @dataclass class EffectiveControlMode(ClusterAttributeDescriptor): @@ -19583,9 +19583,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.PumpControlMode) - value: 'uint' = 0 + value: 'PumpConfigurationAndControl.Enums.PumpControlMode' = 0 @dataclass class Capacity(ClusterAttributeDescriptor): @@ -19679,9 +19679,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.PumpOperationMode) - value: 'uint' = 0 + value: 'PumpConfigurationAndControl.Enums.PumpOperationMode' = 0 @dataclass class ControlMode(ClusterAttributeDescriptor): @@ -19695,9 +19695,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[PumpConfigurationAndControl.Enums.PumpControlMode]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[PumpConfigurationAndControl.Enums.PumpControlMode]' = None @dataclass class AlarmMask(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 65dee305f110a5..a58498468163e5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -8753,7 +8753,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::EffectiveControlMode::Id: { @@ -8764,7 +8764,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::Capacity::Id: { @@ -8850,7 +8850,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ControlMode::Id: { @@ -8861,7 +8861,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::AlarmMask::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 8ef66740cf79ac..24e832d2b0917c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -34868,12 +34868,14 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -34884,7 +34886,7 @@ - (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Non reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -34892,11 +34894,13 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34909,34 +34913,37 @@ + (void)readAttributeEffectiveOperationModeWithAttributeCache:(CHIPAttributeCach completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval @@ -34947,7 +34954,7 @@ - (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnu reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -34955,11 +34962,11 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34972,23 +34979,25 @@ + (void)readAttributeEffectiveControlModeWithAttributeCache:(CHIPAttributeCacheC completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeCapacityWithCompletionHandler:(void (^)( @@ -35351,12 +35360,14 @@ new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancel - (void)readAttributeOperationModeWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -35370,7 +35381,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -35384,7 +35395,7 @@ - (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minI reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -35392,11 +35403,13 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -35409,34 +35422,37 @@ + (void)readAttributeOperationModeWithAttributeCache:(CHIPAttributeCacheContaine completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeControlModeWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -35450,7 +35466,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -35463,7 +35479,7 @@ - (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInt subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { @@ -35471,11 +35487,11 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( return CHIP_ERROR_INVALID_ARGUMENT; } using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -35488,23 +35504,25 @@ + (void)readAttributeControlModeWithAttributeCache:(CHIPAttributeCacheContainer completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAlarmMaskWithCompletionHandler:(void (^)( diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index 000d50f750d99c..59303c6da4da8a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -12102,7 +12102,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -12120,7 +12120,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index edc1e621f1faa2..2d2167172ad879 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -17484,9 +17484,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace EffectiveOperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -17499,9 +17499,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17516,9 +17516,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace EffectiveControlMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -17531,9 +17531,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17828,9 +17828,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace OperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -17843,9 +17843,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17860,9 +17860,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ControlMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -17875,9 +17875,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 761be9b687d2b4..350d7567df13d9 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -3064,13 +3064,15 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace PumpStatus namespace EffectiveOperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode * value); // PumpOperationMode +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value); } // namespace EffectiveOperationMode namespace EffectiveControlMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode * value); // PumpControlMode +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value); } // namespace EffectiveControlMode namespace Capacity { @@ -3109,13 +3111,15 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl } // namespace LifetimeEnergyConsumed namespace OperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode * value); // PumpOperationMode +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value); } // namespace OperationMode namespace ControlMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode * value); // PumpControlMode +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value); } // namespace ControlMode namespace AlarmMask { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 2d8ac2bbf0091a..f0d81ac512a733 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -21271,9 +21271,9 @@ struct TypeInfo namespace EffectiveOperationMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; + using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; + using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::EffectiveOperationMode::Id; } @@ -21283,9 +21283,9 @@ struct TypeInfo namespace EffectiveControlMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; + using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; + using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::EffectiveControlMode::Id; } @@ -21355,9 +21355,9 @@ struct TypeInfo namespace OperationMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; + using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; + using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OperationMode::Id; } @@ -21367,9 +21367,9 @@ struct TypeInfo namespace ControlMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; + using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; + using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ControlMode::Id; } @@ -21470,17 +21470,21 @@ struct TypeInfo Attributes::MaxConstFlow::TypeInfo::DecodableType maxConstFlow; Attributes::MinConstTemp::TypeInfo::DecodableType minConstTemp; Attributes::MaxConstTemp::TypeInfo::DecodableType maxConstTemp; - Attributes::PumpStatus::TypeInfo::DecodableType pumpStatus = static_cast(0); - Attributes::EffectiveOperationMode::TypeInfo::DecodableType effectiveOperationMode = static_cast(0); - Attributes::EffectiveControlMode::TypeInfo::DecodableType effectiveControlMode = static_cast(0); + Attributes::PumpStatus::TypeInfo::DecodableType pumpStatus = static_cast(0); + Attributes::EffectiveOperationMode::TypeInfo::DecodableType effectiveOperationMode = + static_cast(0); + Attributes::EffectiveControlMode::TypeInfo::DecodableType effectiveControlMode = + static_cast(0); Attributes::Capacity::TypeInfo::DecodableType capacity; Attributes::Speed::TypeInfo::DecodableType speed; Attributes::LifetimeRunningHours::TypeInfo::DecodableType lifetimeRunningHours; Attributes::Power::TypeInfo::DecodableType power; Attributes::LifetimeEnergyConsumed::TypeInfo::DecodableType lifetimeEnergyConsumed; - Attributes::OperationMode::TypeInfo::DecodableType operationMode = static_cast(0); - Attributes::ControlMode::TypeInfo::DecodableType controlMode = static_cast(0); - Attributes::AlarmMask::TypeInfo::DecodableType alarmMask = static_cast(0); + Attributes::OperationMode::TypeInfo::DecodableType operationMode = + static_cast(0); + Attributes::ControlMode::TypeInfo::DecodableType controlMode = + static_cast(0); + Attributes::AlarmMask::TypeInfo::DecodableType alarmMask = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm index 000d50f750d99c..59303c6da4da8a 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm @@ -12102,7 +12102,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -12120,7 +12120,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index df540ac64a693d..2234c68a3fa503 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -9818,7 +9818,7 @@ class WritePumpConfigurationAndControlOperationMode : public WriteAttribute } private: - uint8_t mValue; + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode mValue; }; class WritePumpConfigurationAndControlControlMode : public WriteAttribute @@ -9845,7 +9845,7 @@ class WritePumpConfigurationAndControlControlMode : public WriteAttribute } private: - uint8_t mValue; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode mValue; }; /*----------------------------------------------------------------------------*\ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index db94f82b10826b..3c497628a117f7 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -8176,12 +8176,12 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("PumpStatus", 1, value); } case PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id: { - uint8_t value; + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EffectiveOperationMode", 1, value); } case PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id: { - uint8_t value; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EffectiveControlMode", 1, value); } @@ -8211,12 +8211,12 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("LifetimeEnergyConsumed", 1, value); } case PumpConfigurationAndControl::Attributes::OperationMode::Id: { - uint8_t value; + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("OperationMode", 1, value); } case PumpConfigurationAndControl::Attributes::ControlMode::Id: { - uint8_t value; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ControlMode", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 1419eee8c0b5de..5cbdc4fab89c08 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -42599,7 +42599,8 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_4(error); } - static void OnSuccessCallback_4(void * context, uint8_t effectiveOperationMode) + static void OnSuccessCallback_4(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { (static_cast(context))->OnSuccessResponse_4(effectiveOperationMode); } @@ -42609,7 +42610,8 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_5(error); } - static void OnSuccessCallback_5(void * context, uint8_t effectiveControlMode) + static void OnSuccessCallback_5(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { (static_cast(context))->OnSuccessResponse_5(effectiveControlMode); } @@ -42659,7 +42661,8 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_10(error); } - static void OnSuccessCallback_10(void * context, uint8_t effectiveOperationMode) + static void OnSuccessCallback_10(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { (static_cast(context))->OnSuccessResponse_10(effectiveOperationMode); } @@ -42669,7 +42672,8 @@ class Test_TC_PCC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_11(error); } - static void OnSuccessCallback_11(void * context, uint8_t effectiveControlMode) + static void OnSuccessCallback_11(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { (static_cast(context))->OnSuccessResponse_11(effectiveControlMode); } @@ -43150,7 +43154,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_4(uint8_t effectiveOperationMode) + void OnSuccessResponse_4(chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "", "enum8")); NextTest(); @@ -43174,7 +43178,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_5(uint8_t effectiveControlMode) + void OnSuccessResponse_5(chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { VerifyOrReturn(CheckConstraintType("effectiveControlMode", "", "enum8")); NextTest(); @@ -43293,7 +43297,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_10(uint8_t effectiveOperationMode) + void OnSuccessResponse_10(chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "", "enum8")); NextTest(); @@ -43317,7 +43321,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_11(uint8_t effectiveControlMode) + void OnSuccessResponse_11(chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { VerifyOrReturn(CheckConstraintType("effectiveControlMode", "", "enum8")); NextTest(); @@ -44436,7 +44440,8 @@ class Test_TC_PCC_2_2Suite : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context, uint8_t effectiveOperationMode) + static void OnSuccessCallback_2(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { (static_cast(context))->OnSuccessResponse_2(effectiveOperationMode); } @@ -44453,7 +44458,8 @@ class Test_TC_PCC_2_2Suite : public TestCommand (static_cast(context))->OnFailureResponse_4(error); } - static void OnSuccessCallback_4(void * context, uint8_t effectiveOperationMode) + static void OnSuccessCallback_4(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { (static_cast(context))->OnSuccessResponse_4(effectiveOperationMode); } @@ -44470,7 +44476,8 @@ class Test_TC_PCC_2_2Suite : public TestCommand (static_cast(context))->OnFailureResponse_6(error); } - static void OnSuccessCallback_6(void * context, uint8_t effectiveOperationMode) + static void OnSuccessCallback_6(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { (static_cast(context))->OnSuccessResponse_6(effectiveOperationMode); } @@ -44491,8 +44498,8 @@ class Test_TC_PCC_2_2Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t operationModeArgument; - operationModeArgument = 1; + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode operationModeArgument; + operationModeArgument = static_cast(1); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44526,7 +44533,7 @@ class Test_TC_PCC_2_2Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_2(uint8_t effectiveOperationMode) + void OnSuccessResponse_2(chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { VerifyOrReturn(CheckValue("effectiveOperationMode", effectiveOperationMode, 1)); @@ -44539,8 +44546,8 @@ class Test_TC_PCC_2_2Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t operationModeArgument; - operationModeArgument = 2; + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode operationModeArgument; + operationModeArgument = static_cast(2); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44574,7 +44581,7 @@ class Test_TC_PCC_2_2Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_4(uint8_t effectiveOperationMode) + void OnSuccessResponse_4(chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { VerifyOrReturn(CheckValue("effectiveOperationMode", effectiveOperationMode, 2)); @@ -44587,8 +44594,8 @@ class Test_TC_PCC_2_2Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t operationModeArgument; - operationModeArgument = 3; + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode operationModeArgument; + operationModeArgument = static_cast(3); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -44622,7 +44629,7 @@ class Test_TC_PCC_2_2Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_6(uint8_t effectiveOperationMode) + void OnSuccessResponse_6(chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { VerifyOrReturn(CheckValue("effectiveOperationMode", effectiveOperationMode, 3)); @@ -44854,7 +44861,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context, uint8_t effectiveOperationMode) + static void OnSuccessCallback_2(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { (static_cast(context))->OnSuccessResponse_2(effectiveOperationMode); } @@ -44871,7 +44879,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand (static_cast(context))->OnFailureResponse_4(error); } - static void OnSuccessCallback_4(void * context, uint8_t effectiveControlMode) + static void OnSuccessCallback_4(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { (static_cast(context))->OnSuccessResponse_4(effectiveControlMode); } @@ -44888,7 +44897,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand (static_cast(context))->OnFailureResponse_6(error); } - static void OnSuccessCallback_6(void * context, uint8_t effectiveControlMode) + static void OnSuccessCallback_6(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { (static_cast(context))->OnSuccessResponse_6(effectiveControlMode); } @@ -44905,7 +44915,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand (static_cast(context))->OnFailureResponse_8(error); } - static void OnSuccessCallback_8(void * context, uint8_t effectiveControlMode) + static void OnSuccessCallback_8(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { (static_cast(context))->OnSuccessResponse_8(effectiveControlMode); } @@ -44922,7 +44933,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand (static_cast(context))->OnFailureResponse_10(error); } - static void OnSuccessCallback_10(void * context, uint8_t effectiveControlMode) + static void OnSuccessCallback_10(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { (static_cast(context))->OnSuccessResponse_10(effectiveControlMode); } @@ -44939,7 +44951,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand (static_cast(context))->OnFailureResponse_12(error); } - static void OnSuccessCallback_12(void * context, uint8_t effectiveControlMode) + static void OnSuccessCallback_12(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { (static_cast(context))->OnSuccessResponse_12(effectiveControlMode); } @@ -44956,7 +44969,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand (static_cast(context))->OnFailureResponse_14(error); } - static void OnSuccessCallback_14(void * context, uint8_t effectiveControlMode) + static void OnSuccessCallback_14(void * context, + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { (static_cast(context))->OnSuccessResponse_14(effectiveControlMode); } @@ -44977,8 +44991,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t operationModeArgument; - operationModeArgument = 0; + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode operationModeArgument; + operationModeArgument = static_cast(0); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -45012,7 +45026,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_2(uint8_t effectiveOperationMode) + void OnSuccessResponse_2(chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode effectiveOperationMode) { VerifyOrReturn(CheckValue("effectiveOperationMode", effectiveOperationMode, 0)); @@ -45025,8 +45039,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t controlModeArgument; - controlModeArgument = 0; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; + controlModeArgument = static_cast(0); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -45060,7 +45074,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_4(uint8_t effectiveControlMode) + void OnSuccessResponse_4(chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { VerifyOrReturn(CheckValue("effectiveControlMode", effectiveControlMode, 0)); @@ -45073,8 +45087,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t controlModeArgument; - controlModeArgument = 1; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; + controlModeArgument = static_cast(1); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -45108,7 +45122,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_6(uint8_t effectiveControlMode) + void OnSuccessResponse_6(chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { VerifyOrReturn(CheckValue("effectiveControlMode", effectiveControlMode, 1)); @@ -45121,8 +45135,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t controlModeArgument; - controlModeArgument = 2; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; + controlModeArgument = static_cast(2); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -45156,7 +45170,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_8(uint8_t effectiveControlMode) + void OnSuccessResponse_8(chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { VerifyOrReturn(CheckValue("effectiveControlMode", effectiveControlMode, 2)); @@ -45169,8 +45183,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t controlModeArgument; - controlModeArgument = 3; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; + controlModeArgument = static_cast(3); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -45204,7 +45218,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_10(uint8_t effectiveControlMode) + void OnSuccessResponse_10(chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { VerifyOrReturn(CheckValue("effectiveControlMode", effectiveControlMode, 3)); @@ -45217,8 +45231,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t controlModeArgument; - controlModeArgument = 5; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; + controlModeArgument = static_cast(5); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -45252,7 +45266,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_12(uint8_t effectiveControlMode) + void OnSuccessResponse_12(chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { VerifyOrReturn(CheckValue("effectiveControlMode", effectiveControlMode, 5)); @@ -45265,8 +45279,8 @@ class Test_TC_PCC_2_3Suite : public TestCommand chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t controlModeArgument; - controlModeArgument = 7; + chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode controlModeArgument; + controlModeArgument = static_cast(7); ReturnErrorOnFailure( cluster.WriteAttribute( @@ -45300,7 +45314,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand ThrowFailureResponse(error); } - void OnSuccessResponse_14(uint8_t effectiveControlMode) + void OnSuccessResponse_14(chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode effectiveControlMode) { VerifyOrReturn(CheckValue("effectiveControlMode", effectiveControlMode, 7)); From d51eee97798b8d794d0505594ad8a47802227b47 Mon Sep 17 00:00:00 2001 From: Thomas Lykkeberg Date: Tue, 19 Apr 2022 18:56:24 +0200 Subject: [PATCH 16/16] * Corrected missing use of PumpOperationMode and PumpControlMonde i PCC cluster server --- .../pump-configuration-and-control-server.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp b/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp index b05c7c4d995e2e..3108f1fc2259a8 100644 --- a/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp +++ b/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp @@ -24,6 +24,7 @@ #include using namespace chip; +using namespace chip::app::Clusters::PumpConfigurationAndControl; using namespace chip::app::Clusters::PumpConfigurationAndControl::Attributes; void emberAfPumpConfigurationAndControlClusterServerInitCallback(EndpointId endpoint) @@ -40,13 +41,13 @@ void MatterPumpConfigurationAndControlClusterServerAttributeChangedCallback(cons switch (attributePath.mAttributeId) { case ControlMode::Id: { - uint8_t controlMode; + PumpControlMode controlMode; ControlMode::Get(attributePath.mEndpointId, &controlMode); EffectiveControlMode::Set(attributePath.mEndpointId, controlMode); } break; case OperationMode::Id: { - uint8_t operationMode; + PumpOperationMode operationMode; OperationMode::Get(attributePath.mEndpointId, &operationMode); EffectiveOperationMode::Set(attributePath.mEndpointId, operationMode); }