From 244035260a5d5694387ce88a262f90ef3bd6ea42 Mon Sep 17 00:00:00 2001 From: abeck-whirlpool <129295708+abeck-whirlpool@users.noreply.github.com> Date: Mon, 26 Jun 2023 12:31:11 -0500 Subject: [PATCH] Number of rinses change washer controls xml (#27436) * Fixes for Number Of Rinses Enum to add to XMl and align with spec * Spacing * Fixing code gen for XML * Updating build.gn for failing test * Update src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml Co-authored-by: Boris Zbarsky * Update src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml Co-authored-by: Boris Zbarsky * Regen again with changes --------- Co-authored-by: abeck-riis <98488327+abeck-riis@users.noreply.github.com> Co-authored-by: Boris Zbarsky --- .../chip/washer-controls-cluster.xml | 17 +- src/app/zap_cluster_list.json | 2 +- src/controller/data_model/BUILD.gn | 4 +- .../data_model/controller-clusters.matter | 13 +- .../data_model/controller-clusters.zap | 8 +- .../devicecontroller/ClusterIDMapping.java | 8 +- .../devicecontroller/ClusterReadMapping.java | 136 +-- .../devicecontroller/ClusterWriteMapping.java | 36 +- .../CHIPAttributeTLVValueDecoder.cpp | 40 +- .../java/zap-generated/CHIPClientCallbacks.h | 17 +- .../zap-generated/CHIPClustersWrite-JNI.cpp | 28 +- .../CHIPEventTLVValueDecoder.cpp | 4 +- .../java/zap-generated/CHIPReadCallbacks.cpp | 133 +-- .../chip/devicecontroller/ChipClusters.java | 44 +- .../chip/devicecontroller/ChipIdLookup.java | 4 +- .../devicecontroller/ClusterInfoMapping.java | 32 +- .../python/chip/clusters/CHIPClusters.py | 10 +- .../python/chip/clusters/Objects.py | 32 +- .../MTRAttributeSpecifiedCheck.mm | 42 + .../MTRAttributeTLVValueDecoder.mm | 225 +++++ .../CHIP/zap-generated/MTRBaseClusters.h | 160 ++++ .../CHIP/zap-generated/MTRBaseClusters.mm | 535 +++++++++++ .../zap-generated/MTRBaseClusters_Internal.h | 5 + .../CHIP/zap-generated/MTRCallbackBridge.h | 288 ++++++ .../CHIP/zap-generated/MTRCallbackBridge.mm | 283 ++++++ .../CHIP/zap-generated/MTRClusterConstants.h | 19 + .../CHIP/zap-generated/MTRClusters.h | 47 + .../CHIP/zap-generated/MTRClusters.mm | 135 +++ .../CHIP/zap-generated/MTRClusters_Internal.h | 5 + .../zap-generated/MTREventTLVValueDecoder.mm | 16 + .../zap-generated/attributes/Accessors.cpp | 85 +- .../zap-generated/attributes/Accessors.h | 16 +- .../app-common/zap-generated/callback.h | 44 +- .../zap-generated/cluster-enums-check.h | 15 + .../app-common/zap-generated/cluster-enums.h | 18 +- .../zap-generated/cluster-objects.cpp | 8 +- .../zap-generated/cluster-objects.h | 50 +- .../app-common/zap-generated/ids/Attributes.h | 8 +- .../app-common/zap-generated/ids/Clusters.h | 4 +- .../app-common/zap-generated/print-cluster.h | 9 +- .../zap-generated/cluster/Commands.h | 25 +- .../cluster/logging/DataModelLogger.cpp | 28 +- .../zap-generated/cluster/Commands.h | 840 +++++++++++++++++- 43 files changed, 3041 insertions(+), 437 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml index 16ca9a02487e3b..0a11025bad1000 100644 --- a/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml @@ -23,11 +23,19 @@ limitations under the License. + + + + + + + + Appliances - Washer Controls + Laundry Washer Controls 0x0053 - WASHER_CONTROLS_CLUSTER + LAUNDRY_WASHER_CONTROLS_CLUSTER true true This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such as a washing machine. @@ -36,7 +44,8 @@ limitations under the License. SpinSpeeds SpinSpeedCurrent - NumberOfRinses - MaxRinses + NumberOfRinses + SupportedRinses + \ No newline at end of file diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json index f3f391720b0d8d..5f6fa66ad798cf 100644 --- a/src/app/zap_cluster_list.json +++ b/src/app/zap_cluster_list.json @@ -141,7 +141,7 @@ "UV_FILTER_MONITORING_CLUSTER": [], "TVOC_CONCENTRATION_MEASUREMENT_CLUSTER": [], "WAKE_ON_LAN_CLUSTER": [], - "WASHER_CONTROLS_CLUSTER": [], + "LAUNDRY_WASHER_CONTROLS_CLUSTER": [], "WATER_TANK_MONITORING_CLUSTER": [], "WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [], "WINDOW_COVERING_CLUSTER": [], diff --git a/src/controller/data_model/BUILD.gn b/src/controller/data_model/BUILD.gn index 8f77988f33f967..f97ccd00a43af7 100644 --- a/src/controller/data_model/BUILD.gn +++ b/src/controller/data_model/BUILD.gn @@ -300,8 +300,8 @@ if (current_os == "android" || matter_enable_java_compilation) { "jni/UvFilterMonitoringClient-ReadImpl.cpp", "jni/WakeOnLanClient-InvokeSubscribeImpl.cpp", "jni/WakeOnLanClient-ReadImpl.cpp", - "jni/WasherControlsClient-InvokeSubscribeImpl.cpp", - "jni/WasherControlsClient-ReadImpl.cpp", + "jni/LaundryWasherControlsClient-InvokeSubscribeImpl.cpp", + "jni/LaundryWasherControlsClient-ReadImpl.cpp", "jni/WaterTankMonitoringClient-InvokeSubscribeImpl.cpp", "jni/WaterTankMonitoringClient-ReadImpl.cpp", "jni/WiFiNetworkDiagnosticsClient-InvokeSubscribeImpl.cpp", diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 4a5a0b4a97842e..6e95ea7a83dcfc 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2895,7 +2895,14 @@ client cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { } /** This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such as a washing machine. */ -client cluster WasherControls = 83 { +client cluster LaundryWasherControls = 83 { + enum NumberOfRinsesEnum : ENUM8 { + kNone = 0; + kNormal = 1; + kExtra = 2; + kMax = 3; + } + bitmap Feature : BITMAP32 { kSpin = 0x1; kRinse = 0x2; @@ -2903,8 +2910,8 @@ client cluster WasherControls = 83 { readonly attribute optional CHAR_STRING spinSpeeds[] = 0; attribute optional nullable int8u spinSpeedCurrent = 1; - attribute optional nullable int8u numberOfRinses = 2; - readonly attribute optional int8u maxRinses = 3; + attribute optional NumberOfRinsesEnum numberOfRinses = 2; + readonly attribute optional NumberOfRinsesEnum supportedRinses[] = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 8a050b8b9b742c..69218e0355a231 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -11170,10 +11170,10 @@ ] }, { - "name": "Washer Controls", + "name": "Laundry Washer Controls", "code": 83, "mfgCode": null, - "define": "WASHER_CONTROLS_CLUSTER", + "define": "LAUNDRY_WASHER_CONTROLS_CLUSTER", "side": "client", "enabled": 1, "attributes": [ @@ -11212,10 +11212,10 @@ ] }, { - "name": "Washer Controls", + "name": "Laundry Washer Controls", "code": 83, "mfgCode": null, - "define": "WASHER_CONTROLS_CLUSTER", + "define": "LAUNDRY_WASHER_CONTROLS_CLUSTER", "side": "server", "enabled": 0, "attributes": [ diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index d907e61019435d..b3410f47be2aa9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -160,8 +160,8 @@ public static BaseCluster getCluster(long clusterId) { if (clusterId == RefrigeratorAndTemperatureControlledCabinetMode.ID) { return new RefrigeratorAndTemperatureControlledCabinetMode(); } - if (clusterId == WasherControls.ID) { - return new WasherControls(); + if (clusterId == LaundryWasherControls.ID) { + return new LaundryWasherControls(); } if (clusterId == RvcRunMode.ID) { return new RvcRunMode(); @@ -6565,7 +6565,7 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class WasherControls implements BaseCluster { + public static class LaundryWasherControls implements BaseCluster { public static final long ID = 83L; public long getID() { return ID; @@ -6575,7 +6575,7 @@ public enum Attribute { SpinSpeeds(0L), SpinSpeedCurrent(1L), NumberOfRinses(2L), - MaxRinses(3L), + SupportedRinses(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index cd3b30aa945960..dde5901bd4aaa4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -6284,117 +6284,117 @@ private static Map readRefrigeratorAndTemperatureContro return result; } - private static Map readWasherControlsInteractionInfo() { - Map result = new LinkedHashMap<>();Map readWasherControlsSpinSpeedsCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsSpinSpeedsAttributeInteractionInfo = new InteractionInfo( + private static Map readLaundryWasherControlsInteractionInfo() { + Map result = new LinkedHashMap<>();Map readLaundryWasherControlsSpinSpeedsCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsSpinSpeedsAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readSpinSpeedsAttribute( - (ChipClusters.WasherControlsCluster.SpinSpeedsAttributeCallback) callback + ((ChipClusters.LaundryWasherControlsCluster) cluster).readSpinSpeedsAttribute( + (ChipClusters.LaundryWasherControlsCluster.SpinSpeedsAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedWasherControlsClusterSpinSpeedsAttributeCallback(), - readWasherControlsSpinSpeedsCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryWasherControlsClusterSpinSpeedsAttributeCallback(), + readLaundryWasherControlsSpinSpeedsCommandParams ); - result.put("readSpinSpeedsAttribute", readWasherControlsSpinSpeedsAttributeInteractionInfo); - Map readWasherControlsSpinSpeedCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsSpinSpeedCurrentAttributeInteractionInfo = new InteractionInfo( + result.put("readSpinSpeedsAttribute", readLaundryWasherControlsSpinSpeedsAttributeInteractionInfo); + Map readLaundryWasherControlsSpinSpeedCurrentCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsSpinSpeedCurrentAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readSpinSpeedCurrentAttribute( - (ChipClusters.WasherControlsCluster.SpinSpeedCurrentAttributeCallback) callback + ((ChipClusters.LaundryWasherControlsCluster) cluster).readSpinSpeedCurrentAttribute( + (ChipClusters.LaundryWasherControlsCluster.SpinSpeedCurrentAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedWasherControlsClusterSpinSpeedCurrentAttributeCallback(), - readWasherControlsSpinSpeedCurrentCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryWasherControlsClusterSpinSpeedCurrentAttributeCallback(), + readLaundryWasherControlsSpinSpeedCurrentCommandParams ); - result.put("readSpinSpeedCurrentAttribute", readWasherControlsSpinSpeedCurrentAttributeInteractionInfo); - Map readWasherControlsNumberOfRinsesCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsNumberOfRinsesAttributeInteractionInfo = new InteractionInfo( + result.put("readSpinSpeedCurrentAttribute", readLaundryWasherControlsSpinSpeedCurrentAttributeInteractionInfo); + Map readLaundryWasherControlsNumberOfRinsesCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsNumberOfRinsesAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readNumberOfRinsesAttribute( - (ChipClusters.WasherControlsCluster.NumberOfRinsesAttributeCallback) callback + ((ChipClusters.LaundryWasherControlsCluster) cluster).readNumberOfRinsesAttribute( + (ChipClusters.IntegerAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedWasherControlsClusterNumberOfRinsesAttributeCallback(), - readWasherControlsNumberOfRinsesCommandParams + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readLaundryWasherControlsNumberOfRinsesCommandParams ); - result.put("readNumberOfRinsesAttribute", readWasherControlsNumberOfRinsesAttributeInteractionInfo); - Map readWasherControlsMaxRinsesCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsMaxRinsesAttributeInteractionInfo = new InteractionInfo( + result.put("readNumberOfRinsesAttribute", readLaundryWasherControlsNumberOfRinsesAttributeInteractionInfo); + Map readLaundryWasherControlsSupportedRinsesCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsSupportedRinsesAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readMaxRinsesAttribute( - (ChipClusters.IntegerAttributeCallback) callback + ((ChipClusters.LaundryWasherControlsCluster) cluster).readSupportedRinsesAttribute( + (ChipClusters.LaundryWasherControlsCluster.SupportedRinsesAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readWasherControlsMaxRinsesCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryWasherControlsClusterSupportedRinsesAttributeCallback(), + readLaundryWasherControlsSupportedRinsesCommandParams ); - result.put("readMaxRinsesAttribute", readWasherControlsMaxRinsesAttributeInteractionInfo); - Map readWasherControlsGeneratedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + result.put("readSupportedRinsesAttribute", readLaundryWasherControlsSupportedRinsesAttributeInteractionInfo); + Map readLaundryWasherControlsGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readGeneratedCommandListAttribute( - (ChipClusters.WasherControlsCluster.GeneratedCommandListAttributeCallback) callback + ((ChipClusters.LaundryWasherControlsCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.LaundryWasherControlsCluster.GeneratedCommandListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedWasherControlsClusterGeneratedCommandListAttributeCallback(), - readWasherControlsGeneratedCommandListCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryWasherControlsClusterGeneratedCommandListAttributeCallback(), + readLaundryWasherControlsGeneratedCommandListCommandParams ); - result.put("readGeneratedCommandListAttribute", readWasherControlsGeneratedCommandListAttributeInteractionInfo); - Map readWasherControlsAcceptedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + result.put("readGeneratedCommandListAttribute", readLaundryWasherControlsGeneratedCommandListAttributeInteractionInfo); + Map readLaundryWasherControlsAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readAcceptedCommandListAttribute( - (ChipClusters.WasherControlsCluster.AcceptedCommandListAttributeCallback) callback + ((ChipClusters.LaundryWasherControlsCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.LaundryWasherControlsCluster.AcceptedCommandListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedWasherControlsClusterAcceptedCommandListAttributeCallback(), - readWasherControlsAcceptedCommandListCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryWasherControlsClusterAcceptedCommandListAttributeCallback(), + readLaundryWasherControlsAcceptedCommandListCommandParams ); - result.put("readAcceptedCommandListAttribute", readWasherControlsAcceptedCommandListAttributeInteractionInfo); - Map readWasherControlsEventListCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsEventListAttributeInteractionInfo = new InteractionInfo( + result.put("readAcceptedCommandListAttribute", readLaundryWasherControlsAcceptedCommandListAttributeInteractionInfo); + Map readLaundryWasherControlsEventListCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsEventListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readEventListAttribute( - (ChipClusters.WasherControlsCluster.EventListAttributeCallback) callback + ((ChipClusters.LaundryWasherControlsCluster) cluster).readEventListAttribute( + (ChipClusters.LaundryWasherControlsCluster.EventListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedWasherControlsClusterEventListAttributeCallback(), - readWasherControlsEventListCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryWasherControlsClusterEventListAttributeCallback(), + readLaundryWasherControlsEventListCommandParams ); - result.put("readEventListAttribute", readWasherControlsEventListAttributeInteractionInfo); - Map readWasherControlsAttributeListCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsAttributeListAttributeInteractionInfo = new InteractionInfo( + result.put("readEventListAttribute", readLaundryWasherControlsEventListAttributeInteractionInfo); + Map readLaundryWasherControlsAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsAttributeListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readAttributeListAttribute( - (ChipClusters.WasherControlsCluster.AttributeListAttributeCallback) callback + ((ChipClusters.LaundryWasherControlsCluster) cluster).readAttributeListAttribute( + (ChipClusters.LaundryWasherControlsCluster.AttributeListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedWasherControlsClusterAttributeListAttributeCallback(), - readWasherControlsAttributeListCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryWasherControlsClusterAttributeListAttributeCallback(), + readLaundryWasherControlsAttributeListCommandParams ); - result.put("readAttributeListAttribute", readWasherControlsAttributeListAttributeInteractionInfo); - Map readWasherControlsFeatureMapCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsFeatureMapAttributeInteractionInfo = new InteractionInfo( + result.put("readAttributeListAttribute", readLaundryWasherControlsAttributeListAttributeInteractionInfo); + Map readLaundryWasherControlsFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsFeatureMapAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readFeatureMapAttribute( + ((ChipClusters.LaundryWasherControlsCluster) cluster).readFeatureMapAttribute( (ChipClusters.LongAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readWasherControlsFeatureMapCommandParams + readLaundryWasherControlsFeatureMapCommandParams ); - result.put("readFeatureMapAttribute", readWasherControlsFeatureMapAttributeInteractionInfo); - Map readWasherControlsClusterRevisionCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsClusterRevisionAttributeInteractionInfo = new InteractionInfo( + result.put("readFeatureMapAttribute", readLaundryWasherControlsFeatureMapAttributeInteractionInfo); + Map readLaundryWasherControlsClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsClusterRevisionAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readClusterRevisionAttribute( + ((ChipClusters.LaundryWasherControlsCluster) cluster).readClusterRevisionAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readWasherControlsClusterRevisionCommandParams + readLaundryWasherControlsClusterRevisionCommandParams ); - result.put("readClusterRevisionAttribute", readWasherControlsClusterRevisionAttributeInteractionInfo); + result.put("readClusterRevisionAttribute", readLaundryWasherControlsClusterRevisionAttributeInteractionInfo); return result; } @@ -23408,7 +23408,7 @@ public Map> getReadAttributeMap() { put("modeSelect", readModeSelectInteractionInfo()); put("laundryWasherMode", readLaundryWasherModeInteractionInfo()); put("refrigeratorAndTemperatureControlledCabinetMode", readRefrigeratorAndTemperatureControlledCabinetModeInteractionInfo()); - put("washerControls", readWasherControlsInteractionInfo()); + put("laundryWasherControls", readLaundryWasherControlsInteractionInfo()); put("rvcRunMode", readRvcRunModeInteractionInfo()); put("rvcCleanMode", readRvcCleanModeInteractionInfo()); put("temperatureControl", readTemperatureControlInteractionInfo()); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index 50f2b7fcf4e672..0848e009deb4b5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -862,52 +862,52 @@ public Map> getWriteAttributeMap() { ); writeRefrigeratorAndTemperatureControlledCabinetModeInteractionInfo.put("writeOnModeAttribute", writeRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeInteractionInfo); writeAttributeMap.put("refrigeratorAndTemperatureControlledCabinetMode", writeRefrigeratorAndTemperatureControlledCabinetModeInteractionInfo); - Map writeWasherControlsInteractionInfo = new LinkedHashMap<>(); - Map writeWasherControlsSpinSpeedCurrentCommandParams = new LinkedHashMap(); - CommandParameterInfo washerControlsspinSpeedCurrentCommandParameterInfo = + Map writeLaundryWasherControlsInteractionInfo = new LinkedHashMap<>(); + Map writeLaundryWasherControlsSpinSpeedCurrentCommandParams = new LinkedHashMap(); + CommandParameterInfo laundryWasherControlsspinSpeedCurrentCommandParameterInfo = new CommandParameterInfo( "value", Integer.class, Integer.class ); - writeWasherControlsSpinSpeedCurrentCommandParams.put( + writeLaundryWasherControlsSpinSpeedCurrentCommandParams.put( "value", - washerControlsspinSpeedCurrentCommandParameterInfo + laundryWasherControlsspinSpeedCurrentCommandParameterInfo ); - InteractionInfo writeWasherControlsSpinSpeedCurrentAttributeInteractionInfo = new InteractionInfo( + InteractionInfo writeLaundryWasherControlsSpinSpeedCurrentAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).writeSpinSpeedCurrentAttribute( + ((ChipClusters.LaundryWasherControlsCluster) cluster).writeSpinSpeedCurrentAttribute( (DefaultClusterCallback) callback, (Integer) commandArguments.get("value") ); }, () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeWasherControlsSpinSpeedCurrentCommandParams + writeLaundryWasherControlsSpinSpeedCurrentCommandParams ); - writeWasherControlsInteractionInfo.put("writeSpinSpeedCurrentAttribute", writeWasherControlsSpinSpeedCurrentAttributeInteractionInfo); - Map writeWasherControlsNumberOfRinsesCommandParams = new LinkedHashMap(); - CommandParameterInfo washerControlsnumberOfRinsesCommandParameterInfo = + writeLaundryWasherControlsInteractionInfo.put("writeSpinSpeedCurrentAttribute", writeLaundryWasherControlsSpinSpeedCurrentAttributeInteractionInfo); + Map writeLaundryWasherControlsNumberOfRinsesCommandParams = new LinkedHashMap(); + CommandParameterInfo laundryWasherControlsnumberOfRinsesCommandParameterInfo = new CommandParameterInfo( "value", Integer.class, Integer.class ); - writeWasherControlsNumberOfRinsesCommandParams.put( + writeLaundryWasherControlsNumberOfRinsesCommandParams.put( "value", - washerControlsnumberOfRinsesCommandParameterInfo + laundryWasherControlsnumberOfRinsesCommandParameterInfo ); - InteractionInfo writeWasherControlsNumberOfRinsesAttributeInteractionInfo = new InteractionInfo( + InteractionInfo writeLaundryWasherControlsNumberOfRinsesAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).writeNumberOfRinsesAttribute( + ((ChipClusters.LaundryWasherControlsCluster) cluster).writeNumberOfRinsesAttribute( (DefaultClusterCallback) callback, (Integer) commandArguments.get("value") ); }, () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeWasherControlsNumberOfRinsesCommandParams + writeLaundryWasherControlsNumberOfRinsesCommandParams ); - writeWasherControlsInteractionInfo.put("writeNumberOfRinsesAttribute", writeWasherControlsNumberOfRinsesAttributeInteractionInfo); - writeAttributeMap.put("washerControls", writeWasherControlsInteractionInfo); + writeLaundryWasherControlsInteractionInfo.put("writeNumberOfRinsesAttribute", writeLaundryWasherControlsNumberOfRinsesAttributeInteractionInfo); + writeAttributeMap.put("laundryWasherControls", writeLaundryWasherControlsInteractionInfo); Map writeRvcRunModeInteractionInfo = new LinkedHashMap<>(); Map writeRvcRunModeStartUpModeCommandParams = new LinkedHashMap(); CommandParameterInfo rvcRunModestartUpModeCommandParameterInfo = diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 629e04c209d2ca..8fdbbde37221e9 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -12805,8 +12805,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::WasherControls::Id: { - using namespace app::Clusters::WasherControls; + case app::Clusters::LaundryWasherControls::Id: { + using namespace app::Clusters::LaundryWasherControls; switch (aPath.mAttributeId) { case Attributes::SpinSpeeds::Id: { @@ -12861,21 +12861,14 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); - } + 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); return value; } - case Attributes::MaxRinses::Id: { - using TypeInfo = Attributes::MaxRinses::TypeInfo; + case Attributes::SupportedRinses::Id: { + using TypeInfo = Attributes::SupportedRinses::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -12883,10 +12876,19 @@ 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); + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } return value; } case Attributes::GeneratedCommandList::Id: { diff --git a/src/controller/java/zap-generated/CHIPClientCallbacks.h b/src/controller/java/zap-generated/CHIPClientCallbacks.h index 23981333963f21..07f71ec192639c 100644 --- a/src/controller/java/zap-generated/CHIPClientCallbacks.h +++ b/src/controller/java/zap-generated/CHIPClientCallbacks.h @@ -499,15 +499,18 @@ typedef void (*RefrigeratorAndTemperatureControlledCabinetModeEventListListAttri void * context, const chip::app::DataModel::DecodableList & data); typedef void (*RefrigeratorAndTemperatureControlledCabinetModeAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WasherControlsSpinSpeedsListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*WasherControlsGeneratedCommandListListAttributeCallback)( +typedef void (*LaundryWasherControlsSpinSpeedsListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryWasherControlsSupportedRinsesListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryWasherControlsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WasherControlsAcceptedCommandListListAttributeCallback)( +typedef void (*LaundryWasherControlsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WasherControlsEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*WasherControlsAttributeListListAttributeCallback)( +typedef void (*LaundryWasherControlsEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryWasherControlsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*RvcRunModeSupportedModesListAttributeCallback)( void * context, diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index 4fe9a9ebc89a9e..e92be17671753d 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -2584,12 +2584,12 @@ JNI_METHOD(void, RefrigeratorAndTemperatureControlledCabinetModeCluster, writeOn onFailure.release(); } -JNI_METHOD(void, WasherControlsCluster, writeSpinSpeedCurrentAttribute) +JNI_METHOD(void, LaundryWasherControlsCluster, writeSpinSpeedCurrentAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; ListFreer listFreer; - using TypeInfo = chip::app::Clusters::WasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + using TypeInfo = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; TypeInfo::Type cppValue; std::vector> cleanupByteArrays; @@ -2618,8 +2618,8 @@ JNI_METHOD(void, WasherControlsCluster, writeSpinSpeedCurrentAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - WasherControlsCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + LaundryWasherControlsCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); @@ -2644,27 +2644,19 @@ JNI_METHOD(void, WasherControlsCluster, writeSpinSpeedCurrentAttribute) onFailure.release(); } -JNI_METHOD(void, WasherControlsCluster, writeNumberOfRinsesAttribute) +JNI_METHOD(void, LaundryWasherControlsCluster, writeNumberOfRinsesAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; ListFreer listFreer; - using TypeInfo = chip::app::Clusters::WasherControls::Attributes::NumberOfRinses::TypeInfo; + using TypeInfo = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; TypeInfo::Type cppValue; std::vector> cleanupByteArrays; std::vector> cleanupStrings; - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2678,8 +2670,8 @@ JNI_METHOD(void, WasherControlsCluster, writeNumberOfRinsesAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - WasherControlsCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + LaundryWasherControlsCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index 71259897aef758..96c6f70a45ff5b 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -2445,8 +2445,8 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } - case app::Clusters::WasherControls::Id: { - using namespace app::Clusters::WasherControls; + case app::Clusters::LaundryWasherControls::Id: { + using namespace app::Clusters::LaundryWasherControls; switch (aPath.mEventId) { default: diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 09e678d49b0309..d113e22b7436cc 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -21392,8 +21392,10 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCa env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWasherControlsSpinSpeedsAttributeCallback::CHIPWasherControlsSpinSpeedsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CHIPLaundryWasherControlsSpinSpeedsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21409,7 +21411,7 @@ CHIPWasherControlsSpinSpeedsAttributeCallback::CHIPWasherControlsSpinSpeedsAttri } } -CHIPWasherControlsSpinSpeedsAttributeCallback::~CHIPWasherControlsSpinSpeedsAttributeCallback() +CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21420,8 +21422,8 @@ CHIPWasherControlsSpinSpeedsAttributeCallback::~CHIPWasherControlsSpinSpeedsAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWasherControlsSpinSpeedsAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21430,8 +21432,8 @@ void CHIPWasherControlsSpinSpeedsAttributeCallback::CallbackFn(void * context, 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; @@ -21458,9 +21460,9 @@ void CHIPWasherControlsSpinSpeedsAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWasherControlsSpinSpeedCurrentAttributeCallback::CHIPWasherControlsSpinSpeedCurrentAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21477,7 +21479,7 @@ CHIPWasherControlsSpinSpeedCurrentAttributeCallback::CHIPWasherControlsSpinSpeed } } -CHIPWasherControlsSpinSpeedCurrentAttributeCallback::~CHIPWasherControlsSpinSpeedCurrentAttributeCallback() +CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21488,8 +21490,8 @@ CHIPWasherControlsSpinSpeedCurrentAttributeCallback::~CHIPWasherControlsSpinSpee env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21497,8 +21499,8 @@ void CHIPWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void * cont 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; @@ -21525,9 +21527,9 @@ void CHIPWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void * cont env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWasherControlsNumberOfRinsesAttributeCallback::CHIPWasherControlsNumberOfRinsesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CHIPLaundryWasherControlsSupportedRinsesAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21544,7 +21546,7 @@ CHIPWasherControlsNumberOfRinsesAttributeCallback::CHIPWasherControlsNumberOfRin } } -CHIPWasherControlsNumberOfRinsesAttributeCallback::~CHIPWasherControlsNumberOfRinsesAttributeCallback() +CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::~CHIPLaundryWasherControlsSupportedRinsesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21555,8 +21557,9 @@ CHIPWasherControlsNumberOfRinsesAttributeCallback::~CHIPWasherControlsNumberOfRi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWasherControlsNumberOfRinsesAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21564,8 +21567,9 @@ void CHIPWasherControlsNumberOfRinsesAttributeCallback::CallbackFn(void * contex 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; @@ -21573,28 +21577,31 @@ void CHIPWasherControlsNumberOfRinsesAttributeCallback::CallbackFn(void * contex 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); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWasherControlsGeneratedCommandListAttributeCallback::CHIPWasherControlsGeneratedCommandListAttributeCallback( +CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21611,7 +21618,7 @@ CHIPWasherControlsGeneratedCommandListAttributeCallback::CHIPWasherControlsGener } } -CHIPWasherControlsGeneratedCommandListAttributeCallback::~CHIPWasherControlsGeneratedCommandListAttributeCallback() +CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::~CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21622,7 +21629,7 @@ CHIPWasherControlsGeneratedCommandListAttributeCallback::~CHIPWasherControlsGene env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -21632,8 +21639,8 @@ void CHIPWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( 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; @@ -21663,9 +21670,9 @@ void CHIPWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWasherControlsAcceptedCommandListAttributeCallback::CHIPWasherControlsAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21682,7 +21689,7 @@ CHIPWasherControlsAcceptedCommandListAttributeCallback::CHIPWasherControlsAccept } } -CHIPWasherControlsAcceptedCommandListAttributeCallback::~CHIPWasherControlsAcceptedCommandListAttributeCallback() +CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::~CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21693,7 +21700,7 @@ CHIPWasherControlsAcceptedCommandListAttributeCallback::~CHIPWasherControlsAccep env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -21703,8 +21710,8 @@ void CHIPWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( 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; @@ -21734,8 +21741,10 @@ void CHIPWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWasherControlsEventListAttributeCallback::CHIPWasherControlsEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherControlsEventListAttributeCallback::CHIPLaundryWasherControlsEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21751,7 +21760,7 @@ CHIPWasherControlsEventListAttributeCallback::CHIPWasherControlsEventListAttribu } } -CHIPWasherControlsEventListAttributeCallback::~CHIPWasherControlsEventListAttributeCallback() +CHIPLaundryWasherControlsEventListAttributeCallback::~CHIPLaundryWasherControlsEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21762,8 +21771,8 @@ CHIPWasherControlsEventListAttributeCallback::~CHIPWasherControlsEventListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWasherControlsEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherControlsEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21772,8 +21781,8 @@ void CHIPWasherControlsEventListAttributeCallback::CallbackFn(void * context, 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; @@ -21803,9 +21812,9 @@ void CHIPWasherControlsEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWasherControlsAttributeListAttributeCallback::CHIPWasherControlsAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryWasherControlsAttributeListAttributeCallback::CHIPLaundryWasherControlsAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21822,7 +21831,7 @@ CHIPWasherControlsAttributeListAttributeCallback::CHIPWasherControlsAttributeLis } } -CHIPWasherControlsAttributeListAttributeCallback::~CHIPWasherControlsAttributeListAttributeCallback() +CHIPLaundryWasherControlsAttributeListAttributeCallback::~CHIPLaundryWasherControlsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21833,7 +21842,7 @@ CHIPWasherControlsAttributeListAttributeCallback::~CHIPWasherControlsAttributeLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWasherControlsAttributeListAttributeCallback::CallbackFn( +void CHIPLaundryWasherControlsAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -21843,8 +21852,8 @@ void CHIPWasherControlsAttributeListAttributeCallback::CallbackFn( 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/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 3f68272a50e205..6b848ae9a7f385 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -14262,10 +14262,10 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, , int minInterval, int maxInterval); } - public static class WasherControlsCluster extends BaseChipCluster { + public static class LaundryWasherControlsCluster extends BaseChipCluster { public static final long CLUSTER_ID = 83L; - public WasherControlsCluster(long devicePtr, int endpointId) { + public LaundryWasherControlsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } @@ -14282,8 +14282,8 @@ public interface SpinSpeedCurrentAttributeCallback { void onError(Exception ex); default void onSubscriptionEstablished(long subscriptionId) {} } - public interface NumberOfRinsesAttributeCallback { - void onSuccess(@Nullable Integer value); + public interface SupportedRinsesAttributeCallback { + void onSuccess( List valueList); void onError(Exception ex); default void onSubscriptionEstablished(long subscriptionId) {} } @@ -14340,7 +14340,7 @@ public void subscribeSpinSpeedCurrentAttribute( } public void readNumberOfRinsesAttribute( - NumberOfRinsesAttributeCallback callback + IntegerAttributeCallback callback ) { readNumberOfRinsesAttribute(chipClusterPtr, callback); } @@ -14352,22 +14352,22 @@ public void writeNumberOfRinsesAttribute(DefaultClusterCallback callback, Intege writeNumberOfRinsesAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNumberOfRinsesAttribute( - NumberOfRinsesAttributeCallback callback - , + IntegerAttributeCallback callback +, int minInterval, int maxInterval) { subscribeNumberOfRinsesAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readMaxRinsesAttribute( - IntegerAttributeCallback callback + public void readSupportedRinsesAttribute( + SupportedRinsesAttributeCallback callback ) { - readMaxRinsesAttribute(chipClusterPtr, callback); + readSupportedRinsesAttribute(chipClusterPtr, callback); } - public void subscribeMaxRinsesAttribute( - IntegerAttributeCallback callback -, + public void subscribeSupportedRinsesAttribute( + SupportedRinsesAttributeCallback callback + , int minInterval, int maxInterval) { - subscribeMaxRinsesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + subscribeSupportedRinsesAttribute(chipClusterPtr, callback, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -14459,21 +14459,21 @@ private native void subscribeSpinSpeedCurrentAttribute(long chipClusterPtr, , int minInterval, int maxInterval); private native void readNumberOfRinsesAttribute(long chipClusterPtr, - NumberOfRinsesAttributeCallback callback + IntegerAttributeCallback callback ); private native void writeNumberOfRinsesAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNumberOfRinsesAttribute(long chipClusterPtr, - NumberOfRinsesAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxRinsesAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMaxRinsesAttribute(long chipClusterPtr, IntegerAttributeCallback callback , int minInterval, int maxInterval); + private native void readSupportedRinsesAttribute(long chipClusterPtr, + SupportedRinsesAttributeCallback callback + ); + private native void subscribeSupportedRinsesAttribute(long chipClusterPtr, + SupportedRinsesAttributeCallback callback + , int minInterval, int maxInterval); + private native void readGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback ); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java index 53c938f4c97ab8..4f5ccf131b6450 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java @@ -157,7 +157,7 @@ public static String clusterIdToName(long clusterId) { return "RefrigeratorAndTemperatureControlledCabinetMode"; } if (clusterId == 83L) { - return "WasherControls"; + return "LaundryWasherControls"; } if (clusterId == 84L) { return "RvcRunMode"; @@ -2254,7 +2254,7 @@ public static String attributeIdToName(long clusterId, long attributeId) { return "NumberOfRinses"; } if (attributeId == 3L) { - return "MaxRinses"; + return "SupportedRinses"; } if (attributeId == 65528L) { return "GeneratedCommandList"; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index ea7141168845cc..d34fdec327f3b9 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -6224,7 +6224,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWasherControlsClusterSpinSpeedsAttributeCallback implements ChipClusters.WasherControlsCluster.SpinSpeedsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterSpinSpeedsAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SpinSpeedsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6243,7 +6243,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedWasherControlsClusterSpinSpeedCurrentAttributeCallback implements ChipClusters.WasherControlsCluster.SpinSpeedCurrentAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterSpinSpeedCurrentAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SpinSpeedCurrentAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6262,7 +6262,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedWasherControlsClusterNumberOfRinsesAttributeCallback implements ChipClusters.WasherControlsCluster.NumberOfRinsesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterSupportedRinsesAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SupportedRinsesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6270,10 +6270,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess( List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override @@ -6281,7 +6281,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedWasherControlsClusterGeneratedCommandListAttributeCallback implements ChipClusters.WasherControlsCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterGeneratedCommandListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6300,7 +6300,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedWasherControlsClusterAcceptedCommandListAttributeCallback implements ChipClusters.WasherControlsCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterAcceptedCommandListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6319,7 +6319,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedWasherControlsClusterEventListAttributeCallback implements ChipClusters.WasherControlsCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterEventListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6338,7 +6338,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedWasherControlsClusterAttributeListAttributeCallback implements ChipClusters.WasherControlsCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterAttributeListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20053,9 +20053,9 @@ public Map initializeClusterMap() { ClusterInfo refrigeratorAndTemperatureControlledCabinetModeClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("refrigeratorAndTemperatureControlledCabinetMode", refrigeratorAndTemperatureControlledCabinetModeClusterInfo); - ClusterInfo washerControlsClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.WasherControlsCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("washerControls", washerControlsClusterInfo); + ClusterInfo laundryWasherControlsClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.LaundryWasherControlsCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("laundryWasherControls", laundryWasherControlsClusterInfo); ClusterInfo rvcRunModeClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.RvcRunModeCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("rvcRunMode", rvcRunModeClusterInfo); @@ -20368,7 +20368,7 @@ public void combineCommand(Map destination, Map> getCommandMap() { ); refrigeratorAndTemperatureControlledCabinetModeClusterInteractionInfoMap.put("changeToMode", refrigeratorAndTemperatureControlledCabinetModechangeToModeInteractionInfo); commandMap.put("refrigeratorAndTemperatureControlledCabinetMode", refrigeratorAndTemperatureControlledCabinetModeClusterInteractionInfoMap); - Map washerControlsClusterInteractionInfoMap = new LinkedHashMap<>(); - commandMap.put("washerControls", washerControlsClusterInteractionInfoMap); + Map laundryWasherControlsClusterInteractionInfoMap = new LinkedHashMap<>(); + commandMap.put("laundryWasherControls", laundryWasherControlsClusterInteractionInfoMap); Map rvcRunModeClusterInteractionInfoMap = new LinkedHashMap<>(); Map rvcRunModechangeToModeCommandParams = new LinkedHashMap(); CommandParameterInfo rvcRunModechangeToModenewModeCommandParameterInfo = new CommandParameterInfo("newMode", Integer.class, Integer.class); diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 85d26f14948e95..052caee654993c 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -4511,8 +4511,8 @@ class ChipClusters: }, }, } - _WASHER_CONTROLS_CLUSTER_INFO = { - "clusterName": "WasherControls", + _LAUNDRY_WASHER_CONTROLS_CLUSTER_INFO = { + "clusterName": "LaundryWasherControls", "clusterId": 0x00000053, "commands": { }, @@ -4538,7 +4538,7 @@ class ChipClusters: "writable": True, }, 0x00000003: { - "attributeName": "MaxRinses", + "attributeName": "SupportedRinses", "attributeId": 0x00000003, "type": "int", "reportable": True, @@ -15708,7 +15708,7 @@ class ChipClusters: 0x00000050: _MODE_SELECT_CLUSTER_INFO, 0x00000051: _LAUNDRY_WASHER_MODE_CLUSTER_INFO, 0x00000052: _REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER_INFO, - 0x00000053: _WASHER_CONTROLS_CLUSTER_INFO, + 0x00000053: _LAUNDRY_WASHER_CONTROLS_CLUSTER_INFO, 0x00000054: _RVC_RUN_MODE_CLUSTER_INFO, 0x00000055: _RVC_CLEAN_MODE_CLUSTER_INFO, 0x00000056: _TEMPERATURE_CONTROL_CLUSTER_INFO, @@ -15844,7 +15844,7 @@ class ChipClusters: "ModeSelect": _MODE_SELECT_CLUSTER_INFO, "LaundryWasherMode": _LAUNDRY_WASHER_MODE_CLUSTER_INFO, "RefrigeratorAndTemperatureControlledCabinetMode": _REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER_INFO, - "WasherControls": _WASHER_CONTROLS_CLUSTER_INFO, + "LaundryWasherControls": _LAUNDRY_WASHER_CONTROLS_CLUSTER_INFO, "RvcRunMode": _RVC_RUN_MODE_CLUSTER_INFO, "RvcCleanMode": _RVC_CLEAN_MODE_CLUSTER_INFO, "TemperatureControl": _TEMPERATURE_CONTROL_CLUSTER_INFO, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 79369d295cf0bd..e9ee0c02b107a2 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -15684,7 +15684,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class WasherControls(Cluster): +class LaundryWasherControls(Cluster): id: typing.ClassVar[int] = 0x0053 @ChipUtility.classproperty @@ -15693,8 +15693,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="spinSpeeds", Tag=0x00000000, Type=typing.Optional[typing.List[str]]), ClusterObjectFieldDescriptor(Label="spinSpeedCurrent", Tag=0x00000001, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="numberOfRinses", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="maxRinses", Tag=0x00000003, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfRinses", Tag=0x00000002, Type=typing.Optional[LaundryWasherControls.Enums.NumberOfRinsesEnum]), + ClusterObjectFieldDescriptor(Label="supportedRinses", Tag=0x00000003, Type=typing.Optional[typing.List[LaundryWasherControls.Enums.NumberOfRinsesEnum]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -15705,8 +15705,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: spinSpeeds: 'typing.Optional[typing.List[str]]' = None spinSpeedCurrent: 'typing.Union[None, Nullable, uint]' = None - numberOfRinses: 'typing.Union[None, Nullable, uint]' = None - maxRinses: 'typing.Optional[uint]' = None + numberOfRinses: 'typing.Optional[LaundryWasherControls.Enums.NumberOfRinsesEnum]' = None + supportedRinses: 'typing.Optional[typing.List[LaundryWasherControls.Enums.NumberOfRinsesEnum]]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -15714,6 +15714,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None + class Enums: + class NumberOfRinsesEnum(MatterIntEnum): + kNone = 0x00 + kNormal = 0x01 + kExtra = 0x02 + kMax = 0x03 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, + class Bitmaps: class Feature(IntFlag): kSpin = 0x1 @@ -15764,12 +15776,12 @@ 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[LaundryWasherControls.Enums.NumberOfRinsesEnum]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Optional[LaundryWasherControls.Enums.NumberOfRinsesEnum]' = None @dataclass - class MaxRinses(ClusterAttributeDescriptor): + class SupportedRinses(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0053 @@ -15780,9 +15792,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[LaundryWasherControls.Enums.NumberOfRinsesEnum]]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[typing.List[LaundryWasherControls.Enums.NumberOfRinsesEnum]]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index 4ea766a14fbd3c..9b864c81716e61 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -1802,6 +1802,45 @@ static BOOL AttributeIsSpecifiedInModeSelectCluster(AttributeId aAttributeId) } } } +static BOOL AttributeIsSpecifiedInLaundryWasherControlsCluster(AttributeId aAttributeId) +{ + using namespace Clusters::LaundryWasherControls; + switch (aAttributeId) { + case Attributes::SpinSpeeds::Id: { + return YES; + } + case Attributes::SpinSpeedCurrent::Id: { + return YES; + } + case Attributes::NumberOfRinses::Id: { + return YES; + } + case Attributes::SupportedRinses::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::EventList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} static BOOL AttributeIsSpecifiedInTemperatureControlCluster(AttributeId aAttributeId) { using namespace Clusters::TemperatureControl; @@ -5130,6 +5169,9 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId) case Clusters::ModeSelect::Id: { return AttributeIsSpecifiedInModeSelectCluster(aAttributeId); } + case Clusters::LaundryWasherControls::Id: { + return AttributeIsSpecifiedInLaundryWasherControlsCluster(aAttributeId); + } case Clusters::TemperatureControl::Id: { return AttributeIsSpecifiedInTemperatureControlCluster(aAttributeId); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index bd83f67882b035..24fef39fcc7eaf 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -9250,6 +9250,228 @@ static id _Nullable DecodeAttributeValueForModeSelectCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } +static id _Nullable DecodeAttributeValueForLaundryWasherControlsCluster( + AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::LaundryWasherControls; + switch (aAttributeId) { + case Attributes::SpinSpeeds::Id: { + using TypeInfo = Attributes::SpinSpeeds::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSString * newElement_0; + newElement_0 = AsString(entry_0); + if (newElement_0 == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::SpinSpeedCurrent::Id: { + using TypeInfo = Attributes::SpinSpeedCurrent::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 numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::NumberOfRinses::Id: { + using TypeInfo = Attributes::NumberOfRinses::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::SupportedRinses::Id: { + using TypeInfo = Attributes::SupportedRinses::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::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::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} static id _Nullable DecodeAttributeValueForTemperatureControlCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { @@ -24482,6 +24704,9 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T case Clusters::ModeSelect::Id: { return DecodeAttributeValueForModeSelectCluster(aPath.mAttributeId, aReader, aError); } + case Clusters::LaundryWasherControls::Id: { + return DecodeAttributeValueForLaundryWasherControlsCluster(aPath.mAttributeId, aReader, aError); + } case Clusters::TemperatureControl::Id: { return DecodeAttributeValueForTemperatureControlCluster(aPath.mAttributeId, aReader, aError); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index cc51d60f80984e..bd94870198ca3d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -7897,6 +7897,154 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end +/** + * Cluster Laundry Washer Controls + * + * This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such + * as a washing machine. + */ +MTR_NEWLY_AVAILABLE +@interface MTRBaseClusterLaundryWasherControls : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; + +- (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; + +- (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + +- (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeNumberOfRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; + +- (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeSupportedRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + /** * Cluster Temperature Control * @@ -24525,6 +24673,18 @@ typedef NS_OPTIONS(uint32_t, MTRModeSelectFeature) { = 0x1, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRLaundryWasherControlsNumberOfRinses) { + MTRLaundryWasherControlsNumberOfRinsesNone MTR_NEWLY_AVAILABLE = 0x00, + MTRLaundryWasherControlsNumberOfRinsesNormal MTR_NEWLY_AVAILABLE = 0x01, + MTRLaundryWasherControlsNumberOfRinsesExtra MTR_NEWLY_AVAILABLE = 0x02, + MTRLaundryWasherControlsNumberOfRinsesMax MTR_NEWLY_AVAILABLE = 0x03, +} MTR_NEWLY_AVAILABLE; + +typedef NS_OPTIONS(uint32_t, MTRLaundryWasherControlsFeature) { + MTRLaundryWasherControlsFeatureSpin MTR_NEWLY_AVAILABLE = 0x1, + MTRLaundryWasherControlsFeatureRinse MTR_NEWLY_AVAILABLE = 0x2, +} MTR_NEWLY_AVAILABLE; + typedef NS_OPTIONS(uint32_t, MTRTemperatureControlFeature) { MTRTemperatureControlFeatureTemperatureNumber MTR_NEWLY_AVAILABLE = 0x1, MTRTemperatureControlFeatureTemperatureLevel MTR_NEWLY_AVAILABLE = 0x2, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index cb9479fc931ea6..5f5ca943653a49 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -47834,6 +47834,541 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end +@implementation MTRBaseClusterLaundryWasherControls + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRLaundryWasherControlsSpinSpeedsListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(LaundryWasherControlsSpinSpeedsListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeNumberOfRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(LaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeSupportedRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRLaundryWasherControlsSupportedRinsesListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(LaundryWasherControlsSupportedRinsesListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRLaundryWasherControlsGeneratedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(LaundryWasherControlsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRLaundryWasherControlsAcceptedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(LaundryWasherControlsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRLaundryWasherControlsEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(LaundryWasherControlsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRLaundryWasherControlsAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(LaundryWasherControlsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + @implementation MTRBaseClusterTemperatureControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h index ba9b532fc8c3e1..bd1a048dae4e38 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h @@ -200,6 +200,11 @@ @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end +@interface MTRBaseClusterLaundryWasherControls () +@property (nonatomic, strong, readonly) MTRBaseDevice * device; +@property (nonatomic, assign, readonly) chip::EndpointId endpoint; +@end + @interface MTRBaseClusterTemperatureControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; @property (nonatomic, assign, readonly) chip::EndpointId endpoint; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index 79efa631ed7219..af36544e484c06 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -383,6 +383,10 @@ typedef void (*GroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallb void *, chip::app::Clusters::GroupKeyManagement::GroupKeySecurityPolicyEnum); typedef void (*NullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCallback)( void *, const chip::app::DataModel::Nullable &); +typedef void (*LaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallback)( + void *, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum); +typedef void (*NullableLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); typedef void (*AirQualityClusterAirQualityEnumAttributeCallback)(void *, chip::app::Clusters::AirQuality::AirQualityEnum); typedef void (*NullableAirQualityClusterAirQualityEnumAttributeCallback)( void *, const chip::app::DataModel::Nullable &); @@ -1167,6 +1171,19 @@ typedef void (*ModeSelectEventListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ModeSelectAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryWasherControlsSpinSpeedsListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryWasherControlsSupportedRinsesListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryWasherControlsGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryWasherControlsAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryWasherControlsEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryWasherControlsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureControlSupportedTemperatureLevelsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureControlGeneratedCommandListListAttributeCallback)( @@ -8723,6 +8740,206 @@ class MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRLaundryWasherControlsSpinSpeedsListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRLaundryWasherControlsSpinSpeedsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRLaundryWasherControlsSpinSpeedsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRLaundryWasherControlsSpinSpeedsListAttributeCallbackSubscriptionBridge + : public MTRLaundryWasherControlsSpinSpeedsListAttributeCallbackBridge +{ +public: + MTRLaundryWasherControlsSpinSpeedsListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLaundryWasherControlsSpinSpeedsListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRLaundryWasherControlsSpinSpeedsListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLaundryWasherControlsSpinSpeedsListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRLaundryWasherControlsSupportedRinsesListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRLaundryWasherControlsSupportedRinsesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRLaundryWasherControlsSupportedRinsesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void + OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value); +}; + +class MTRLaundryWasherControlsSupportedRinsesListAttributeCallbackSubscriptionBridge + : public MTRLaundryWasherControlsSupportedRinsesListAttributeCallbackBridge +{ +public: + MTRLaundryWasherControlsSupportedRinsesListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLaundryWasherControlsSupportedRinsesListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRLaundryWasherControlsSupportedRinsesListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLaundryWasherControlsSupportedRinsesListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRLaundryWasherControlsGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRLaundryWasherControlsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRLaundryWasherControlsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRLaundryWasherControlsGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRLaundryWasherControlsGeneratedCommandListListAttributeCallbackBridge +{ +public: + MTRLaundryWasherControlsGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLaundryWasherControlsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRLaundryWasherControlsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLaundryWasherControlsGeneratedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRLaundryWasherControlsAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRLaundryWasherControlsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRLaundryWasherControlsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRLaundryWasherControlsAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRLaundryWasherControlsAcceptedCommandListListAttributeCallbackBridge +{ +public: + MTRLaundryWasherControlsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLaundryWasherControlsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRLaundryWasherControlsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLaundryWasherControlsAcceptedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRLaundryWasherControlsEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRLaundryWasherControlsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRLaundryWasherControlsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRLaundryWasherControlsEventListListAttributeCallbackSubscriptionBridge + : public MTRLaundryWasherControlsEventListListAttributeCallbackBridge +{ +public: + MTRLaundryWasherControlsEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLaundryWasherControlsEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRLaundryWasherControlsEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLaundryWasherControlsEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRLaundryWasherControlsAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRLaundryWasherControlsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRLaundryWasherControlsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRLaundryWasherControlsAttributeListListAttributeCallbackSubscriptionBridge + : public MTRLaundryWasherControlsAttributeListListAttributeCallbackBridge +{ +public: + MTRLaundryWasherControlsAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLaundryWasherControlsAttributeListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRLaundryWasherControlsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLaundryWasherControlsAttributeListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge : public MTRCallbackBridge { @@ -22033,6 +22250,77 @@ class MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyEnumAttributeCal MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value); +}; + +class MTRLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackSubscriptionBridge + : public MTRLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackBridge +{ +public: + MTRLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRNullableLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRNullableLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRNullableLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; + + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); +}; + +class MTRNullableLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackSubscriptionBridge + : public MTRNullableLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackBridge +{ +public: + MTRNullableLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRNullableLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRAirQualityClusterAirQualityEnumAttributeCallbackBridge : public MTRCallbackBridge { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index 331717c7ff79f0..c310a4534c0228 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -8205,6 +8205,239 @@ } } +void MTRLaundryWasherControlsSpinSpeedsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSString * newElement_0; + newElement_0 = AsString(entry_0); + if (newElement_0 == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + OnFailureFn(context, err); + return; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRLaundryWasherControlsSpinSpeedsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRLaundryWasherControlsSupportedRinsesListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRLaundryWasherControlsSupportedRinsesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRLaundryWasherControlsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRLaundryWasherControlsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRLaundryWasherControlsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRLaundryWasherControlsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRLaundryWasherControlsEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRLaundryWasherControlsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRLaundryWasherControlsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRLaundryWasherControlsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + void MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -21301,6 +21534,56 @@ } } +void MTRLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; + DispatchSuccess(context, objCValue); +}; + +void MTRLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRNullableLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRNullableLaundryWasherControlsClusterNumberOfRinsesEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + void MTRAirQualityClusterAirQualityEnumAttributeCallbackBridge::OnSuccessFn( void * context, chip::app::Clusters::AirQuality::AirQualityEnum value) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 2df51da3a762a6..2d2266e158fccc 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -276,6 +276,7 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeProxyValidID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000044, MTRClusterIDTypeBooleanStateID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000045, MTRClusterIDTypeModeSelectID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000050, + MTRClusterIDTypeLaundryWasherControlsID MTR_NEWLY_AVAILABLE = 0x00000053, MTRClusterIDTypeTemperatureControlID MTR_NEWLY_AVAILABLE = 0x00000056, MTRClusterIDTypeRefrigeratorAlarmID MTR_NEWLY_AVAILABLE = 0x00000057, MTRClusterIDTypeAirQualityID MTR_NEWLY_AVAILABLE = 0x0000005B, @@ -3733,6 +3734,24 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster LaundryWasherControls attributes + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedsID MTR_NEWLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID MTR_NEWLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID MTR_NEWLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSupportedRinsesID MTR_NEWLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeEventListID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeFeatureMapID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterLaundryWasherControlsAttributeClusterRevisionID MTR_NEWLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster TemperatureControl attributes MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID MTR_NEWLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID MTR_NEWLY_AVAILABLE = 0x00000001, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 010e50e7101c93..0734c0058d23cb 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -2803,6 +2803,53 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end +/** + * Cluster Laundry Washer Controls + * This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, + * such as a washing machine. + */ +MTR_NEWLY_AVAILABLE +@interface MTRClusterLaundryWasherControls : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_NEWLY_AVAILABLE; +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeSupportedRinsesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + /** * Cluster Temperature Control * Attributes and commands for configuring the temperature control, and reporting temperature. diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index c689283559ed65..044ac01edafa5c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -12894,6 +12894,141 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params } @end +@implementation MTRClusterLaundryWasherControls + +- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _endpoint = [endpointID unsignedShortValue]; + _device = device; + } + return self; +} + +- (NSDictionary *)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedsID) + params:params]; +} + +- (NSDictionary *)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) + params:params]; +} + +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeSpinSpeedCurrentWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary *)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) + params:params]; +} + +- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeNumberOfRinsesWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary *)readAttributeSupportedRinsesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSupportedRinsesID) + params:params]; +} + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeGeneratedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAcceptedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeEventListID) + params:params]; +} + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID) + params:params]; +} + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeFeatureMapID) + params:params]; +} + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) + attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeClusterRevisionID) + params:params]; +} + +@end + @implementation MTRClusterTemperatureControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h index 835d3e9242c78c..981949ce3a91a4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h @@ -201,6 +201,11 @@ @property (nonatomic, readonly) MTRDevice * device; @end +@interface MTRClusterLaundryWasherControls () +@property (nonatomic, readonly) uint16_t endpoint; +@property (nonatomic, readonly) MTRDevice * device; +@end + @interface MTRClusterTemperatureControl () @property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 168cd090833445..33827be5d552f5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -1554,6 +1554,19 @@ static id _Nullable DecodeEventPayloadForModeSelectCluster(EventId aEventId, TLV *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; return nil; } +static id _Nullable DecodeEventPayloadForLaundryWasherControlsCluster( + EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::LaundryWasherControls; + switch (aEventId) { + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} static id _Nullable DecodeEventPayloadForTemperatureControlCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::TemperatureControl; @@ -3079,6 +3092,9 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead case Clusters::ModeSelect::Id: { return DecodeEventPayloadForModeSelectCluster(aPath.mEventId, aReader, aError); } + case Clusters::LaundryWasherControls::Id: { + return DecodeEventPayloadForLaundryWasherControlsCluster(aPath.mEventId, aReader, aError); + } case Clusters::TemperatureControl::Id: { return DecodeEventPayloadForTemperatureControlCluster(aPath.mEventId, aReader, aError); } 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 701c0febbd9a76..893fb06b852f32 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 @@ -7656,7 +7656,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace RefrigeratorAndTemperatureControlledCabinetMode -namespace WasherControls { +namespace LaundryWasherControls { namespace Attributes { namespace SpinSpeedCurrent { @@ -7666,7 +7666,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & valu using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WasherControls::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (Traits::IsNullValue(temp)) { @@ -7688,7 +7688,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) @@ -7697,7 +7697,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -7714,65 +7714,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace NumberOfRinses { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WasherControls::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_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 emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum * value) { - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace NumberOfRinses - -namespace MaxRinses { - -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 = emberAfReadAttribute(endpoint, Clusters::WasherControls::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -7781,9 +7728,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::LaundryWasherControls::NumberOfRinsesEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -7791,10 +7738,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace MaxRinses +} // namespace NumberOfRinses namespace FeatureMap { @@ -7803,7 +7750,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WasherControls::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -7822,7 +7769,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -7834,7 +7781,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WasherControls::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -7853,13 +7800,13 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace WasherControls +} // namespace LaundryWasherControls namespace RvcRunMode { namespace Attributes { 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 98163c42fbd80a..3a6170ec8d2680 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 @@ -1452,7 +1452,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Attributes } // namespace RefrigeratorAndTemperatureControlledCabinetMode -namespace WasherControls { +namespace LaundryWasherControls { namespace Attributes { namespace SpinSpeedCurrent { @@ -1463,17 +1463,11 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl } // namespace SpinSpeedCurrent namespace NumberOfRinses { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum * value); // NumberOfRinsesEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value); } // namespace NumberOfRinses -namespace MaxRinses { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -} // namespace MaxRinses - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -1485,7 +1479,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace ClusterRevision } // namespace Attributes -} // namespace WasherControls +} // namespace LaundryWasherControls namespace RvcRunMode { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index e54a04a60bfa46..e71de4f5854f5e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -385,13 +385,13 @@ void emberAfLaundryWasherModeClusterInitCallback(chip::EndpointId endpoint); */ void emberAfRefrigeratorAndTemperatureControlledCabinetModeClusterInitCallback(chip::EndpointId endpoint); -/** @brief Washer Controls Cluster Init +/** @brief Laundry Washer Controls Cluster Init * * Cluster Init * * @param endpoint Endpoint that is being initialized */ -void emberAfWasherControlsClusterInitCallback(chip::EndpointId endpoint); +void emberAfLaundryWasherControlsClusterInitCallback(chip::EndpointId endpoint); /** @brief RVC Run Mode Cluster Init * @@ -4494,42 +4494,42 @@ void emberAfRefrigeratorAndTemperatureControlledCabinetModeClusterServerTickCall void emberAfRefrigeratorAndTemperatureControlledCabinetModeClusterClientTickCallback(chip::EndpointId endpoint); // -// Washer Controls Cluster +// Laundry Washer Controls Cluster // -/** @brief Washer Controls Cluster Server Init +/** @brief Laundry Washer Controls Cluster Server Init * * Server Init * * @param endpoint Endpoint that is being initialized */ -void emberAfWasherControlsClusterServerInitCallback(chip::EndpointId endpoint); +void emberAfLaundryWasherControlsClusterServerInitCallback(chip::EndpointId endpoint); -/** @brief Washer Controls Cluster Server Shutdown +/** @brief Laundry Washer Controls Cluster Server Shutdown * * Server Shutdown * * @param endpoint Endpoint that is being shutdown */ -void MatterWasherControlsClusterServerShutdownCallback(chip::EndpointId endpoint); +void MatterLaundryWasherControlsClusterServerShutdownCallback(chip::EndpointId endpoint); -/** @brief Washer Controls Cluster Client Init +/** @brief Laundry Washer Controls Cluster Client Init * * Client Init * * @param endpoint Endpoint that is being initialized */ -void emberAfWasherControlsClusterClientInitCallback(chip::EndpointId endpoint); +void emberAfLaundryWasherControlsClusterClientInitCallback(chip::EndpointId endpoint); -/** @brief Washer Controls Cluster Server Attribute Changed +/** @brief Laundry Washer Controls Cluster Server Attribute Changed * * Server Attribute Changed * * @param attributePath Concrete attribute path that changed */ -void MatterWasherControlsClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); +void MatterLaundryWasherControlsClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); -/** @brief Washer Controls Cluster Server Pre Attribute Changed +/** @brief Laundry Washer Controls Cluster Server Pre Attribute Changed * * Server Pre Attribute Changed * @@ -4538,11 +4538,10 @@ void MatterWasherControlsClusterServerAttributeChangedCallback(const chip::app:: * @param size Attribute size * @param value Attribute value */ -chip::Protocols::InteractionModel::Status -MatterWasherControlsClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, - EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); +chip::Protocols::InteractionModel::Status MatterLaundryWasherControlsClusterServerPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); -/** @brief Washer Controls Cluster Client Pre Attribute Changed +/** @brief Laundry Washer Controls Cluster Client Pre Attribute Changed * * Client Pre Attribute Changed * @@ -4551,25 +4550,24 @@ MatterWasherControlsClusterServerPreAttributeChangedCallback(const chip::app::Co * @param size Attribute size * @param value Attribute value */ -chip::Protocols::InteractionModel::Status -MatterWasherControlsClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, - EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); +chip::Protocols::InteractionModel::Status MatterLaundryWasherControlsClusterClientPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); -/** @brief Washer Controls Cluster Server Tick +/** @brief Laundry Washer Controls Cluster Server Tick * * Server Tick * * @param endpoint Endpoint that is being served */ -void emberAfWasherControlsClusterServerTickCallback(chip::EndpointId endpoint); +void emberAfLaundryWasherControlsClusterServerTickCallback(chip::EndpointId endpoint); -/** @brief Washer Controls Cluster Client Tick +/** @brief Laundry Washer Controls Cluster Client Tick * * Client Tick * * @param endpoint Endpoint that is being served */ -void emberAfWasherControlsClusterClientTickCallback(chip::EndpointId endpoint); +void emberAfLaundryWasherControlsClusterClientTickCallback(chip::EndpointId endpoint); // // RVC Run Mode Cluster diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index 4db5f488faf6aa..29e512d7077f65 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -1265,6 +1265,21 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(RefrigeratorAndTemperat } } +static auto __attribute__((unused)) EnsureKnownEnumValue(LaundryWasherControls::NumberOfRinsesEnum val) +{ + using EnumType = LaundryWasherControls::NumberOfRinsesEnum; + switch (val) + { + case EnumType::kNone: + case EnumType::kNormal: + case EnumType::kExtra: + case EnumType::kMax: + return val; + default: + return static_cast(4); + } +} + static auto __attribute__((unused)) EnsureKnownEnumValue(RvcRunMode::ModeTag val) { using EnumType = RvcRunMode::ModeTag; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index a5d586c35408e0..68f1155d5433d0 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -1519,7 +1519,21 @@ enum class Feature : uint32_t }; } // namespace RefrigeratorAndTemperatureControlledCabinetMode -namespace WasherControls { +namespace LaundryWasherControls { + +// Enum for NumberOfRinsesEnum +enum class NumberOfRinsesEnum : uint8_t +{ + kNone = 0x00, + kNormal = 0x01, + kExtra = 0x02, + kMax = 0x03, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, +}; // Bitmap for Feature enum class Feature : uint32_t @@ -1527,7 +1541,7 @@ enum class Feature : uint32_t kSpin = 0x1, kRinse = 0x2, }; -} // namespace WasherControls +} // namespace LaundryWasherControls namespace RvcRunMode { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index cbc8889a1f265d..edf1be6ff666ef 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -11870,7 +11870,7 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events } // namespace RefrigeratorAndTemperatureControlledCabinetMode -namespace WasherControls { +namespace LaundryWasherControls { namespace Commands {} // namespace Commands @@ -11888,8 +11888,8 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre case Attributes::NumberOfRinses::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, numberOfRinses)); break; - case Attributes::MaxRinses::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, maxRinses)); + case Attributes::SupportedRinses::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, supportedRinses)); break; case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); @@ -11919,7 +11919,7 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace WasherControls +} // namespace LaundryWasherControls namespace RvcRunMode { namespace Structs {} // namespace Structs 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 d6cc21e1bb1ce6..3b906f74c4e5ca 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 @@ -14719,7 +14719,7 @@ struct TypeInfo }; } // namespace Attributes } // namespace RefrigeratorAndTemperatureControlledCabinetMode -namespace WasherControls { +namespace LaundryWasherControls { namespace Attributes { @@ -14730,7 +14730,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::DecodableList; using DecodableArgType = const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SpinSpeeds::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -14742,7 +14742,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SpinSpeedCurrent::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -14750,61 +14750,62 @@ struct TypeInfo namespace NumberOfRinses { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; + using DecodableType = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; + using DecodableArgType = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfRinses::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace NumberOfRinses -namespace MaxRinses { +namespace SupportedRinses { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxRinses::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedRinses::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxRinses +} // namespace SupportedRinses namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace ClusterRevision @@ -14812,14 +14813,15 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::SpinSpeeds::TypeInfo::DecodableType spinSpeeds; Attributes::SpinSpeedCurrent::TypeInfo::DecodableType spinSpeedCurrent; - Attributes::NumberOfRinses::TypeInfo::DecodableType numberOfRinses; - Attributes::MaxRinses::TypeInfo::DecodableType maxRinses = static_cast(0); + Attributes::NumberOfRinses::TypeInfo::DecodableType numberOfRinses = + static_cast(0); + Attributes::SupportedRinses::TypeInfo::DecodableType supportedRinses; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -14829,7 +14831,7 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace WasherControls +} // namespace LaundryWasherControls namespace RvcRunMode { namespace Structs { namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 38b78dafb7ec11..fee87ccb33989c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -2559,7 +2559,7 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace RefrigeratorAndTemperatureControlledCabinetMode -namespace WasherControls { +namespace LaundryWasherControls { namespace Attributes { namespace SpinSpeeds { @@ -2574,9 +2574,9 @@ namespace NumberOfRinses { static constexpr AttributeId Id = 0x00000002; } // namespace NumberOfRinses -namespace MaxRinses { +namespace SupportedRinses { static constexpr AttributeId Id = 0x00000003; -} // namespace MaxRinses +} // namespace SupportedRinses namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; @@ -2603,7 +2603,7 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace ClusterRevision } // namespace Attributes -} // namespace WasherControls +} // namespace LaundryWasherControls namespace RvcRunMode { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h index f744d7c7d6ca2e..2a5feb503189de 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h @@ -157,9 +157,9 @@ static constexpr ClusterId Id = 0x00000051; namespace RefrigeratorAndTemperatureControlledCabinetMode { static constexpr ClusterId Id = 0x00000052; } // namespace RefrigeratorAndTemperatureControlledCabinetMode -namespace WasherControls { +namespace LaundryWasherControls { static constexpr ClusterId Id = 0x00000053; -} // namespace WasherControls +} // namespace LaundryWasherControls namespace RvcRunMode { static constexpr ClusterId Id = 0x00000054; } // namespace RvcRunMode diff --git a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h index 3a09f7b621b6ec..ee050bcdd18c08 100644 --- a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h +++ b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h @@ -307,10 +307,11 @@ #define CHIP_PRINTCLUSTER_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER #endif -#if defined(ZCL_USING_WASHER_CONTROLS_CLUSTER_SERVER) || defined(ZCL_USING_WASHER_CONTROLS_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_WASHER_CONTROLS_CLUSTER { chip::app::Clusters::WasherControls::Id, "Washer Controls" }, +#if defined(ZCL_USING_LAUNDRY_WASHER_CONTROLS_CLUSTER_SERVER) || defined(ZCL_USING_LAUNDRY_WASHER_CONTROLS_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_LAUNDRY_WASHER_CONTROLS_CLUSTER \ + { chip::app::Clusters::LaundryWasherControls::Id, "Laundry Washer Controls" }, #else -#define CHIP_PRINTCLUSTER_WASHER_CONTROLS_CLUSTER +#define CHIP_PRINTCLUSTER_LAUNDRY_WASHER_CONTROLS_CLUSTER #endif #if defined(ZCL_USING_RVC_RUN_MODE_CLUSTER_SERVER) || defined(ZCL_USING_RVC_RUN_MODE_CLUSTER_CLIENT) @@ -979,7 +980,7 @@ CHIP_PRINTCLUSTER_MODE_SELECT_CLUSTER \ CHIP_PRINTCLUSTER_LAUNDRY_WASHER_MODE_CLUSTER \ CHIP_PRINTCLUSTER_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER \ - CHIP_PRINTCLUSTER_WASHER_CONTROLS_CLUSTER \ + CHIP_PRINTCLUSTER_LAUNDRY_WASHER_CONTROLS_CLUSTER \ CHIP_PRINTCLUSTER_RVC_RUN_MODE_CLUSTER \ CHIP_PRINTCLUSTER_RVC_CLEAN_MODE_CLUSTER \ CHIP_PRINTCLUSTER_TEMPERATURE_CONTROL_CLUSTER \ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 7a04aadd325fbb..b25e9cc931ff6e 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -76,7 +76,7 @@ | ModeSelect | 0x0050 | | LaundryWasherMode | 0x0051 | | RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | -| WasherControls | 0x0053 | +| LaundryWasherControls | 0x0053 | | RvcRunMode | 0x0054 | | RvcCleanMode | 0x0055 | | TemperatureControl | 0x0056 | @@ -4189,7 +4189,7 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust }; /*----------------------------------------------------------------------------*\ -| Cluster WasherControls | 0x0053 | +| Cluster LaundryWasherControls | 0x0053 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| @@ -4197,7 +4197,7 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust | * SpinSpeeds | 0x0000 | | * SpinSpeedCurrent | 0x0001 | | * NumberOfRinses | 0x0002 | -| * MaxRinses | 0x0003 | +| * SupportedRinses | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -14847,11 +14847,11 @@ void registerClusterRefrigeratorAndTemperatureControlledCabinetMode(Commands & c commands.Register(clusterName, clusterCommands); } -void registerClusterWasherControls(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterLaundryWasherControls(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::WasherControls; + using namespace chip::app::Clusters::LaundryWasherControls; - const char * clusterName = "WasherControls"; + const char * clusterName = "LaundryWasherControls"; commands_list clusterCommands = { // @@ -14865,7 +14865,7 @@ void registerClusterWasherControls(Commands & commands, CredentialIssuerCommands make_unique(Id, "spin-speeds", Attributes::SpinSpeeds::Id, credsIssuerConfig), // make_unique(Id, "spin-speed-current", Attributes::SpinSpeedCurrent::Id, credsIssuerConfig), // make_unique(Id, "number-of-rinses", Attributes::NumberOfRinses::Id, credsIssuerConfig), // - make_unique(Id, "max-rinses", Attributes::MaxRinses::Id, credsIssuerConfig), // + make_unique(Id, "supported-rinses", Attributes::SupportedRinses::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -14878,10 +14878,11 @@ void registerClusterWasherControls(Commands & commands, CredentialIssuerCommands make_unique>>(Id, "spin-speed-current", 0, UINT8_MAX, Attributes::SpinSpeedCurrent::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>( + make_unique>( Id, "number-of-rinses", 0, UINT8_MAX, Attributes::NumberOfRinses::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "max-rinses", 0, UINT8_MAX, Attributes::MaxRinses::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "supported-rinses", Attributes::SupportedRinses::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -14899,7 +14900,7 @@ void registerClusterWasherControls(Commands & commands, CredentialIssuerCommands make_unique(Id, "spin-speeds", Attributes::SpinSpeeds::Id, credsIssuerConfig), // make_unique(Id, "spin-speed-current", Attributes::SpinSpeedCurrent::Id, credsIssuerConfig), // make_unique(Id, "number-of-rinses", Attributes::NumberOfRinses::Id, credsIssuerConfig), // - make_unique(Id, "max-rinses", Attributes::MaxRinses::Id, credsIssuerConfig), // + make_unique(Id, "supported-rinses", Attributes::SupportedRinses::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -24610,7 +24611,7 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterModeSelect(commands, credsIssuerConfig); registerClusterLaundryWasherMode(commands, credsIssuerConfig); registerClusterRefrigeratorAndTemperatureControlledCabinetMode(commands, credsIssuerConfig); - registerClusterWasherControls(commands, credsIssuerConfig); + registerClusterLaundryWasherControls(commands, credsIssuerConfig); registerClusterRvcRunMode(commands, credsIssuerConfig); registerClusterRvcCleanMode(commands, credsIssuerConfig); registerClusterTemperatureControl(commands, credsIssuerConfig); 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 49aaf4c0949ead..a520f57b9e31e0 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -8049,55 +8049,55 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case WasherControls::Id: { + case LaundryWasherControls::Id: { switch (path.mAttributeId) { - case WasherControls::Attributes::SpinSpeeds::Id: { + case LaundryWasherControls::Attributes::SpinSpeeds::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SpinSpeeds", 1, value); } - case WasherControls::Attributes::SpinSpeedCurrent::Id: { + case LaundryWasherControls::Attributes::SpinSpeedCurrent::Id: { chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SpinSpeedCurrent", 1, value); } - case WasherControls::Attributes::NumberOfRinses::Id: { - chip::app::DataModel::Nullable value; + case LaundryWasherControls::Attributes::NumberOfRinses::Id: { + chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("NumberOfRinses", 1, value); } - case WasherControls::Attributes::MaxRinses::Id: { - uint8_t value; + case LaundryWasherControls::Attributes::SupportedRinses::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("MaxRinses", 1, value); + return DataModelLogger::LogValue("SupportedRinses", 1, value); } - case WasherControls::Attributes::GeneratedCommandList::Id: { + case LaundryWasherControls::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case WasherControls::Attributes::AcceptedCommandList::Id: { + case LaundryWasherControls::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case WasherControls::Attributes::EventList::Id: { + case LaundryWasherControls::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case WasherControls::Attributes::AttributeList::Id: { + case LaundryWasherControls::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case WasherControls::Attributes::FeatureMap::Id: { + case LaundryWasherControls::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case WasherControls::Attributes::ClusterRevision::Id: { + case LaundryWasherControls::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index e6dae230c52c7b..447cd00ab9d15f 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -79,7 +79,7 @@ | ModeSelect | 0x0050 | | LaundryWasherMode | 0x0051 | | RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | -| WasherControls | 0x0053 | +| LaundryWasherControls | 0x0053 | | RvcRunMode | 0x0054 | | RvcCleanMode | 0x0055 | | TemperatureControl | 0x0056 | @@ -40595,6 +40595,806 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster LaundryWasherControls | 0x0053 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SpinSpeeds | 0x0000 | +| * SpinSpeedCurrent | 0x0001 | +| * NumberOfRinses | 0x0002 | +| * SupportedRinses | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Attribute SpinSpeeds + */ +class ReadLaundryWasherControlsSpinSpeeds : public ReadAttribute { +public: + ReadLaundryWasherControlsSpinSpeeds() + : ReadAttribute("spin-speeds") + { + } + + ~ReadLaundryWasherControlsSpinSpeeds() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSpinSpeedsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); + if (error != nil) { + LogNSError("LaundryWasherControls SpinSpeeds read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherControlsSpinSpeeds() + : SubscribeAttribute("spin-speeds") + { + } + + ~SubscribeAttributeLaundryWasherControlsSpinSpeeds() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x00000000) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeSpinSpeedsWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute SpinSpeedCurrent + */ +class ReadLaundryWasherControlsSpinSpeedCurrent : public ReadAttribute { +public: + ReadLaundryWasherControlsSpinSpeedCurrent() + : ReadAttribute("spin-speed-current") + { + } + + ~ReadLaundryWasherControlsSpinSpeedCurrent() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x00000001) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSpinSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); + if (error != nil) { + LogNSError("LaundryWasherControls SpinSpeedCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteLaundryWasherControlsSpinSpeedCurrent : public WriteAttribute { +public: + WriteLaundryWasherControlsSpinSpeedCurrent() + : WriteAttribute("spin-speed-current") + { + AddArgument("attr-name", "spin-speed-current"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteLaundryWasherControlsSpinSpeedCurrent() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) WriteAttribute (0x00000001) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeSpinSpeedCurrentWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LaundryWasherControls SpinSpeedCurrent write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() + : SubscribeAttribute("spin-speed-current") + { + } + + ~SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x00000001) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeSpinSpeedCurrentWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute NumberOfRinses + */ +class ReadLaundryWasherControlsNumberOfRinses : public ReadAttribute { +public: + ReadLaundryWasherControlsNumberOfRinses() + : ReadAttribute("number-of-rinses") + { + } + + ~ReadLaundryWasherControlsNumberOfRinses() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x00000002) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeNumberOfRinsesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); + if (error != nil) { + LogNSError("LaundryWasherControls NumberOfRinses read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteLaundryWasherControlsNumberOfRinses : public WriteAttribute { +public: + WriteLaundryWasherControlsNumberOfRinses() + : WriteAttribute("number-of-rinses") + { + AddArgument("attr-name", "number-of-rinses"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteLaundryWasherControlsNumberOfRinses() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) WriteAttribute (0x00000002) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeNumberOfRinsesWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LaundryWasherControls NumberOfRinses write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherControlsNumberOfRinses() + : SubscribeAttribute("number-of-rinses") + { + } + + ~SubscribeAttributeLaundryWasherControlsNumberOfRinses() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x00000002) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeNumberOfRinsesWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute SupportedRinses + */ +class ReadLaundryWasherControlsSupportedRinses : public ReadAttribute { +public: + ReadLaundryWasherControlsSupportedRinses() + : ReadAttribute("supported-rinses") + { + } + + ~ReadLaundryWasherControlsSupportedRinses() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x00000003) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSupportedRinsesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); + if (error != nil) { + LogNSError("LaundryWasherControls SupportedRinses read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherControlsSupportedRinses() + : SubscribeAttribute("supported-rinses") + { + } + + ~SubscribeAttributeLaundryWasherControlsSupportedRinses() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x00000003) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeSupportedRinsesWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute GeneratedCommandList + */ +class ReadLaundryWasherControlsGeneratedCommandList : public ReadAttribute { +public: + ReadLaundryWasherControlsGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadLaundryWasherControlsGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("LaundryWasherControls GeneratedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherControlsGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeLaundryWasherControlsGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AcceptedCommandList + */ +class ReadLaundryWasherControlsAcceptedCommandList : public ReadAttribute { +public: + ReadLaundryWasherControlsAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadLaundryWasherControlsAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("LaundryWasherControls AcceptedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherControlsAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeLaundryWasherControlsAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute EventList + */ +class ReadLaundryWasherControlsEventList : public ReadAttribute { +public: + ReadLaundryWasherControlsEventList() + : ReadAttribute("event-list") + { + } + + ~ReadLaundryWasherControlsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.EventList response %@", [value description]); + if (error != nil) { + LogNSError("LaundryWasherControls EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherControlsEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeLaundryWasherControlsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AttributeList + */ +class ReadLaundryWasherControlsAttributeList : public ReadAttribute { +public: + ReadLaundryWasherControlsAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadLaundryWasherControlsAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); + if (error != nil) { + LogNSError("LaundryWasherControls AttributeList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherControlsAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeLaundryWasherControlsAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute FeatureMap + */ +class ReadLaundryWasherControlsFeatureMap : public ReadAttribute { +public: + ReadLaundryWasherControlsFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadLaundryWasherControlsFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); + if (error != nil) { + LogNSError("LaundryWasherControls FeatureMap read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherControlsFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeLaundryWasherControlsFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ClusterRevision + */ +class ReadLaundryWasherControlsClusterRevision : public ReadAttribute { +public: + ReadLaundryWasherControlsClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadLaundryWasherControlsClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); + if (error != nil) { + LogNSError("LaundryWasherControls ClusterRevision read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherControlsClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeLaundryWasherControlsClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /*----------------------------------------------------------------------------*\ | Cluster TemperatureControl | 0x0056 | |------------------------------------------------------------------------------| @@ -123351,6 +124151,43 @@ void registerClusterModeSelect(Commands & commands) commands.Register(clusterName, clusterCommands); } +void registerClusterLaundryWasherControls(Commands & commands) +{ + using namespace chip::app::Clusters::LaundryWasherControls; + + const char * clusterName = "LaundryWasherControls"; + + commands_list clusterCommands = { + make_unique(Id), // + make_unique(Id), // + make_unique(), // + make_unique(Id), // + make_unique(Id), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterTemperatureControl(Commands & commands) { using namespace chip::app::Clusters::TemperatureControl; @@ -126297,6 +127134,7 @@ void registerClusters(Commands & commands) registerClusterUserLabel(commands); registerClusterBooleanState(commands); registerClusterModeSelect(commands); + registerClusterLaundryWasherControls(commands); registerClusterTemperatureControl(commands); registerClusterRefrigeratorAlarm(commands); registerClusterAirQuality(commands);