From 334753331323ba21f96556227dc44cae041030af Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Tue, 16 Jan 2024 15:47:33 +0000 Subject: [PATCH 01/21] Depricated the OnMode attribute for the RvcRunMode and RvcCleanMode clusters. --- .../zcl/data-model/chip/rvc-clean-mode-cluster.xml | 2 +- .../zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml index 03725f92756c56..bf1d9b27136a26 100644 --- a/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml @@ -41,7 +41,7 @@ limitations under the License. SupportedModes CurrentMode - OnMode + diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml index 9f102dd8b63b15..bd3af542c0bcdb 100644 --- a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml @@ -48,7 +48,7 @@ limitations under the License. SupportedModes CurrentMode - OnMode + From 27b55bf1540d4c908df3948e848527c2046ce78a Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Tue, 16 Jan 2024 15:51:49 +0000 Subject: [PATCH 02/21] Depricated the OnOff feature for the RvcRunMode and RvcCleanMode clusters. --- .../zap-templates/zcl/data-model/chip/mode-base-cluster.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml index 2bf3905b7f34c5..848e3eee913322 100644 --- a/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml @@ -86,8 +86,7 @@ This is because zap does not currently support generating code for clusters that - - + From 28a3beadeda31b58efffc1ddb2064f9acbe4c030 Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Tue, 16 Jan 2024 15:55:38 +0000 Subject: [PATCH 03/21] Depricated the Start and Stop commands for the RvcOperationalState cluster. --- .../zcl/data-model/chip/operational-state-rvc-cluster.xml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml index 8f19a21cf1bc59..7c1c12e3fae3c2 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml @@ -64,13 +64,9 @@ both values from this cluster and from the base cluster. Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. - - Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. - + - - Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. - + Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). From 6d96609ee71c80518cffa4f9edcee4f5864db17b Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Tue, 16 Jan 2024 16:03:10 +0000 Subject: [PATCH 04/21] Removed the depricated OnMode attributes from the attributeAccessInterfaceAttributes. --- src/app/zap-templates/zcl/zcl-with-test-extensions.json | 2 -- src/app/zap-templates/zcl/zcl.json | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index ecbcea088f51b5..07a35592689705 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -367,13 +367,11 @@ "RVC Clean Mode": [ "SupportedModes", "CurrentMode", - "OnMode", "FeatureMap" ], "RVC Run Mode": [ "SupportedModes", "CurrentMode", - "OnMode", "FeatureMap" ], "Operational State": [ diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 80b9ff7bbd84f9..e613dabd43fa1e 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -365,13 +365,11 @@ "RVC Clean Mode": [ "SupportedModes", "CurrentMode", - "OnMode", "FeatureMap" ], "RVC Run Mode": [ "SupportedModes", "CurrentMode", - "OnMode", "FeatureMap" ], "Operational State": [ From 63b3ee6ed140c701e1d26e669dc361b5bf927f1f Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Tue, 16 Jan 2024 16:10:51 +0000 Subject: [PATCH 05/21] Removed the RvcOpState tests for the Start and stop command. --- src/app/tests/suites/TestRVCOperationalState.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/app/tests/suites/TestRVCOperationalState.yaml b/src/app/tests/suites/TestRVCOperationalState.yaml index de40e7f6088be1..239e770abc216b 100644 --- a/src/app/tests/suites/TestRVCOperationalState.yaml +++ b/src/app/tests/suites/TestRVCOperationalState.yaml @@ -73,11 +73,6 @@ tests: response: value: 0 - - label: "Start Command" - command: "Start" - response: - error: UNSUPPORTED_COMMAND - - label: "Read current Operational State" command: "readAttribute" attribute: "OperationalState" @@ -110,11 +105,6 @@ tests: response: value: 0 - - label: "Stop Command" - command: "Stop" - response: - error: UNSUPPORTED_COMMAND - - label: "Read current Operational State" command: "readAttribute" attribute: "OperationalState" From 0088e84591067af8765479e828a4fc814927e684 Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Tue, 16 Jan 2024 16:14:46 +0000 Subject: [PATCH 06/21] regenerated zap code. --- .../all-clusters-app.matter | 16 - ...ode_roboticvacuumcleaner_1807ff0c49.matter | 18 - examples/rvc-app/rvc-common/rvc-app.matter | 14 - .../data_model/controller-clusters.matter | 14 - .../chip/devicecontroller/ChipClusters.java | 130 ------ .../devicecontroller/ClusterIDMapping.java | 4 - .../devicecontroller/ClusterInfoMapping.java | 66 --- .../devicecontroller/ClusterReadMapping.java | 22 - .../devicecontroller/ClusterWriteMapping.java | 44 -- .../cluster/clusters/RvcCleanModeCluster.kt | 154 ------- .../clusters/RvcOperationalStateCluster.kt | 84 ---- .../cluster/clusters/RvcRunModeCluster.kt | 154 ------- .../CHIPAttributeTLVValueDecoder.cpp | 46 --- .../zap-generated/CHIPClustersWrite-JNI.cpp | 120 ------ .../java/zap-generated/CHIPReadCallbacks.cpp | 130 ------ .../python/chip/clusters/CHIPClusters.py | 26 -- .../python/chip/clusters/Objects.py | 70 ---- .../MTRAttributeSpecifiedCheck.mm | 6 - .../MTRAttributeTLVValueDecoder.mm | 30 -- .../CHIP/zap-generated/MTRBaseClusters.h | 40 -- .../CHIP/zap-generated/MTRBaseClusters.mm | 194 --------- .../CHIP/zap-generated/MTRClusterConstants.h | 4 - .../CHIP/zap-generated/MTRClusters.h | 14 - .../CHIP/zap-generated/MTRClusters.mm | 94 ----- .../zap-generated/MTRCommandPayloadsObjc.h | 56 --- .../zap-generated/MTRCommandPayloadsObjc.mm | 146 ------- .../MTRCommandPayloads_Internal.h | 12 - .../app-common/zap-generated/cluster-enums.h | 12 - .../zap-generated/cluster-objects.cpp | 44 -- .../zap-generated/cluster-objects.h | 92 ----- .../app-common/zap-generated/ids/Attributes.h | 8 - .../app-common/zap-generated/ids/Commands.h | 8 - .../zap-generated/cluster/Commands.h | 86 ---- .../cluster/logging/DataModelLogger.cpp | 10 - .../zap-generated/cluster/Commands.h | 384 ------------------ .../zap-generated/test/Commands.h | 94 +---- 36 files changed, 18 insertions(+), 2428 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index aa4e2f6e5ad2ba..5275f8d6c52461 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -3055,10 +3055,6 @@ cluster RvcRunMode = 84 { kBatteryLow = 72; } - bitmap Feature : bitmap32 { - kOnOff = 0x1; - } - struct ModeTagStruct { optional vendor_id mfgCode = 0; enum16 value = 1; @@ -3072,7 +3068,6 @@ cluster RvcRunMode = 84 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3108,10 +3103,6 @@ cluster RvcCleanMode = 85 { kCleaningInProgress = 64; } - bitmap Feature : bitmap32 { - kOnOff = 0x1; - } - struct ModeTagStruct { optional vendor_id mfgCode = 0; enum16 value = 1; @@ -3125,7 +3116,6 @@ cluster RvcCleanMode = 85 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3607,10 +3597,6 @@ cluster RvcOperationalState = 97 { /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ command Pause(): OperationalCommandResponse = 0; - /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ - command Stop(): OperationalCommandResponse = 1; - /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ - command Start(): OperationalCommandResponse = 2; /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ command Resume(): OperationalCommandResponse = 3; } @@ -7346,7 +7332,6 @@ endpoint 1 { server cluster RvcRunMode { callback attribute supportedModes; callback attribute currentMode; - callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -7360,7 +7345,6 @@ endpoint 1 { server cluster RvcCleanMode { callback attribute supportedModes; callback attribute currentMode; - callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index cea46e31fad3fc..47e1976632fbcd 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -1019,10 +1019,6 @@ cluster RvcRunMode = 84 { kBatteryLow = 72; } - bitmap Feature : bitmap32 { - kOnOff = 0x1; - } - struct ModeTagStruct { optional vendor_id mfgCode = 0; enum16 value = 1; @@ -1036,7 +1032,6 @@ cluster RvcRunMode = 84 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1072,10 +1067,6 @@ cluster RvcCleanMode = 85 { kCleaningInProgress = 64; } - bitmap Feature : bitmap32 { - kOnOff = 0x1; - } - struct ModeTagStruct { optional vendor_id mfgCode = 0; enum16 value = 1; @@ -1089,7 +1080,6 @@ cluster RvcCleanMode = 85 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1172,10 +1162,6 @@ cluster RvcOperationalState = 97 { /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ command Pause(): OperationalCommandResponse = 0; - /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ - command Stop(): OperationalCommandResponse = 1; - /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ - command Start(): OperationalCommandResponse = 2; /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ command Resume(): OperationalCommandResponse = 3; } @@ -1408,7 +1394,6 @@ endpoint 1 { server cluster RvcRunMode { callback attribute supportedModes; callback attribute currentMode; - callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -1423,7 +1408,6 @@ endpoint 1 { server cluster RvcCleanMode { callback attribute supportedModes; callback attribute currentMode; - callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -1452,8 +1436,6 @@ endpoint 1 { ram attribute clusterRevision default = 1; handle command Pause; - handle command Stop; - handle command Start; handle command Resume; handle command OperationalCommandResponse; } diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 6db104d8eac315..4b66f9317041af 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -942,10 +942,6 @@ cluster RvcRunMode = 84 { kBatteryLow = 72; } - bitmap Feature : bitmap32 { - kOnOff = 0x1; - } - struct ModeTagStruct { optional vendor_id mfgCode = 0; enum16 value = 1; @@ -959,7 +955,6 @@ cluster RvcRunMode = 84 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -995,10 +990,6 @@ cluster RvcCleanMode = 85 { kCleaningInProgress = 64; } - bitmap Feature : bitmap32 { - kOnOff = 0x1; - } - struct ModeTagStruct { optional vendor_id mfgCode = 0; enum16 value = 1; @@ -1012,7 +1003,6 @@ cluster RvcCleanMode = 85 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1095,10 +1085,6 @@ cluster RvcOperationalState = 97 { /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ command Pause(): OperationalCommandResponse = 0; - /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ - command Stop(): OperationalCommandResponse = 1; - /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ - command Start(): OperationalCommandResponse = 2; /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ command Resume(): OperationalCommandResponse = 3; } diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 32f85159295d80..8fbea675e668be 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3312,10 +3312,6 @@ cluster RvcRunMode = 84 { kBatteryLow = 72; } - bitmap Feature : bitmap32 { - kOnOff = 0x1; - } - struct ModeTagStruct { optional vendor_id mfgCode = 0; enum16 value = 1; @@ -3329,7 +3325,6 @@ cluster RvcRunMode = 84 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3365,10 +3360,6 @@ cluster RvcCleanMode = 85 { kCleaningInProgress = 64; } - bitmap Feature : bitmap32 { - kOnOff = 0x1; - } - struct ModeTagStruct { optional vendor_id mfgCode = 0; enum16 value = 1; @@ -3382,7 +3373,6 @@ cluster RvcCleanMode = 85 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3896,10 +3886,6 @@ cluster RvcOperationalState = 97 { /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ command Pause(): OperationalCommandResponse = 0; - /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ - command Stop(): OperationalCommandResponse = 1; - /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ - command Start(): OperationalCommandResponse = 2; /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ command Resume(): OperationalCommandResponse = 3; } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index f050f7e1428d6a..7a68cd8c20e51b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -22407,7 +22407,6 @@ public static class RvcRunModeCluster extends BaseChipCluster { private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; - private static final long ON_MODE_ATTRIBUTE_ID = 3L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -22470,10 +22469,6 @@ public interface SupportedModesAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public interface OnModeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -22540,40 +22535,6 @@ public void onSuccess(byte[] tlv) { }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOnModeAttribute( - OnModeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ON_MODE_ATTRIBUTE_ID, true); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(callback, value, 0); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval); - } - public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); @@ -22730,7 +22691,6 @@ public static class RvcCleanModeCluster extends BaseChipCluster { private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; - private static final long ON_MODE_ATTRIBUTE_ID = 3L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -22793,10 +22753,6 @@ public interface SupportedModesAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public interface OnModeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -22863,40 +22819,6 @@ public void onSuccess(byte[] tlv) { }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOnModeAttribute( - OnModeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ON_MODE_ATTRIBUTE_ID, true); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(callback, value, 0); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval); - } - public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); @@ -26271,58 +26193,6 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void stop(OperationalCommandResponseCallback callback) { - stop(callback, 0); - } - - public void stop(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 1L; - - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long commandResponseStateFieldID = 0L; - ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == commandResponseStateFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Struct) { - StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); - } - } - } - callback.onSuccess(commandResponseState); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void start(OperationalCommandResponseCallback callback) { - start(callback, 0); - } - - public void start(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 2L; - - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long commandResponseStateFieldID = 0L; - ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == commandResponseStateFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Struct) { - StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); - } - } - } - callback.onSuccess(commandResponseState); - }}, commandId, value, timedInvokeTimeoutMs); - } - public void resume(OperationalCommandResponseCallback callback) { resume(callback, 0); } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 2e712af09006a4..ee783e13527bca 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -7142,7 +7142,6 @@ public long getID() { public enum Attribute { SupportedModes(0L), CurrentMode(1L), - OnMode(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -7263,7 +7262,6 @@ public long getID() { public enum Attribute { SupportedModes(0L), CurrentMode(1L), - OnMode(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -8509,8 +8507,6 @@ public static Event value(long id) throws NoSuchFieldError { public enum Command { Pause(0L), - Stop(1L), - Start(2L), Resume(3L),; private final long id; Command(long id) { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index 94cda4091ba5dc..4abf107252ccb8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -7942,27 +7942,6 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcRunModeClusterOnModeAttributeCallback implements ChipClusters.RvcRunModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedRvcRunModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcRunModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -8092,27 +8071,6 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcCleanModeClusterOnModeAttributeCallback implements ChipClusters.RvcCleanModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedRvcCleanModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcCleanModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -22872,30 +22830,6 @@ public Map> getCommandMap() { ); rvcOperationalStateClusterInteractionInfoMap.put("pause", rvcOperationalStatepauseInteractionInfo); - Map rvcOperationalStatestopCommandParams = new LinkedHashMap(); - InteractionInfo rvcOperationalStatestopInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.RvcOperationalStateCluster) cluster) - .stop((ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback) callback - ); - }, - () -> new DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback(), - rvcOperationalStatestopCommandParams - ); - rvcOperationalStateClusterInteractionInfoMap.put("stop", rvcOperationalStatestopInteractionInfo); - - Map rvcOperationalStatestartCommandParams = new LinkedHashMap(); - InteractionInfo rvcOperationalStatestartInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.RvcOperationalStateCluster) cluster) - .start((ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback) callback - ); - }, - () -> new DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback(), - rvcOperationalStatestartCommandParams - ); - rvcOperationalStateClusterInteractionInfoMap.put("start", rvcOperationalStatestartInteractionInfo); - Map rvcOperationalStateresumeCommandParams = new LinkedHashMap(); InteractionInfo rvcOperationalStateresumeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 16c71818bad11c..fc68ba00de1f23 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -6965,17 +6965,6 @@ private static Map readRvcRunModeInteractionInfo() { readRvcRunModeCurrentModeCommandParams ); result.put("readCurrentModeAttribute", readRvcRunModeCurrentModeAttributeInteractionInfo); - Map readRvcRunModeOnModeCommandParams = new LinkedHashMap(); - InteractionInfo readRvcRunModeOnModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.RvcRunModeCluster) cluster).readOnModeAttribute( - (ChipClusters.RvcRunModeCluster.OnModeAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedRvcRunModeClusterOnModeAttributeCallback(), - readRvcRunModeOnModeCommandParams - ); - result.put("readOnModeAttribute", readRvcRunModeOnModeAttributeInteractionInfo); Map readRvcRunModeGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readRvcRunModeGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7068,17 +7057,6 @@ private static Map readRvcCleanModeInteractionInfo() { readRvcCleanModeCurrentModeCommandParams ); result.put("readCurrentModeAttribute", readRvcCleanModeCurrentModeAttributeInteractionInfo); - Map readRvcCleanModeOnModeCommandParams = new LinkedHashMap(); - InteractionInfo readRvcCleanModeOnModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.RvcCleanModeCluster) cluster).readOnModeAttribute( - (ChipClusters.RvcCleanModeCluster.OnModeAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedRvcCleanModeClusterOnModeAttributeCallback(), - readRvcCleanModeOnModeCommandParams - ); - result.put("readOnModeAttribute", readRvcCleanModeOnModeAttributeInteractionInfo); Map readRvcCleanModeGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readRvcCleanModeGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index 6373b57b8bef14..833038599d1285 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -983,52 +983,8 @@ public Map> getWriteAttributeMap() { writeLaundryWasherControlsInteractionInfo.put("writeNumberOfRinsesAttribute", writeLaundryWasherControlsNumberOfRinsesAttributeInteractionInfo); writeAttributeMap.put("laundryWasherControls", writeLaundryWasherControlsInteractionInfo); Map writeRvcRunModeInteractionInfo = new LinkedHashMap<>(); - Map writeRvcRunModeOnModeCommandParams = new LinkedHashMap(); - CommandParameterInfo rvcRunModeonModeCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeRvcRunModeOnModeCommandParams.put( - "value", - rvcRunModeonModeCommandParameterInfo - ); - InteractionInfo writeRvcRunModeOnModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.RvcRunModeCluster) cluster).writeOnModeAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeRvcRunModeOnModeCommandParams - ); - writeRvcRunModeInteractionInfo.put("writeOnModeAttribute", writeRvcRunModeOnModeAttributeInteractionInfo); writeAttributeMap.put("rvcRunMode", writeRvcRunModeInteractionInfo); Map writeRvcCleanModeInteractionInfo = new LinkedHashMap<>(); - Map writeRvcCleanModeOnModeCommandParams = new LinkedHashMap(); - CommandParameterInfo rvcCleanModeonModeCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeRvcCleanModeOnModeCommandParams.put( - "value", - rvcCleanModeonModeCommandParameterInfo - ); - InteractionInfo writeRvcCleanModeOnModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.RvcCleanModeCluster) cluster).writeOnModeAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeRvcCleanModeOnModeCommandParams - ); - writeRvcCleanModeInteractionInfo.put("writeOnModeAttribute", writeRvcCleanModeOnModeAttributeInteractionInfo); writeAttributeMap.put("rvcCleanMode", writeRvcCleanModeInteractionInfo); Map writeTemperatureControlInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("temperatureControl", writeTemperatureControlInteractionInfo); diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcCleanModeCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcCleanModeCluster.kt index fc06787142bc87..cf21074dc5fefb 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcCleanModeCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcCleanModeCluster.kt @@ -32,9 +32,6 @@ import matter.controller.SubscriptionState import matter.controller.UByteSubscriptionState import matter.controller.UIntSubscriptionState import matter.controller.UShortSubscriptionState -import matter.controller.WriteRequest -import matter.controller.WriteRequests -import matter.controller.WriteResponse import matter.controller.cluster.structs.* import matter.controller.model.AttributePath import matter.controller.model.CommandPath @@ -60,16 +57,6 @@ class RvcCleanModeCluster( object SubscriptionEstablished : SupportedModesAttributeSubscriptionState() } - class OnModeAttribute(val value: UByte?) - - sealed class OnModeAttributeSubscriptionState { - data class Success(val value: UByte?) : OnModeAttributeSubscriptionState() - - data class Error(val exception: Exception) : OnModeAttributeSubscriptionState() - - object SubscriptionEstablished : OnModeAttributeSubscriptionState() - } - class GeneratedCommandListAttribute(val value: List) sealed class GeneratedCommandListAttributeSubscriptionState { @@ -352,147 +339,6 @@ class RvcCleanModeCluster( } } - suspend fun readOnModeAttribute(): OnModeAttribute { - val ATTRIBUTE_ID: UInt = 3u - - val attributePath = - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - - val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) - - val response = controller.read(readRequest) - - if (response.successes.isEmpty()) { - logger.log(Level.WARNING, "Read command failed") - throw IllegalStateException("Read command failed with failures: ${response.failures}") - } - - logger.log(Level.FINE, "Read command succeeded") - - val attributeData = - response.successes.filterIsInstance().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Onmode attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - return OnModeAttribute(decodedValue) - } - - suspend fun writeOnModeAttribute(value: UByte, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 3u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded() - ) - ), - timedRequest = timedWriteTimeout - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeOnModeAttribute( - minInterval: Int, - maxInterval: Int - ): Flow { - val ATTRIBUTE_ID: UInt = 3u - val attributePaths = - listOf( - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - ) - - val subscribeRequest: SubscribeRequest = - SubscribeRequest( - eventPaths = emptyList(), - attributePaths = attributePaths, - minInterval = Duration.ofSeconds(minInterval.toLong()), - maxInterval = Duration.ofSeconds(maxInterval.toLong()) - ) - - return controller.subscribe(subscribeRequest).transform { subscriptionState -> - when (subscriptionState) { - is SubscriptionState.SubscriptionErrorNotification -> { - emit( - OnModeAttributeSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Onmode attribute not found in Node State update" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - decodedValue?.let { emit(OnModeAttributeSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(OnModeAttributeSubscriptionState.SubscriptionEstablished) - } - } - } - } - suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { val ATTRIBUTE_ID: UInt = 65528u diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcOperationalStateCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcOperationalStateCluster.kt index 0513f78d1b0e38..6090e9c3d57cb3 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcOperationalStateCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcOperationalStateCluster.kt @@ -184,90 +184,6 @@ class RvcOperationalStateCluster( return OperationalCommandResponse(commandResponseState_decoded) } - suspend fun stop(timedInvokeTimeout: Duration? = null): OperationalCommandResponse { - val commandId: UInt = 1u - - val tlvWriter = TlvWriter() - tlvWriter.startStructure(AnonymousTag) - tlvWriter.endStructure() - - val request: InvokeRequest = - InvokeRequest( - CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), - tlvPayload = tlvWriter.getEncoded(), - timedRequest = timedInvokeTimeout - ) - - val response: InvokeResponse = controller.invoke(request) - logger.log(Level.FINE, "Invoke command succeeded: ${response}") - - val tlvReader = TlvReader(response.payload) - tlvReader.enterStructure(AnonymousTag) - val TAG_COMMAND_RESPONSE_STATE: Int = 0 - var commandResponseState_decoded: RvcOperationalStateClusterErrorStateStruct? = null - - while (!tlvReader.isEndOfContainer()) { - val tag = tlvReader.peekElement().tag - - if (tag == ContextSpecificTag(TAG_COMMAND_RESPONSE_STATE)) { - commandResponseState_decoded = - RvcOperationalStateClusterErrorStateStruct.fromTlv(tag, tlvReader) - } else { - tlvReader.skipElement() - } - } - - if (commandResponseState_decoded == null) { - throw IllegalStateException("commandResponseState not found in TLV") - } - - tlvReader.exitContainer() - - return OperationalCommandResponse(commandResponseState_decoded) - } - - suspend fun start(timedInvokeTimeout: Duration? = null): OperationalCommandResponse { - val commandId: UInt = 2u - - val tlvWriter = TlvWriter() - tlvWriter.startStructure(AnonymousTag) - tlvWriter.endStructure() - - val request: InvokeRequest = - InvokeRequest( - CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), - tlvPayload = tlvWriter.getEncoded(), - timedRequest = timedInvokeTimeout - ) - - val response: InvokeResponse = controller.invoke(request) - logger.log(Level.FINE, "Invoke command succeeded: ${response}") - - val tlvReader = TlvReader(response.payload) - tlvReader.enterStructure(AnonymousTag) - val TAG_COMMAND_RESPONSE_STATE: Int = 0 - var commandResponseState_decoded: RvcOperationalStateClusterErrorStateStruct? = null - - while (!tlvReader.isEndOfContainer()) { - val tag = tlvReader.peekElement().tag - - if (tag == ContextSpecificTag(TAG_COMMAND_RESPONSE_STATE)) { - commandResponseState_decoded = - RvcOperationalStateClusterErrorStateStruct.fromTlv(tag, tlvReader) - } else { - tlvReader.skipElement() - } - } - - if (commandResponseState_decoded == null) { - throw IllegalStateException("commandResponseState not found in TLV") - } - - tlvReader.exitContainer() - - return OperationalCommandResponse(commandResponseState_decoded) - } - suspend fun resume(timedInvokeTimeout: Duration? = null): OperationalCommandResponse { val commandId: UInt = 3u diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcRunModeCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcRunModeCluster.kt index 2297e2fb439d4e..05237cd481e136 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcRunModeCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcRunModeCluster.kt @@ -32,9 +32,6 @@ import matter.controller.SubscriptionState import matter.controller.UByteSubscriptionState import matter.controller.UIntSubscriptionState import matter.controller.UShortSubscriptionState -import matter.controller.WriteRequest -import matter.controller.WriteRequests -import matter.controller.WriteResponse import matter.controller.cluster.structs.* import matter.controller.model.AttributePath import matter.controller.model.CommandPath @@ -57,16 +54,6 @@ class RvcRunModeCluster(private val controller: MatterController, private val en object SubscriptionEstablished : SupportedModesAttributeSubscriptionState() } - class OnModeAttribute(val value: UByte?) - - sealed class OnModeAttributeSubscriptionState { - data class Success(val value: UByte?) : OnModeAttributeSubscriptionState() - - data class Error(val exception: Exception) : OnModeAttributeSubscriptionState() - - object SubscriptionEstablished : OnModeAttributeSubscriptionState() - } - class GeneratedCommandListAttribute(val value: List) sealed class GeneratedCommandListAttributeSubscriptionState { @@ -349,147 +336,6 @@ class RvcRunModeCluster(private val controller: MatterController, private val en } } - suspend fun readOnModeAttribute(): OnModeAttribute { - val ATTRIBUTE_ID: UInt = 3u - - val attributePath = - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - - val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) - - val response = controller.read(readRequest) - - if (response.successes.isEmpty()) { - logger.log(Level.WARNING, "Read command failed") - throw IllegalStateException("Read command failed with failures: ${response.failures}") - } - - logger.log(Level.FINE, "Read command succeeded") - - val attributeData = - response.successes.filterIsInstance().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Onmode attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - return OnModeAttribute(decodedValue) - } - - suspend fun writeOnModeAttribute(value: UByte, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 3u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded() - ) - ), - timedRequest = timedWriteTimeout - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeOnModeAttribute( - minInterval: Int, - maxInterval: Int - ): Flow { - val ATTRIBUTE_ID: UInt = 3u - val attributePaths = - listOf( - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - ) - - val subscribeRequest: SubscribeRequest = - SubscribeRequest( - eventPaths = emptyList(), - attributePaths = attributePaths, - minInterval = Duration.ofSeconds(minInterval.toLong()), - maxInterval = Duration.ofSeconds(maxInterval.toLong()) - ) - - return controller.subscribe(subscribeRequest).transform { subscriptionState -> - when (subscriptionState) { - is SubscriptionState.SubscriptionErrorNotification -> { - emit( - OnModeAttributeSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Onmode attribute not found in Node State update" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - decodedValue?.let { emit(OnModeAttributeSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(OnModeAttributeSubscriptionState.SubscriptionEstablished) - } - } - } - } - suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { val ATTRIBUTE_ID: UInt = 65528u diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 58fb6a4bdd6646..3a9320397f49aa 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -15279,29 +15279,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -15567,29 +15544,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index bbb1d9df9158c1..882d3057965d61 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -2876,126 +2876,6 @@ JNI_METHOD(void, LaundryWasherControlsCluster, writeNumberOfRinsesAttribute) onFailure.release(); } -JNI_METHOD(void, RvcRunModeCluster, writeOnModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::RvcRunMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - RvcRunModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, RvcCleanModeCluster, writeOnModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - RvcCleanModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - JNI_METHOD(void, DishwasherModeCluster, writeStartUpModeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index fbfd2968e4217b..ad7622f9c92c27 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -24074,71 +24074,6 @@ void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcRunModeOnModeAttributeCallback::CHIPRvcRunModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcRunModeOnModeAttributeCallback::~CHIPRvcRunModeOnModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcRunModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - CHIPRvcRunModeGeneratedCommandListAttributeCallback::CHIPRvcRunModeGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) @@ -24573,71 +24508,6 @@ void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcCleanModeOnModeAttributeCallback::CHIPRvcCleanModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRvcCleanModeOnModeAttributeCallback::~CHIPRvcCleanModeOnModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRvcCleanModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CHIPRvcCleanModeGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 7954593df97171..5e8dc9ffd3c1a4 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -5010,13 +5010,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x00000003: { - "attributeName": "OnMode", - "attributeId": 0x00000003, - "type": "int", - "reportable": True, - "writable": True, - }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, @@ -5080,13 +5073,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x00000003: { - "attributeName": "OnMode", - "attributeId": 0x00000003, - "type": "int", - "reportable": True, - "writable": True, - }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, @@ -5873,18 +5859,6 @@ class ChipClusters: "args": { }, }, - 0x00000001: { - "commandId": 0x00000001, - "commandName": "Stop", - "args": { - }, - }, - 0x00000002: { - "commandId": 0x00000002, - "commandName": "Start", - "args": { - }, - }, 0x00000003: { "commandId": 0x00000003, "commandName": "Resume", diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 9d62cf5eba9b40..0b495044ab3e53 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -17392,7 +17392,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[RvcRunMode.Structs.ModeOptionStruct]), ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), 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]), @@ -17403,7 +17402,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: supportedModes: 'typing.List[RvcRunMode.Structs.ModeOptionStruct]' = None currentMode: 'uint' = None - onMode: 'typing.Union[None, Nullable, uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -17437,10 +17435,6 @@ class StatusCode(MatterIntEnum): # prone, and was removed. See # src/app/common/templates/config-data.yaml. - class Bitmaps: - class Feature(IntFlag): - kOnOff = 0x1 - class Structs: @dataclass class ModeTagStruct(ClusterObject): @@ -17538,22 +17532,6 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 - @dataclass - class OnMode(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000054 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000003 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None - @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -17661,7 +17639,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[RvcCleanMode.Structs.ModeOptionStruct]), ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), 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]), @@ -17672,7 +17649,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: supportedModes: 'typing.List[RvcCleanMode.Structs.ModeOptionStruct]' = None currentMode: 'uint' = None - onMode: 'typing.Union[None, Nullable, uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -17699,10 +17675,6 @@ class StatusCode(MatterIntEnum): # prone, and was removed. See # src/app/common/templates/config-data.yaml. - class Bitmaps: - class Feature(IntFlag): - kOnOff = 0x1 - class Structs: @dataclass class ModeTagStruct(ClusterObject): @@ -17800,22 +17772,6 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 - @dataclass - class OnMode(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000055 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000003 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None - @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -20646,32 +20602,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ]) - @dataclass - class Stop(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000061 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'OperationalCommandResponse' - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - - @dataclass - class Start(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000061 - command_id: typing.ClassVar[int] = 0x00000002 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'OperationalCommandResponse' - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - @dataclass class Resume(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000061 diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index b8c6f1a59ac4bb..eaba6e59d6eb9f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -2250,9 +2250,6 @@ static BOOL AttributeIsSpecifiedInRVCRunModeCluster(AttributeId aAttributeId) case Attributes::CurrentMode::Id: { return YES; } - case Attributes::OnMode::Id: { - return YES; - } case Attributes::GeneratedCommandList::Id: { return YES; } @@ -2286,9 +2283,6 @@ static BOOL AttributeIsSpecifiedInRVCCleanModeCluster(AttributeId aAttributeId) case Attributes::CurrentMode::Id: { return YES; } - case Attributes::OnMode::Id: { - return YES; - } case Attributes::GeneratedCommandList::Id: { return YES; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 20633dafe53b0c..546392d3c19d81 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -6124,21 +6124,6 @@ static id _Nullable DecodeAttributeValueForRVCRunModeCluster(AttributeId aAttrib value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::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; - } default: { break; } @@ -6217,21 +6202,6 @@ static id _Nullable DecodeAttributeValueForRVCCleanModeCluster(AttributeId aAttr value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::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; - } default: { break; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index e599bc3d82f804..d340fa996b1bea 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -5594,14 +5594,6 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -5683,14 +5675,6 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -6666,22 +6650,6 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (void)pauseWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -/** - * Command Stop - * - * Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. - */ -- (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)stopWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -/** - * Command Start - * - * Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. - */ -- (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)startWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; /** * Command Resume * @@ -16844,10 +16812,6 @@ typedef NS_ENUM(uint8_t, MTRRVCRunModeStatusCode) { MTRRVCRunModeStatusCodeBatteryLow MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x48, } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -typedef NS_OPTIONS(uint32_t, MTRRVCRunModeFeature) { - MTRRVCRunModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - typedef NS_ENUM(uint16_t, MTRRVCCleanModeModeTag) { MTRRVCCleanModeModeTagDeepClean MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4000, MTRRVCCleanModeModeTagVacuum MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4001, @@ -16858,10 +16822,6 @@ typedef NS_ENUM(uint8_t, MTRRVCCleanModeStatusCode) { MTRRVCCleanModeStatusCodeCleaningInProgress MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x40, } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -typedef NS_OPTIONS(uint32_t, MTRRVCCleanModeFeature) { - MTRRVCCleanModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - typedef NS_OPTIONS(uint32_t, MTRTemperatureControlFeature) { MTRTemperatureControlFeatureTemperatureNumber MTR_PROVISIONALLY_AVAILABLE = 0x1, MTRTemperatureControlFeatureTemperatureLevel MTR_PROVISIONALLY_AVAILABLE = 0x2, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index c91da32da25ad3..bba2f7ce27e858 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -42956,75 +42956,6 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnModeWithValue:(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 = RvcRunMode::Attributes::OnMode::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)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; @@ -43342,75 +43273,6 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnModeWithValue:(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 = RvcCleanMode::Attributes::OnMode::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)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; @@ -47615,62 +47477,6 @@ - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)pa queue:self.callbackQueue completion:responseHandler]; } -- (void)stopWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self stopWithParams:nil completion:completion]; -} -- (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRRVCOperationalStateClusterStopParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = RvcOperationalState::Commands::Stop::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)startWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self startWithParams:nil completion:completion]; -} -- (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRRVCOperationalStateClusterStartParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = RvcOperationalState::Commands::Start::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - (void)resumeWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { [self resumeWithParams:nil completion:completion]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 7c46f6315692cb..0d792bed3ab7a5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -2401,7 +2401,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster RVCRunMode attributes MTRAttributeIDTypeClusterRVCRunModeAttributeSupportedModesID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000000, MTRAttributeIDTypeClusterRVCRunModeAttributeCurrentModeID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000001, - MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterRVCRunModeAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterRVCRunModeAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterRVCRunModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, @@ -2412,7 +2411,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster RVCCleanMode attributes MTRAttributeIDTypeClusterRVCCleanModeAttributeSupportedModesID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000000, MTRAttributeIDTypeClusterRVCCleanModeAttributeCurrentModeID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000001, - MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterRVCCleanModeAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterRVCCleanModeAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterRVCCleanModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, @@ -6264,8 +6262,6 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { // Cluster RVCOperationalState commands MTRCommandIDTypeClusterRVCOperationalStateCommandPauseID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000000, - MTRCommandIDTypeClusterRVCOperationalStateCommandStopID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRCommandIDTypeClusterRVCOperationalStateCommandStartID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, MTRCommandIDTypeClusterRVCOperationalStateCommandResumeID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000003, MTRCommandIDTypeClusterRVCOperationalStateCommandOperationalCommandResponseID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000004, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 605c522bb489c1..874b7fab89129e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -2621,10 +2621,6 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @@ -2667,10 +2663,6 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @@ -3159,12 +3151,6 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (void)pauseWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)stopWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)startWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (void)resumeWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index ae9159d82900a2..e95bfb0e0017c7 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -7546,22 +7546,6 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeCurrentModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) params:params]; -} - -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeGeneratedCommandListID) params:params]; @@ -7633,22 +7617,6 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeCurrentModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) params:params]; -} - -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeGeneratedCommandListID) params:params]; @@ -8598,68 +8566,6 @@ - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)pa completion:responseHandler]; } -- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRRVCOperationalStateClusterStopParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = RvcOperationalState::Commands::Stop::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)startWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self startWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRRVCOperationalStateClusterStartParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = RvcOperationalState::Commands::Start::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - - (void)resumeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { [self resumeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 5f90f0d869be60..b6f02b41e149ff 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -5436,62 +5436,6 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRRVCOperationalStateClusterStopParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - -MTR_PROVISIONALLY_AVAILABLE -@interface MTRRVCOperationalStateClusterStartParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @interface MTRRVCOperationalStateClusterResumeParams : NSObject /** diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 4090cfe1b4ed09..638e3849c338a3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -14919,152 +14919,6 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRRVCOperationalStateClusterStopParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRRVCOperationalStateClusterStopParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRRVCOperationalStateClusterStopParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::RvcOperationalState::Commands::Stop::Type encodableStruct; - ListFreer listFreer; - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); -} - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; - } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - } - return decodedObj; -} -@end - -@implementation MTRRVCOperationalStateClusterStartParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRRVCOperationalStateClusterStartParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRRVCOperationalStateClusterStartParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::RvcOperationalState::Commands::Start::Type encodableStruct; - ListFreer listFreer; - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); -} - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; - } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - } - return decodedObj; -} -@end - @implementation MTRRVCOperationalStateClusterResumeParams - (instancetype)init { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index f2f3b125a44afd..a4fc3c4d1b4070 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -958,18 +958,6 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface MTRRVCOperationalStateClusterStopParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - -@interface MTRRVCOperationalStateClusterStartParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - @interface MTRRVCOperationalStateClusterResumeParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; 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 a7957243e3149e..272dcc694c44c3 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 @@ -1723,12 +1723,6 @@ enum class StatusCode : uint8_t // prone, and was removed. See // src/app/common/templates/config-data.yaml. }; - -// Bitmap for Feature -enum class Feature : uint32_t -{ - kOnOff = 0x1, -}; } // namespace RvcRunMode namespace RvcCleanMode { @@ -1756,12 +1750,6 @@ enum class StatusCode : uint8_t // prone, and was removed. See // src/app/common/templates/config-data.yaml. }; - -// Bitmap for Feature -enum class Feature : uint32_t -{ - kOnOff = 0x1, -}; } // namespace RvcCleanMode namespace TemperatureControl { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 834f1faa123612..5e5e426fe6d303 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 @@ -11844,8 +11844,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, supportedModes); case Attributes::CurrentMode::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, currentMode); - case Attributes::OnMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, onMode); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -11955,8 +11953,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, supportedModes); case Attributes::CurrentMode::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, currentMode); - case Attributes::OnMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, onMode); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -13246,46 +13242,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace Pause. -namespace Stop { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - } -} -} // namespace Stop. -namespace Start { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - } -} -} // namespace Start. namespace Resume { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { 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 c4fc5f675fae30..5b65664bea20b6 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 @@ -16325,18 +16325,6 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CurrentMode -namespace OnMode { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace OnMode namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -16384,7 +16372,6 @@ struct TypeInfo Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); - Attributes::OnMode::TypeInfo::DecodableType onMode; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -16514,18 +16501,6 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CurrentMode -namespace OnMode { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace OnMode namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -16573,7 +16548,6 @@ struct TypeInfo Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); - Attributes::OnMode::TypeInfo::DecodableType onMode; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -18755,16 +18729,6 @@ struct Type; struct DecodableType; } // namespace Pause -namespace Stop { -struct Type; -struct DecodableType; -} // namespace Stop - -namespace Start { -struct Type; -struct DecodableType; -} // namespace Start - namespace Resume { struct Type; struct DecodableType; @@ -18806,62 +18770,6 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Pause -namespace Stop { -enum class Fields : uint8_t -{ -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace Stop -namespace Start { -enum class Fields : uint8_t -{ -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Start::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::Start::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace Start namespace Resume { enum class Fields : uint8_t { 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 4038c9c9c41723..ea3ac711185a44 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 @@ -2836,10 +2836,6 @@ namespace CurrentMode { static constexpr AttributeId Id = 0x00000001; } // namespace CurrentMode -namespace OnMode { -static constexpr AttributeId Id = 0x00000003; -} // namespace OnMode - namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList @@ -2878,10 +2874,6 @@ namespace CurrentMode { static constexpr AttributeId Id = 0x00000001; } // namespace CurrentMode -namespace OnMode { -static constexpr AttributeId Id = 0x00000003; -} // namespace OnMode - namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 4aa2dada3394fb..18a7717288767c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -874,14 +874,6 @@ namespace Pause { static constexpr CommandId Id = 0x00000000; } // namespace Pause -namespace Stop { -static constexpr CommandId Id = 0x00000001; -} // namespace Stop - -namespace Start { -static constexpr CommandId Id = 0x00000002; -} // namespace Start - namespace Resume { static constexpr CommandId Id = 0x00000003; } // namespace Resume diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index a7645ac8f0c77f..4d223057ef17f9 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -5353,7 +5353,6 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | -| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -5410,7 +5409,6 @@ class RvcRunModeChangeToMode : public ClusterCommand | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | -| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -6087,8 +6085,6 @@ class OperationalStateResume : public ClusterCommand |------------------------------------------------------------------------------| | Commands: | | | * Pause | 0x00 | -| * Stop | 0x01 | -| * Start | 0x02 | | * Resume | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | @@ -6146,78 +6142,6 @@ class RvcOperationalStatePause : public ClusterCommand chip::app::Clusters::RvcOperationalState::Commands::Pause::Type mRequest; }; -/* - * Command Stop - */ -class RvcOperationalStateStop : public ClusterCommand -{ -public: - RvcOperationalStateStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Stop::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Stop::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::RvcOperationalState::Commands::Stop::Type mRequest; -}; - -/* - * Command Start - */ -class RvcOperationalStateStart : public ClusterCommand -{ -public: - RvcOperationalStateStart(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Start::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Start::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::RvcOperationalState::Commands::Start::Type mRequest; -}; - /* * Command Resume */ @@ -18323,7 +18247,6 @@ void registerClusterRvcRunMode(Commands & commands, CredentialIssuerCommands * c make_unique(Id, credsIssuerConfig), // make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::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), // @@ -18336,8 +18259,6 @@ void registerClusterRvcRunMode(Commands & commands, CredentialIssuerCommands * c Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, - WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -18354,7 +18275,6 @@ void registerClusterRvcRunMode(Commands & commands, CredentialIssuerCommands * c make_unique(Id, credsIssuerConfig), // make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::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), // @@ -18388,7 +18308,6 @@ void registerClusterRvcCleanMode(Commands & commands, CredentialIssuerCommands * make_unique(Id, credsIssuerConfig), // make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::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), // @@ -18401,8 +18320,6 @@ void registerClusterRvcCleanMode(Commands & commands, CredentialIssuerCommands * Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, - WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -18419,7 +18336,6 @@ void registerClusterRvcCleanMode(Commands & commands, CredentialIssuerCommands * make_unique(Id, credsIssuerConfig), // make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::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), // @@ -19142,8 +19058,6 @@ void registerClusterRvcOperationalState(Commands & commands, CredentialIssuerCom // make_unique(Id, credsIssuerConfig), // make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // // // Attributes 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 2da87471d0a3c0..54338c36abec29 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -10771,11 +10771,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("CurrentMode", 1, value); } - case RvcRunMode::Attributes::OnMode::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OnMode", 1, value); - } case RvcRunMode::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); @@ -10822,11 +10817,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("CurrentMode", 1, value); } - case RvcCleanMode::Attributes::OnMode::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OnMode", 1, value); - } case RvcCleanMode::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, 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 8b7c3cfbf53724..aaa75eb741c6d5 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -58884,7 +58884,6 @@ class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeA | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | -| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -59112,136 +59111,6 @@ class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { } }; -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute OnMode - */ -class ReadRvcRunModeOnMode : public ReadAttribute { -public: - ReadRvcRunModeOnMode() - : ReadAttribute("on-mode") - { - } - - ~ReadRvcRunModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.OnMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RVCRunMode OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteRvcRunModeOnMode : public WriteAttribute { -public: - WriteRvcRunModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteRvcRunModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode 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 = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("RVCRunMode OnMode write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeRvcRunModeOnMode : public SubscribeAttribute { -public: - SubscribeAttributeRvcRunModeOnMode() - : SubscribeAttribute("on-mode") - { - } - - ~SubscribeAttributeRvcRunModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode 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 subscribeAttributeOnModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.OnMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -59747,7 +59616,6 @@ class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | -| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -59975,136 +59843,6 @@ class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { } }; -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute OnMode - */ -class ReadRvcCleanModeOnMode : public ReadAttribute { -public: - ReadRvcCleanModeOnMode() - : ReadAttribute("on-mode") - { - } - - ~ReadRvcCleanModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.OnMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RVCCleanMode OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteRvcCleanModeOnMode : public WriteAttribute { -public: - WriteRvcCleanModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteRvcCleanModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode 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 = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("RVCCleanMode OnMode write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeRvcCleanModeOnMode : public SubscribeAttribute { -public: - SubscribeAttributeRvcCleanModeOnMode() - : SubscribeAttribute("on-mode") - { - } - - ~SubscribeAttributeRvcCleanModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode 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 subscribeAttributeOnModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.OnMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -69876,8 +69614,6 @@ class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttrib |------------------------------------------------------------------------------| | Commands: | | | * Pause | 0x00 | -| * Stop | 0x01 | -| * Start | 0x02 | | * Resume | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | @@ -69949,110 +69685,6 @@ class RvcOperationalStatePause : public ClusterCommand { private: }; -#if MTR_ENABLE_PROVISIONAL -/* - * Command Stop - */ -class RvcOperationalStateStop : public ClusterCommand { -public: - RvcOperationalStateStop() - : ClusterCommand("stop") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Stop::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCOperationalStateClusterStopParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopWithParams:params completion: - ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command Start - */ -class RvcOperationalStateStart : public ClusterCommand { -public: - RvcOperationalStateStart() - : ClusterCommand("start") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Start::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCOperationalStateClusterStartParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster startWithParams:params completion: - ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL /* * Command Resume */ @@ -177931,11 +177563,6 @@ void registerClusterRvcRunMode(Commands & commands) make_unique(), // make_unique(), // make_unique(), // -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // make_unique(), // @@ -177970,11 +177597,6 @@ void registerClusterRvcCleanMode(Commands & commands) make_unique(), // make_unique(), // make_unique(), // -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // make_unique(), // @@ -178559,12 +178181,6 @@ void registerClusterRvcOperationalState(Commands & commands) commands_list clusterCommands = { make_unique(Id), // make_unique(), // -#if MTR_ENABLE_PROVISIONAL - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(Id), // make_unique(Id), // diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index fcffb2ec55a525..7260d5c23f945c 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -163365,37 +163365,29 @@ class TestRVCOperationalState : public TestCommandBridge { err = TestReadCurrentOperationalState_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Start Command\n"); - err = TestStartCommand_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read current Operational State\n"); + err = TestReadCurrentOperationalState_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read current Operational State\n"); - err = TestReadCurrentOperationalState_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Pause Command\n"); + err = TestPauseCommand_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Pause Command\n"); - err = TestPauseCommand_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Read current Operational State\n"); + err = TestReadCurrentOperationalState_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read current Operational State\n"); - err = TestReadCurrentOperationalState_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Resume Command\n"); + err = TestResumeCommand_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Resume Command\n"); - err = TestResumeCommand_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Read current Operational State\n"); + err = TestReadCurrentOperationalState_11(); break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Read current Operational State\n"); err = TestReadCurrentOperationalState_12(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Stop Command\n"); - err = TestStopCommand_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read current Operational State\n"); - err = TestReadCurrentOperationalState_14(); - break; } if (CHIP_NO_ERROR != err) { @@ -163429,7 +163421,7 @@ class TestRVCOperationalState : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -163446,12 +163438,6 @@ class TestRVCOperationalState : public TestCommandBridge { case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -163462,7 +163448,7 @@ class TestRVCOperationalState : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 15; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; @@ -163646,29 +163632,7 @@ class TestRVCOperationalState : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStartCommand_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster startWithCompletion: - ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable err) { - if (err != nil) { - NSLog(@"Start Command: Error: %@", err); - } else { - NSLog(@"Start Command: Success"); - } - - VerifyOrReturn(CheckValue("status", err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadCurrentOperationalState_8() + CHIP_ERROR TestReadCurrentOperationalState_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -163695,7 +163659,7 @@ class TestRVCOperationalState : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPauseCommand_9() + CHIP_ERROR TestPauseCommand_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -163723,7 +163687,7 @@ class TestRVCOperationalState : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadCurrentOperationalState_10() + CHIP_ERROR TestReadCurrentOperationalState_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -163750,7 +163714,7 @@ class TestRVCOperationalState : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestResumeCommand_11() + CHIP_ERROR TestResumeCommand_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -163778,7 +163742,7 @@ class TestRVCOperationalState : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadCurrentOperationalState_12() + CHIP_ERROR TestReadCurrentOperationalState_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -163805,29 +163769,7 @@ class TestRVCOperationalState : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStopCommand_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster stopWithCompletion: - ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable err) { - if (err != nil) { - NSLog(@"Stop Command: Error: %@", err); - } else { - NSLog(@"Stop Command: Success"); - } - - VerifyOrReturn(CheckValue("status", err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadCurrentOperationalState_14() + CHIP_ERROR TestReadCurrentOperationalState_12() { MTRBaseDevice * device = GetDevice("alpha"); From ac33a606db3f08f9f36ded31a01b27de5f165eab Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 16 Jan 2024 16:23:00 +0000 Subject: [PATCH 07/21] Restyled by prettier-json --- .../zap-templates/zcl/zcl-with-test-extensions.json | 12 ++---------- src/app/zap-templates/zcl/zcl.json | 12 ++---------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index 07a35592689705..f2af0221560d7c 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -364,16 +364,8 @@ "OnMode", "FeatureMap" ], - "RVC Clean Mode": [ - "SupportedModes", - "CurrentMode", - "FeatureMap" - ], - "RVC Run Mode": [ - "SupportedModes", - "CurrentMode", - "FeatureMap" - ], + "RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"], + "RVC Run Mode": ["SupportedModes", "CurrentMode", "FeatureMap"], "Operational State": [ "OperationalState", "OperationalError", diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index e613dabd43fa1e..3f7bf455c774b3 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -362,16 +362,8 @@ "OnMode", "FeatureMap" ], - "RVC Clean Mode": [ - "SupportedModes", - "CurrentMode", - "FeatureMap" - ], - "RVC Run Mode": [ - "SupportedModes", - "CurrentMode", - "FeatureMap" - ], + "RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"], + "RVC Run Mode": ["SupportedModes", "CurrentMode", "FeatureMap"], "Operational State": [ "OperationalState", "OperationalError", From af83ffb731a1e5b50a1c28a138ccde441b9c12fb Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Wed, 17 Jan 2024 13:15:54 +0000 Subject: [PATCH 08/21] Added back the feature map for the RvcClean and RvcRun mode clusters without the OnOff feature. --- .../zap-templates/zcl/data-model/chip/mode-base-cluster.xml | 2 +- .../zcl/data-model/chip/rvc-clean-mode-cluster.xml | 6 ++++++ .../zcl/data-model/chip/rvc-run-mode-cluster.xml | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml index 848e3eee913322..86961d968c8741 100644 --- a/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml @@ -82,11 +82,11 @@ This is because zap does not currently support generating code for clusters that + - diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml index bf1d9b27136a26..8addf088eb580c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml @@ -60,4 +60,10 @@ limitations under the License. + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml index bd3af542c0bcdb..4c481d26b9c4a4 100644 --- a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml @@ -67,4 +67,10 @@ limitations under the License. + + + + + + From 66a1d0fd55667a5302ada54df491c99b01eabd64 Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Wed, 17 Jan 2024 13:19:17 +0000 Subject: [PATCH 09/21] Regenerated files. --- .../all-clusters-common/all-clusters-app.matter | 6 ++++++ .../rootnode_roboticvacuumcleaner_1807ff0c49.matter | 6 ++++++ examples/rvc-app/rvc-common/rvc-app.matter | 6 ++++++ src/controller/data_model/controller-clusters.matter | 6 ++++++ src/controller/python/chip/clusters/Objects.py | 6 ++++++ .../Framework/CHIP/zap-generated/MTRBaseClusters.h | 6 ++++++ .../app-common/zap-generated/cluster-enums.h | 10 ++++++++++ 7 files changed, 46 insertions(+) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 5275f8d6c52461..7f97e57dbb1d13 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -3055,6 +3055,9 @@ cluster RvcRunMode = 84 { kBatteryLow = 72; } + bitmap Feature : bitmap32 { + } + struct ModeTagStruct { optional vendor_id mfgCode = 0; enum16 value = 1; @@ -3103,6 +3106,9 @@ cluster RvcCleanMode = 85 { kCleaningInProgress = 64; } + bitmap Feature : bitmap32 { + } + struct ModeTagStruct { optional vendor_id mfgCode = 0; enum16 value = 1; diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index 47e1976632fbcd..12a506f4c9154e 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -1019,6 +1019,9 @@ cluster RvcRunMode = 84 { kBatteryLow = 72; } + bitmap Feature : bitmap32 { + } + struct ModeTagStruct { optional vendor_id mfgCode = 0; enum16 value = 1; @@ -1067,6 +1070,9 @@ cluster RvcCleanMode = 85 { kCleaningInProgress = 64; } + bitmap Feature : bitmap32 { + } + struct ModeTagStruct { optional vendor_id mfgCode = 0; enum16 value = 1; diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 4b66f9317041af..a079162e7681e1 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -942,6 +942,9 @@ cluster RvcRunMode = 84 { kBatteryLow = 72; } + bitmap Feature : bitmap32 { + } + struct ModeTagStruct { optional vendor_id mfgCode = 0; enum16 value = 1; @@ -990,6 +993,9 @@ cluster RvcCleanMode = 85 { kCleaningInProgress = 64; } + bitmap Feature : bitmap32 { + } + struct ModeTagStruct { optional vendor_id mfgCode = 0; enum16 value = 1; diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 8fbea675e668be..a661cb0e105d7f 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3312,6 +3312,9 @@ cluster RvcRunMode = 84 { kBatteryLow = 72; } + bitmap Feature : bitmap32 { + } + struct ModeTagStruct { optional vendor_id mfgCode = 0; enum16 value = 1; @@ -3360,6 +3363,9 @@ cluster RvcCleanMode = 85 { kCleaningInProgress = 64; } + bitmap Feature : bitmap32 { + } + struct ModeTagStruct { optional vendor_id mfgCode = 0; enum16 value = 1; diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 0b495044ab3e53..5249354f14ef3a 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -17435,6 +17435,9 @@ class StatusCode(MatterIntEnum): # prone, and was removed. See # src/app/common/templates/config-data.yaml. + class Bitmaps: + class Feature(IntFlag): + class Structs: @dataclass class ModeTagStruct(ClusterObject): @@ -17675,6 +17678,9 @@ class StatusCode(MatterIntEnum): # prone, and was removed. See # src/app/common/templates/config-data.yaml. + class Bitmaps: + class Feature(IntFlag): + class Structs: @dataclass class ModeTagStruct(ClusterObject): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index d340fa996b1bea..3e23eee92c1b86 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -16812,6 +16812,9 @@ typedef NS_ENUM(uint8_t, MTRRVCRunModeStatusCode) { MTRRVCRunModeStatusCodeBatteryLow MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x48, } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +typedef NS_OPTIONS(uint32_t, MTRRVCRunModeFeature) { +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); + typedef NS_ENUM(uint16_t, MTRRVCCleanModeModeTag) { MTRRVCCleanModeModeTagDeepClean MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4000, MTRRVCCleanModeModeTagVacuum MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4001, @@ -16822,6 +16825,9 @@ typedef NS_ENUM(uint8_t, MTRRVCCleanModeStatusCode) { MTRRVCCleanModeStatusCodeCleaningInProgress MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x40, } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +typedef NS_OPTIONS(uint32_t, MTRRVCCleanModeFeature) { +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); + typedef NS_OPTIONS(uint32_t, MTRTemperatureControlFeature) { MTRTemperatureControlFeatureTemperatureNumber MTR_PROVISIONALLY_AVAILABLE = 0x1, MTRTemperatureControlFeatureTemperatureLevel MTR_PROVISIONALLY_AVAILABLE = 0x2, 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 272dcc694c44c3..70b1163b22d9f7 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 @@ -1723,6 +1723,11 @@ enum class StatusCode : uint8_t // prone, and was removed. See // src/app/common/templates/config-data.yaml. }; + +// Bitmap for Feature +enum class Feature : uint32_t +{ +}; } // namespace RvcRunMode namespace RvcCleanMode { @@ -1750,6 +1755,11 @@ enum class StatusCode : uint8_t // prone, and was removed. See // src/app/common/templates/config-data.yaml. }; + +// Bitmap for Feature +enum class Feature : uint32_t +{ +}; } // namespace RvcCleanMode namespace TemperatureControl { From 8869972146fc847393aa840b14a8f3de2e05da04 Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Wed, 17 Jan 2024 14:29:17 +0000 Subject: [PATCH 10/21] Updated the all-clusters-app zap file. --- .../all-clusters-common/all-clusters-app.zap | 90 +++++++++---------- 1 file changed, 41 insertions(+), 49 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index fabe40ca88f598..be893db6083eeb 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -9470,11 +9470,11 @@ "reportableChange": 0 }, { - "name": "OnMode", - "code": 3, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -9486,8 +9486,8 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -9502,8 +9502,8 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", "type": "array", @@ -9511,7 +9511,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -9626,11 +9626,11 @@ "reportableChange": 0 }, { - "name": "OnMode", - "code": 3, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -9642,8 +9642,8 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -9658,8 +9658,8 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", "type": "array", @@ -9667,7 +9667,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11214,6 +11214,14 @@ "source": "server", "isIncoming": 0, "isEnabled": 1 + }, + { + "name": "GoHome", + "code": 128, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ @@ -11345,6 +11353,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -11840,7 +11864,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12259,22 +12283,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "LevelStep", - "code": 10, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "GeneratedCommandList", "code": 65528, @@ -20043,22 +20051,6 @@ "source": "client", "isIncoming": 1, "isEnabled": 1 - }, - { - "name": "TestBatchHelperRequest", - "code": 22, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "TestSecondBatchHelperRequest", - "code": 23, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 } ], "attributes": [ From 3eaadf442b5ab911723b845bd5c6d7c783c7e935 Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Wed, 17 Jan 2024 14:35:06 +0000 Subject: [PATCH 11/21] Regenerated the matter file for the all-clusters-app. --- .../all-clusters-common/all-clusters-app.matter | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 7f97e57dbb1d13..ffdf3185a76841 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -7340,6 +7340,7 @@ endpoint 1 { callback attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 2; @@ -7353,6 +7354,7 @@ endpoint 1 { callback attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 2; @@ -7500,6 +7502,7 @@ endpoint 1 { callback attribute operationalError; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -7576,7 +7579,6 @@ endpoint 1 { ram attribute targetLevel; persist attribute defaultOpenLevel default = 100; ram attribute valveFault default = 0; - ram attribute levelStep default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -8261,8 +8263,6 @@ endpoint 1 { handle command TestSimpleOptionalArgumentRequest; handle command TestEmitTestEventRequest; handle command TestEmitTestFabricScopedEventRequest; - handle command TestBatchHelperRequest; - handle command TestSecondBatchHelperRequest; } } endpoint 2 { From 8fe32aea5f86a58a247a75a12ea32ee2e6756872 Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Wed, 17 Jan 2024 15:16:55 +0000 Subject: [PATCH 12/21] Removed the setting of the OnOff feature in instances of RvcRunMode and RvcCleanMode in the all-clusters-app --- .../all-clusters-app/all-clusters-common/src/rvc-modes.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp index 480c8f793ceb4d..491bb962350243 100644 --- a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp @@ -26,6 +26,8 @@ template using List = chip::app::DataModel::List; using ModeTagStructType = chip::app::Clusters::detail::Structs::ModeTagStruct::Type; +const uint32_t NO_FEATURES = 0; + // RVC Run static RvcRunModeDelegate * gRvcRunModeDelegate = nullptr; @@ -113,7 +115,7 @@ void emberAfRvcRunModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(gRvcRunModeDelegate == nullptr && gRvcRunModeInstance == nullptr); gRvcRunModeDelegate = new RvcRunMode::RvcRunModeDelegate; gRvcRunModeInstance = - new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, chip::to_underlying(RvcRunMode::Feature::kOnOff)); + new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, NO_FEATURES); gRvcRunModeInstance->Init(); } @@ -202,6 +204,6 @@ void emberAfRvcCleanModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(gRvcCleanModeDelegate == nullptr && gRvcCleanModeInstance == nullptr); gRvcCleanModeDelegate = new RvcCleanMode::RvcCleanModeDelegate; gRvcCleanModeInstance = - new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, chip::to_underlying(RvcCleanMode::Feature::kOnOff)); + new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, NO_FEATURES); gRvcCleanModeInstance->Init(); } From 98750a7b7f83834344e1d4a61ca093d632fa7b25 Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Mon, 22 Jan 2024 17:13:00 +0000 Subject: [PATCH 13/21] Regenerated zap files. --- .../generated/java/chip/devicecontroller/ClusterIDMapping.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 4ae341249b24e9..b877102067dcc7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -8229,8 +8229,6 @@ public static Event value(long id) throws NoSuchFieldError { public enum Command { Pause(0L), - Stop(1L), - Start(2L), Resume(3L), GoHome(128L),; private final long id; From 7a058621e6b1b0045d5310fce123492c70c8dbd3 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 25 Jan 2024 15:02:48 +0000 Subject: [PATCH 14/21] Restyled by clang-format --- .../all-clusters-app/all-clusters-common/src/rvc-modes.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp index 92e2d027d5bfd6..adc982bdccb4d6 100644 --- a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp @@ -114,8 +114,7 @@ void emberAfRvcRunModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(gRvcRunModeDelegate == nullptr && gRvcRunModeInstance == nullptr); gRvcRunModeDelegate = new RvcRunMode::RvcRunModeDelegate; - gRvcRunModeInstance = - new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, NO_FEATURES); + gRvcRunModeInstance = new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, NO_FEATURES); gRvcRunModeInstance->Init(); } @@ -204,7 +203,6 @@ void emberAfRvcCleanModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(gRvcCleanModeDelegate == nullptr && gRvcCleanModeInstance == nullptr); gRvcCleanModeDelegate = new RvcCleanMode::RvcCleanModeDelegate; - gRvcCleanModeInstance = - new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, NO_FEATURES); + gRvcCleanModeInstance = new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, NO_FEATURES); gRvcCleanModeInstance->Init(); } From 2f26b66592467d76278a88217792c8adbdeff09d Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Thu, 25 Jan 2024 16:54:49 +0000 Subject: [PATCH 15/21] The Objects.py template adds a kInternalDoNotUseNone entry if a bitmap has no entryies. --- src/controller/python/chip/clusters/Objects.py | 2 ++ src/controller/python/templates/python-cluster-Objects-py.zapt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index d73c0117d762e9..9a4abbd8e4b04a 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -16705,6 +16705,7 @@ class StatusCode(MatterIntEnum): class Bitmaps: class Feature(IntFlag): + kInternalDoNotUseNone = 0 class Structs: @dataclass @@ -16948,6 +16949,7 @@ class StatusCode(MatterIntEnum): class Bitmaps: class Feature(IntFlag): + kInternalDoNotUseNone = 0 class Structs: @dataclass diff --git a/src/controller/python/templates/python-cluster-Objects-py.zapt b/src/controller/python/templates/python-cluster-Objects-py.zapt index b5f8ed80ca03d9..24a4211b8f734f 100644 --- a/src/controller/python/templates/python-cluster-Objects-py.zapt +++ b/src/controller/python/templates/python-cluster-Objects-py.zapt @@ -78,6 +78,8 @@ class {{asUpperCamelCase name}}(Cluster): class {{asType label}}(IntFlag): {{#zcl_bitmap_items}} k{{asUpperCamelCase label}} = {{asHex mask}} +{{else}} + kInternalDoNotUseNone = 0 {{/zcl_bitmap_items}} {{/zcl_bitmaps}} From 9175e757374204dd5015fb20d3657d4b27b24493 Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Fri, 26 Jan 2024 14:51:21 +0000 Subject: [PATCH 16/21] Replaced the previous solution that fixed the issue in the generated python files canused by the lack of bitmasks by adding a NoFeatures=0 mask. --- .../all-clusters-common/all-clusters-app.matter | 2 ++ .../devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter | 2 ++ examples/rvc-app/rvc-common/rvc-app.matter | 2 ++ .../zcl/data-model/chip/rvc-clean-mode-cluster.xml | 1 + .../zcl/data-model/chip/rvc-run-mode-cluster.xml | 1 + src/controller/data_model/controller-clusters.matter | 2 ++ src/controller/python/chip/clusters/Objects.py | 4 ++-- .../python/templates/python-cluster-Objects-py.zapt | 2 -- src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h | 2 ++ .../app-common/app-common/zap-generated/cluster-enums.h | 2 ++ 10 files changed, 16 insertions(+), 4 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index b9223be71505ab..db0372c6f7dce6 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2929,6 +2929,7 @@ cluster RvcRunMode = 84 { } bitmap Feature : bitmap32 { + kNoFeatures = 0x0; } struct ModeTagStruct { @@ -2980,6 +2981,7 @@ cluster RvcCleanMode = 85 { } bitmap Feature : bitmap32 { + kNoFeatures = 0x0; } struct ModeTagStruct { diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index c76c69d27949d2..79d4b2d0ed69ca 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -1020,6 +1020,7 @@ cluster RvcRunMode = 84 { } bitmap Feature : bitmap32 { + kNoFeatures = 0x0; } struct ModeTagStruct { @@ -1071,6 +1072,7 @@ cluster RvcCleanMode = 85 { } bitmap Feature : bitmap32 { + kNoFeatures = 0x0; } struct ModeTagStruct { diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 5d84ee31713d46..94190cebb85b76 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -943,6 +943,7 @@ cluster RvcRunMode = 84 { } bitmap Feature : bitmap32 { + kNoFeatures = 0x0; } struct ModeTagStruct { @@ -994,6 +995,7 @@ cluster RvcCleanMode = 85 { } bitmap Feature : bitmap32 { + kNoFeatures = 0x0; } struct ModeTagStruct { diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml index 8addf088eb580c..3c8686b6d90fb3 100644 --- a/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml @@ -63,6 +63,7 @@ limitations under the License. + diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml index 4c481d26b9c4a4..f2d24e62ede0f4 100644 --- a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml @@ -70,6 +70,7 @@ limitations under the License. + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index bce23162858231..38f516dec4c892 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3117,6 +3117,7 @@ cluster RvcRunMode = 84 { } bitmap Feature : bitmap32 { + kNoFeatures = 0x0; } struct ModeTagStruct { @@ -3168,6 +3169,7 @@ cluster RvcCleanMode = 85 { } bitmap Feature : bitmap32 { + kNoFeatures = 0x0; } struct ModeTagStruct { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 9a4abbd8e4b04a..7c052794efbefb 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -16705,7 +16705,7 @@ class StatusCode(MatterIntEnum): class Bitmaps: class Feature(IntFlag): - kInternalDoNotUseNone = 0 + kNoFeatures = 0x0 class Structs: @dataclass @@ -16949,7 +16949,7 @@ class StatusCode(MatterIntEnum): class Bitmaps: class Feature(IntFlag): - kInternalDoNotUseNone = 0 + kNoFeatures = 0x0 class Structs: @dataclass diff --git a/src/controller/python/templates/python-cluster-Objects-py.zapt b/src/controller/python/templates/python-cluster-Objects-py.zapt index 24a4211b8f734f..b5f8ed80ca03d9 100644 --- a/src/controller/python/templates/python-cluster-Objects-py.zapt +++ b/src/controller/python/templates/python-cluster-Objects-py.zapt @@ -78,8 +78,6 @@ class {{asUpperCamelCase name}}(Cluster): class {{asType label}}(IntFlag): {{#zcl_bitmap_items}} k{{asUpperCamelCase label}} = {{asHex mask}} -{{else}} - kInternalDoNotUseNone = 0 {{/zcl_bitmap_items}} {{/zcl_bitmaps}} diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index c5df1be9dcf6de..743e21edfd0713 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -17133,6 +17133,7 @@ typedef NS_ENUM(uint8_t, MTRRVCRunModeStatusCode) { } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_OPTIONS(uint32_t, MTRRVCRunModeFeature) { + MTRRVCRunModeFeatureNoFeatures MTR_PROVISIONALLY_AVAILABLE = 0x0, } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_ENUM(uint16_t, MTRRVCCleanModeModeTag) { @@ -17146,6 +17147,7 @@ typedef NS_ENUM(uint8_t, MTRRVCCleanModeStatusCode) { } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_OPTIONS(uint32_t, MTRRVCCleanModeFeature) { + MTRRVCCleanModeFeatureNoFeatures MTR_PROVISIONALLY_AVAILABLE = 0x0, } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_OPTIONS(uint32_t, MTRTemperatureControlFeature) { 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 05c46a74d2861f..5fd895eea41cd0 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 @@ -1703,6 +1703,7 @@ enum class StatusCode : uint8_t // Bitmap for Feature enum class Feature : uint32_t { + kNoFeatures = 0x0, }; } // namespace RvcRunMode @@ -1735,6 +1736,7 @@ enum class StatusCode : uint8_t // Bitmap for Feature enum class Feature : uint32_t { + kNoFeatures = 0x0, }; } // namespace RvcCleanMode From 3603fa68035f513bca8abfaa2afbe9d8d6e48008 Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Mon, 29 Jan 2024 11:07:11 +0000 Subject: [PATCH 17/21] Used the new kNoFeatures feature instead of a locally declared constant. --- .../all-clusters-app/all-clusters-common/src/rvc-modes.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp index adc982bdccb4d6..2a59b47f97a0ee 100644 --- a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp @@ -26,8 +26,6 @@ template using List = chip::app::DataModel::List; using ModeTagStructType = chip::app::Clusters::detail::Structs::ModeTagStruct::Type; -const uint32_t NO_FEATURES = 0; - // RVC Run static RvcRunModeDelegate * gRvcRunModeDelegate = nullptr; @@ -114,7 +112,7 @@ void emberAfRvcRunModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(gRvcRunModeDelegate == nullptr && gRvcRunModeInstance == nullptr); gRvcRunModeDelegate = new RvcRunMode::RvcRunModeDelegate; - gRvcRunModeInstance = new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, NO_FEATURES); + gRvcRunModeInstance = new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, RvcRunMode::Feature::kNoFeatures); gRvcRunModeInstance->Init(); } @@ -203,6 +201,6 @@ void emberAfRvcCleanModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(gRvcCleanModeDelegate == nullptr && gRvcCleanModeInstance == nullptr); gRvcCleanModeDelegate = new RvcCleanMode::RvcCleanModeDelegate; - gRvcCleanModeInstance = new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, NO_FEATURES); + gRvcCleanModeInstance = new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, RvcRunMode::Feature::kNoFeatures); gRvcCleanModeInstance->Init(); } From d18bfcd415e921ae5b4f18c169575b149a2b08fc Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Mon, 29 Jan 2024 11:51:47 +0000 Subject: [PATCH 18/21] Readded a valve cluster attributed which was annoyingly removed by zap issues. --- .../all-clusters-common/all-clusters-app.zap | 16 ++++++++++++++++ .../all-clusters-common/src/rvc-modes.cpp | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index ab615732f51660..b06c93baae9358 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -12560,6 +12560,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "LevelStep", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, diff --git a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp index 2a59b47f97a0ee..bd89a33d05f447 100644 --- a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp @@ -112,7 +112,7 @@ void emberAfRvcRunModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(gRvcRunModeDelegate == nullptr && gRvcRunModeInstance == nullptr); gRvcRunModeDelegate = new RvcRunMode::RvcRunModeDelegate; - gRvcRunModeInstance = new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, RvcRunMode::Feature::kNoFeatures); + gRvcRunModeInstance = new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, to_underlying(RvcRunMode::Feature::kNoFeatures)); gRvcRunModeInstance->Init(); } @@ -201,6 +201,6 @@ void emberAfRvcCleanModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(gRvcCleanModeDelegate == nullptr && gRvcCleanModeInstance == nullptr); gRvcCleanModeDelegate = new RvcCleanMode::RvcCleanModeDelegate; - gRvcCleanModeInstance = new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, RvcRunMode::Feature::kNoFeatures); + gRvcCleanModeInstance = new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, to_underlying(RvcRunMode::Feature::kNoFeatures)); gRvcCleanModeInstance->Init(); } From d6e6db39a2cfb5500b7d97ec4122129d7b319a14 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Mon, 29 Jan 2024 11:52:23 +0000 Subject: [PATCH 19/21] Restyled by clang-format --- .../all-clusters-app/all-clusters-common/src/rvc-modes.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp index bd89a33d05f447..acc090ef6f780c 100644 --- a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp @@ -112,7 +112,8 @@ void emberAfRvcRunModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(gRvcRunModeDelegate == nullptr && gRvcRunModeInstance == nullptr); gRvcRunModeDelegate = new RvcRunMode::RvcRunModeDelegate; - gRvcRunModeInstance = new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, to_underlying(RvcRunMode::Feature::kNoFeatures)); + gRvcRunModeInstance = + new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, to_underlying(RvcRunMode::Feature::kNoFeatures)); gRvcRunModeInstance->Init(); } @@ -201,6 +202,7 @@ void emberAfRvcCleanModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(gRvcCleanModeDelegate == nullptr && gRvcCleanModeInstance == nullptr); gRvcCleanModeDelegate = new RvcCleanMode::RvcCleanModeDelegate; - gRvcCleanModeInstance = new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, to_underlying(RvcRunMode::Feature::kNoFeatures)); + gRvcCleanModeInstance = + new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, to_underlying(RvcRunMode::Feature::kNoFeatures)); gRvcCleanModeInstance->Init(); } From b226510152bf090d62df920111a5f5daaac8085a Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Mon, 29 Jan 2024 11:58:41 +0000 Subject: [PATCH 20/21] Regenerated zap files. --- .../all-clusters-app/all-clusters-common/all-clusters-app.matter | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 9204f9b4445e47..4d1ac5923ff553 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -8071,6 +8071,7 @@ endpoint 1 { ram attribute targetLevel; persist attribute defaultOpenLevel default = 100; ram attribute valveFault default = 0; + ram attribute levelStep default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; From 6a6d3df3cd62e683e3886686bf32f405b30ac6de Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Mon, 29 Jan 2024 12:19:11 +0000 Subject: [PATCH 21/21] Fixed missing namesapace call. --- .../all-clusters-app/all-clusters-common/src/rvc-modes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp index acc090ef6f780c..7fc5b61499fed2 100644 --- a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp @@ -113,7 +113,7 @@ void emberAfRvcRunModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(gRvcRunModeDelegate == nullptr && gRvcRunModeInstance == nullptr); gRvcRunModeDelegate = new RvcRunMode::RvcRunModeDelegate; gRvcRunModeInstance = - new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, to_underlying(RvcRunMode::Feature::kNoFeatures)); + new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, chip::to_underlying(RvcRunMode::Feature::kNoFeatures)); gRvcRunModeInstance->Init(); } @@ -203,6 +203,6 @@ void emberAfRvcCleanModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(gRvcCleanModeDelegate == nullptr && gRvcCleanModeInstance == nullptr); gRvcCleanModeDelegate = new RvcCleanMode::RvcCleanModeDelegate; gRvcCleanModeInstance = - new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, to_underlying(RvcRunMode::Feature::kNoFeatures)); + new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, chip::to_underlying(RvcRunMode::Feature::kNoFeatures)); gRvcCleanModeInstance->Init(); }