From 62e053a187a21f6741a2043d6b72141789f1cf39 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 1 Nov 2023 13:45:55 -0400 Subject: [PATCH 1/4] Fix name s/AssiciationFailure/AssociationFailureCause --- .../data-model/chip/wifi-network-diagnostics-cluster.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml index 65e177285a3978..c8b89cf070d0fe 100644 --- a/src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml @@ -23,7 +23,7 @@ limitations under the License. - + @@ -80,8 +80,8 @@ limitations under the License. Indicate that a Node has failed to connect, or reconnect, to a Wi-Fi access point. - - + + Indicate that a Node’s connection status to a Wi-Fi network has changed. From ff1b6e7622551e9cc403b44bf68e060c7b163dcf Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 1 Nov 2023 13:46:55 -0400 Subject: [PATCH 2/4] zap regen --- .../air-quality-sensor-app.matter | 2 +- .../all-clusters-app.matter | 2 +- .../all-clusters-minimal-app.matter | 2 +- .../bridge-app/bridge-common/bridge-app.matter | 2 +- ...ip_rootnode_dimmablelight_bCwGYSDpoe.matter | 2 +- .../rootnode_dishwasher_cc105034fe.matter | 2 +- .../rootnode_laundrywasher_fb10d238c8.matter | 2 +- ...peraturecontrolledcabinet_ffdb696680.matter | 2 +- .../contact-sensor-app.matter | 2 +- .../dishwasher-common/dishwasher-app.matter | 2 +- .../light-switch-app.matter | 2 +- .../data_model/lighting-app-wifi.matter | 2 +- .../lighting-common/lighting-app.matter | 2 +- .../silabs/data_model/lighting-wifi-app.matter | 2 +- examples/lock-app/lock-common/lock-app.matter | 2 +- .../placeholder/linux/apps/app1/config.matter | 2 +- .../placeholder/linux/apps/app2/config.matter | 2 +- .../refrigerator-app.matter | 2 +- .../resource-monitoring-app.matter | 2 +- .../temperature-measurement.matter | 2 +- .../nxp/zap/thermostat_matter_wifi.matter | 2 +- .../thermostat-common/thermostat.matter | 2 +- examples/tv-app/tv-common/tv-app.matter | 2 +- .../tv-casting-common/tv-casting-app.matter | 2 +- .../virtual-device-app.matter | 2 +- examples/window-app/common/window-app.matter | 2 +- .../data_model/controller-clusters.matter | 2 +- .../devicecontroller/ChipEventStructs.java | 10 +++++----- ...iagnosticsClusterAssociationFailureEvent.kt | 13 +++++++------ .../zap-generated/CHIPEventTLVValueDecoder.cpp | 18 +++++++++--------- src/controller/python/chip/clusters/Objects.py | 4 ++-- .../zap-generated/MTREventTLVValueDecoder.mm | 4 ++-- .../CHIP/zap-generated/MTRStructsObjc.h | 2 +- .../CHIP/zap-generated/MTRStructsObjc.mm | 6 +++--- .../zap-generated/cluster-objects.cpp | 6 +++--- .../app-common/zap-generated/cluster-objects.h | 12 ++++++------ .../cluster/logging/DataModelLogger.cpp | 4 ++-- 37 files changed, 67 insertions(+), 66 deletions(-) diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter index ca74840f26cdd7..f668105a4889fa 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter @@ -945,7 +945,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } 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 48fdd6adb10f6f..44c96e79696bb3 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 @@ -1922,7 +1922,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 31724f0ef98dd0..746d41f5e1209e 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -1688,7 +1688,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 694b7de74c9f38..bc103e5d370c1f 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -1251,7 +1251,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 8dfc00959b33d3..7bdfd58dc27044 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1127,7 +1127,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter index 45c904f19f693a..ba44280e0ce4e2 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter @@ -683,7 +683,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter index 9657c9b28e6909..bf97be26bacdbf 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -683,7 +683,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter index 789ab736372331..7ba55dcba60a5d 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter @@ -683,7 +683,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index 847c827d4fe086..129b2a0cb4e56d 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -1112,7 +1112,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index fa10fd83dd7c77..9c5faeb6cf4dc5 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -771,7 +771,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 868aa36967f642..bd57bf25f67649 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -1430,7 +1430,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index c389aafb01efc5..562b5f0e05ab68 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -1119,7 +1119,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 7874b41f683300..cc6edf30c963e0 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1434,7 +1434,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index 144717de3cf5f4..d9e15a6aaf35c8 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -1507,7 +1507,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index ea7d73c4282cb2..e5888811e7493c 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -1349,7 +1349,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index c1c3047b03c942..436f2bd2ccec98 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -2100,7 +2100,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 009d443d1c8742..490fe1f5b3f115 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -2059,7 +2059,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter index dbbe4fc7142fdc..3b50a40083a235 100644 --- a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter +++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter @@ -638,7 +638,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter index 4bf471ffc11107..d382f8a8ec1b75 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter +++ b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter @@ -1112,7 +1112,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter index 2f492c5c2b031d..4154b7f835d005 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -698,7 +698,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index d58570d607ab75..40ca12db738375 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -1320,7 +1320,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index d5ed36f49349b8..7a80f725caf459 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1201,7 +1201,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 9a80376a01fd38..e34fe79a74b829 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -1354,7 +1354,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 7a141abe1790b3..8971ca1ede0bdd 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -1034,7 +1034,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index 984821d90c715c..483c2257f4a2c3 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -1493,7 +1493,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 6b5f06125fcf6e..2101288126d301 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -1333,7 +1333,7 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 26f0dfbbe2faf5..37fd9264b2ad11 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2051,7 +2051,7 @@ client cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; + AssociationFailureCauseEnum associationFailureCause = 0; int16u status = 1; } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java index be50323f6c5b54..5c4f9a7b529dc7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java @@ -596,13 +596,13 @@ public String toString() { } } public static class WiFiNetworkDiagnosticsClusterAssociationFailureEvent { - public Integer associationFailure; + public Integer associationFailureCause; public Integer status; public WiFiNetworkDiagnosticsClusterAssociationFailureEvent( - Integer associationFailure, + Integer associationFailureCause, Integer status ) { - this.associationFailure = associationFailure; + this.associationFailureCause = associationFailureCause; this.status = status; } @@ -610,8 +610,8 @@ public WiFiNetworkDiagnosticsClusterAssociationFailureEvent( public String toString() { StringBuilder output = new StringBuilder(); output.append("WiFiNetworkDiagnosticsClusterAssociationFailureEvent {\n"); - output.append("\tassociationFailure: "); - output.append(associationFailure); + output.append("\tassociationFailureCause: "); + output.append(associationFailureCause); output.append("\n"); output.append("\tstatus: "); output.append(status); diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt index 6547c9d894a71f..2f94dc8e6b1c58 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt @@ -23,12 +23,12 @@ import matter.tlv.TlvReader import matter.tlv.TlvWriter class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( - val associationFailure: UInt, + val associationFailureCause: UInt, val status: UInt ) { override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterAssociationFailureEvent {\n") - append("\tassociationFailure : $associationFailure\n") + append("\tassociationFailureCause : $associationFailureCause\n") append("\tstatus : $status\n") append("}\n") } @@ -36,14 +36,14 @@ class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { startStructure(tlvTag) - put(ContextSpecificTag(TAG_ASSOCIATION_FAILURE), associationFailure) + put(ContextSpecificTag(TAG_ASSOCIATION_FAILURE_CAUSE), associationFailureCause) put(ContextSpecificTag(TAG_STATUS), status) endStructure() } } companion object { - private const val TAG_ASSOCIATION_FAILURE = 0 + private const val TAG_ASSOCIATION_FAILURE_CAUSE = 0 private const val TAG_STATUS = 1 fun fromTlv( @@ -51,12 +51,13 @@ class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( tlvReader: TlvReader ): WiFiNetworkDiagnosticsClusterAssociationFailureEvent { tlvReader.enterStructure(tlvTag) - val associationFailure = tlvReader.getUInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE)) + val associationFailureCause = + tlvReader.getUInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE_CAUSE)) val status = tlvReader.getUInt(ContextSpecificTag(TAG_STATUS)) tlvReader.exitContainer() - return WiFiNetworkDiagnosticsClusterAssociationFailureEvent(associationFailure, status) + return WiFiNetworkDiagnosticsClusterAssociationFailureEvent(associationFailureCause, status) } } } diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index 99218afe98e445..118ea6f0f73f89 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -1680,13 +1680,13 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { return nullptr; } - jobject value_associationFailure; - std::string value_associationFailureClassName = "java/lang/Integer"; - std::string value_associationFailureCtorSignature = "(I)V"; - jint jnivalue_associationFailure = static_cast(cppValue.associationFailure); - chip::JniReferences::GetInstance().CreateBoxedObject(value_associationFailureClassName.c_str(), - value_associationFailureCtorSignature.c_str(), - jnivalue_associationFailure, value_associationFailure); + jobject value_associationFailureCause; + std::string value_associationFailureCauseClassName = "java/lang/Integer"; + std::string value_associationFailureCauseCtorSignature = "(I)V"; + jint jnivalue_associationFailureCause = static_cast(cppValue.associationFailureCause); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_associationFailureCauseClassName.c_str(), value_associationFailureCauseCtorSignature.c_str(), + jnivalue_associationFailureCause, value_associationFailureCause); jobject value_status; std::string value_statusClassName = "java/lang/Integer"; @@ -1713,8 +1713,8 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & return nullptr; } - jobject value = - env->NewObject(associationFailureStructClass, associationFailureStructCtor, value_associationFailure, value_status); + jobject value = env->NewObject(associationFailureStructClass, associationFailureStructCtor, + value_associationFailureCause, value_status); return value; } diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index d27abace8002fa..7d56364e341012 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -10878,11 +10878,11 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="associationFailure", Tag=0, Type=WiFiNetworkDiagnostics.Enums.AssociationFailureCauseEnum), + ClusterObjectFieldDescriptor(Label="associationFailureCause", Tag=0, Type=WiFiNetworkDiagnostics.Enums.AssociationFailureCauseEnum), ClusterObjectFieldDescriptor(Label="status", Tag=1, Type=uint), ]) - associationFailure: 'WiFiNetworkDiagnostics.Enums.AssociationFailureCauseEnum' = 0 + associationFailureCause: 'WiFiNetworkDiagnostics.Enums.AssociationFailureCauseEnum' = 0 status: 'uint' = 0 @dataclass diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index c4efe8fc35d173..1b857e0ab5d2e4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -1193,8 +1193,8 @@ static id _Nullable DecodeEventPayloadForWiFiNetworkDiagnosticsCluster(EventId a do { NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.associationFailure)]; - value.associationFailure = memberValue; + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.associationFailureCause)]; + value.associationFailureCause = memberValue; } while (0); do { NSNumber * _Nonnull memberValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index c78f885a4625e6..36389da4a3c966 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -545,7 +545,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRWiFiNetworkDiagnosticsClusterAssociationFailureEvent : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull associationFailure MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull associationFailureCause MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 3d09597722ce57..112b1256770732 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -1848,7 +1848,7 @@ - (instancetype)init { if (self = [super init]) { - _associationFailure = @(0); + _associationFailureCause = @(0); _status = @(0); } @@ -1859,7 +1859,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRWiFiNetworkDiagnosticsClusterAssociationFailureEvent alloc] init]; - other.associationFailure = self.associationFailure; + other.associationFailureCause = self.associationFailureCause; other.status = self.status; return other; @@ -1867,7 +1867,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: associationFailure:%@; status:%@; >", NSStringFromClass([self class]), _associationFailure, _status]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: associationFailureCause:%@; status:%@; >", NSStringFromClass([self class]), _associationFailureCause, _status]; return descriptionString; } diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 2d1e3e90812d7d..753c939579762e 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 @@ -7565,7 +7565,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAssociationFailure), associationFailure)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAssociationFailureCause), associationFailureCause)); ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); return aWriter.EndContainer(outer); } @@ -7584,9 +7584,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kAssociationFailure)) + if (__context_tag == to_underlying(Fields::kAssociationFailureCause)) { - err = DataModel::Decode(reader, associationFailure); + err = DataModel::Decode(reader, associationFailureCause); } else if (__context_tag == to_underlying(Fields::kStatus)) { 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 885994ed962434..ee1815a5ed71c0 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 @@ -10304,8 +10304,8 @@ static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { - kAssociationFailure = 0, - kStatus = 1, + kAssociationFailureCause = 0, + kStatus = 1, }; struct Type @@ -10316,8 +10316,8 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } static constexpr bool kIsFabricScoped = false; - AssociationFailureCauseEnum associationFailure = static_cast(0); - uint16_t status = static_cast(0); + AssociationFailureCauseEnum associationFailureCause = static_cast(0); + uint16_t status = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -10329,8 +10329,8 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::AssociationFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - AssociationFailureCauseEnum associationFailure = static_cast(0); - uint16_t status = static_cast(0); + AssociationFailureCauseEnum associationFailureCause = static_cast(0); + uint16_t status = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; 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 adc4e2611faf32..fdcf0f06a98d71 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -3386,10 +3386,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("AssociationFailure", indent + 1, value.associationFailure); + CHIP_ERROR err = DataModelLogger::LogValue("AssociationFailureCause", indent + 1, value.associationFailureCause); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AssociationFailure'"); + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AssociationFailureCause'"); return err; } } From 4ce52264a6422e850366a3df167d614d951d21f7 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 1 Nov 2023 13:48:28 -0400 Subject: [PATCH 3/4] minor change to kick CI --- .../zcl/data-model/chip/wifi-network-diagnostics-cluster.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml index c8b89cf070d0fe..a2d0ca758de91e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml @@ -86,6 +86,6 @@ limitations under the License. Indicate that a Node’s connection status to a Wi-Fi network has changed. - + From f8fe85950e08a06ad6921af91f28f44a55fcb60e Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 1 Nov 2023 23:55:24 -0400 Subject: [PATCH 4/4] Fix Darwin availability annotations. --- .../Framework/CHIP/templates/availability.yaml | 12 ++++++++++++ .../Framework/CHIP/zap-generated/MTRStructsObjc.h | 4 +++- .../Framework/CHIP/zap-generated/MTRStructsObjc.mm | 9 +++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index d7b9f200956d9e..19e5bd359c4e08 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -7729,6 +7729,10 @@ - release: "Future" versions: "future" introduced: + event fields: + WiFiNetworkDiagnostics: + AssociationFailure: + - associationFailureCause bitmaps: Scenes: - CopyModeBitmap @@ -7751,6 +7755,10 @@ Feature: - Basic deprecated: + event fields: + WiFiNetworkDiagnostics: + AssociationFailure: + - associationFailure bitmaps: Scenes: - ScenesCopyMode @@ -7778,6 +7786,10 @@ # Targeting Spring 2024 Matter release - ThreadCapabilitiesBitmap renames: + event fields: + WiFiNetworkDiagnostics: + AssociationFailure: + associationFailureCause: associationFailure bitmaps: Scenes: CopyModeBitmap: ScenesCopyMode diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 36389da4a3c966..3c197167dacc2c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -545,7 +545,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRWiFiNetworkDiagnosticsClusterAssociationFailureEvent : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull associationFailureCause MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull associationFailureCause MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull associationFailure MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use associationFailureCause"); @property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 112b1256770732..c7000fa3be2752 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -1871,6 +1871,15 @@ - (NSString *)description return descriptionString; } +- (void)setAssociationFailure:(NSNumber * _Nonnull)associationFailure +{ + self.associationFailureCause = associationFailure; +} + +- (NSNumber * _Nonnull)associationFailure +{ + return self.associationFailureCause; +} @end @implementation MTRWiFiNetworkDiagnosticsClusterConnectionStatusEvent