From 1084695909af330065b39f803f4a6e1cf6fe59c8 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 17 Feb 2023 08:57:59 -0500 Subject: [PATCH] Align WiFi network diagnostics XML to spec changes. (#25094) * Align WiFi network diagnostics XML to spec changes. More spec changes happened in https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/6178 Fixes https://github.com/project-chip/connectedhomeip/issues/24996 * Auto-update ZAP files. * Regenerate generated code. --- .../all-clusters-app.matter | 24 +- .../all-clusters-common/all-clusters-app.zap | 7 +- .../all-clusters-minimal-app.matter | 24 +- .../all-clusters-minimal-app.zap | 7 +- .../bridge-common/bridge-app.matter | 24 +- .../bridge-app/bridge-common/bridge-app.zap | 7 +- ...p_rootnode_dimmablelight_bCwGYSDpoe.matter | 24 +- ...noip_rootnode_dimmablelight_bCwGYSDpoe.zap | 7 +- ...tnode_colortemperaturelight_hbUnzYVeyn.zap | 7 +- .../rootnode_contactsensor_lFAGG1bfRO.zap | 7 +- .../rootnode_dimmablelight_bCwGYSDpoe.zap | 7 +- .../devices/rootnode_doorlock_aNKYAreMXE.zap | 7 +- ...rootnode_extendedcolorlight_8lcaaYJVAa.zap | 7 +- .../chef/devices/rootnode_fan_7N2TobIlOX.zap | 7 +- .../rootnode_flowsensor_1zVxHedlaV.zap | 7 +- ...rootnode_heatingcoolingunit_ncdGai1E5a.zap | 7 +- .../rootnode_humiditysensor_Xyj4gda6Hb.zap | 7 +- .../rootnode_lightsensor_lZQycTFcJK.zap | 7 +- .../rootnode_occupancysensor_iHyVgifZuo.zap | 7 +- .../rootnode_onofflight_bbs1b7IaOV.zap | 7 +- .../rootnode_onofflightswitch_FsPlMr090Q.zap | 7 +- .../rootnode_onoffpluginunit_Wtf8ss5EBY.zap | 7 +- .../rootnode_pressuresensor_s0qC9wLH4k.zap | 7 +- .../devices/rootnode_speaker_RpzeXdimqA.zap | 7 +- .../rootnode_temperaturesensor_Qy1zkNW7c3.zap | 7 +- .../rootnode_thermostat_bm3fb8dhYi.zap | 7 +- .../rootnode_windowcovering_RLCxaGi9Yx.zap | 7 +- .../contact-sensor-app.matter | 24 +- .../contact-sensor-app.zap | 7 +- .../bridge-common/bridge-app.matter | 24 +- .../bridge-common/bridge-app.zap | 7 +- .../light-switch-app.matter | 24 +- .../light-switch-common/light-switch-app.zap | 7 +- .../lighting-common/lighting-app.matter | 24 +- .../lighting-common/lighting-app.zap | 9 +- .../lighting-app/nxp/zap/lighting-on-off.zap | 7 +- .../efr32/data_model/lighting-thread-app.zap | 7 +- .../efr32/data_model/lighting-wifi-app.matter | 24 +- .../efr32/data_model/lighting-wifi-app.zap | 7 +- examples/lock-app/lock-common/lock-app.matter | 24 +- examples/lock-app/lock-common/lock-app.zap | 7 +- examples/lock-app/nxp/zap/lock-app.zap | 7 +- .../log-source-common/log-source-app.zap | 3 +- .../ota-provider-common/ota-provider-app.zap | 3 +- .../ota-requestor-app.zap | 3 +- .../placeholder/linux/apps/app1/config.matter | 24 +- .../placeholder/linux/apps/app1/config.zap | 7 +- .../placeholder/linux/apps/app2/config.matter | 24 +- .../placeholder/linux/apps/app2/config.zap | 7 +- examples/pump-app/pump-common/pump-app.zap | 3 +- .../pump-controller-app.zap | 3 +- .../esp32/main/temperature-measurement.matter | 24 +- .../esp32/main/temperature-measurement.zap | 7 +- .../thermostat-common/thermostat.matter | 24 +- .../thermostat-common/thermostat.zap | 7 +- examples/tv-app/tv-common/tv-app.matter | 24 +- examples/tv-app/tv-common/tv-app.zap | 7 +- .../tv-casting-common/tv-casting-app.matter | 24 +- .../tv-casting-common/tv-casting-app.zap | 7 +- examples/window-app/common/window-app.matter | 24 +- examples/window-app/common/window-app.zap | 7 +- .../zap/tests/inputs/all-clusters-app.zap | 7 +- .../tools/zap/tests/inputs/lighting-app.zap | 7 +- .../wifi-network-diagnostics-server.cpp | 12 +- src/app/common/templates/config-data.yaml | 1 - .../chip/wifi-network-diagnostics-cluster.xml | 16 +- .../data_model/controller-clusters.matter | 24 +- .../data_model/controller-clusters.zap | 7 +- .../java/zap-generated/CHIPReadCallbacks.cpp | 4 +- .../java/zap-generated/CHIPReadCallbacks.h | 7 +- .../python/chip/clusters/Objects.py | 48 +-- .../CHIP/templates/availability.yaml | 40 ++- .../CHIP/zap-generated/MTRBaseClusters.h | 75 +++-- .../CHIP/zap-generated/MTRBaseClusters.mm | 16 +- .../CHIP/zap-generated/MTRCallbackBridge.h | 282 +++++++++--------- .../CHIP/zap-generated/MTRCallbackBridge.mm | 49 +-- src/include/platform/DiagnosticDataProvider.h | 5 +- .../Ameba/ConnectivityManagerImpl.cpp | 14 +- .../Ameba/DiagnosticDataProviderImpl.cpp | 36 +-- .../Ameba/DiagnosticDataProviderImpl.h | 2 +- .../Beken/DiagnosticDataProviderImpl.cpp | 18 +- .../Beken/DiagnosticDataProviderImpl.h | 2 +- .../ESP32/ConnectivityManagerImpl_WiFi.cpp | 12 +- .../ESP32/DiagnosticDataProviderImpl.cpp | 21 +- .../ESP32/DiagnosticDataProviderImpl.h | 2 +- .../PSOC6/DiagnosticDataProviderImpl.cpp | 22 +- .../PSOC6/DiagnosticDataProviderImpl.h | 2 +- .../PSOC6/NetworkCommissioningDriver.h | 4 +- .../PSOC6/NetworkCommissioningWiFiDriver.cpp | 22 +- .../Linux/ConnectivityManagerImpl.cpp | 30 +- src/platform/Linux/ConnectivityManagerImpl.h | 2 +- .../Linux/DiagnosticDataProviderImpl.cpp | 2 +- .../Linux/DiagnosticDataProviderImpl.h | 2 +- .../BL602/DiagnosticDataProviderImpl.cpp | 4 +- .../BL602/DiagnosticDataProviderImpl.h | 2 +- .../bouffalolab/BL602/PlatformManagerImpl.cpp | 12 +- .../DiagnosticDataProviderImplNrf.cpp | 9 +- .../DiagnosticDataProviderImplNrf.h | 2 +- .../nxp/mw320/ConnectivityManagerImpl.cpp | 30 +- .../nxp/mw320/ConnectivityManagerImpl.h | 2 +- .../nxp/mw320/DiagnosticDataProviderImpl.cpp | 2 +- .../nxp/mw320/DiagnosticDataProviderImpl.h | 2 +- .../silabs/DiagnosticDataProviderImpl.cpp | 10 +- .../silabs/DiagnosticDataProviderImpl.h | 2 +- .../webos/ConnectivityManagerImpl.cpp | 30 +- src/platform/webos/ConnectivityManagerImpl.h | 2 +- .../webos/DiagnosticDataProviderImpl.cpp | 2 +- .../webos/DiagnosticDataProviderImpl.h | 2 +- .../zap-generated/attributes/Accessors.cpp | 25 +- .../zap-generated/attributes/Accessors.h | 12 +- .../zap-generated/cluster-enums-check.h | 47 ++- .../app-common/zap-generated/cluster-enums.h | 43 ++- .../zap-generated/cluster-objects.h | 24 +- .../app-common/zap-generated/enums.h | 11 - .../zap-generated/cluster/Commands.h | 4 +- .../cluster/logging/DataModelLogger.cpp | 4 +- .../chip-tool/zap-generated/test/Commands.h | 4 +- 117 files changed, 897 insertions(+), 881 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 821b3302c8761e..4d1c7ad1c6e3bd 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 @@ -1545,14 +1545,19 @@ server cluster ThreadNetworkDiagnostics = 53 { } server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -1561,12 +1566,7 @@ server cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -1585,17 +1585,17 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute nullable int32u beaconLostCount = 5; 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 72ce4d4d54f728..14ccb21837f802 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 @@ -4952,7 +4952,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4968,7 +4968,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -25498,6 +25498,5 @@ "endpointVersion": 1, "deviceIdentifier": 61442 } - ], - "log": [] + ] } \ No newline at end of file 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 fa8eb774b57539..a0903903cf66fb 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 @@ -1356,14 +1356,19 @@ server cluster ThreadNetworkDiagnostics = 53 { } server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -1372,12 +1377,7 @@ server cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -1396,17 +1396,17 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute command_id generatedCommandList[] = 65528; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index dc74f3414b354e..be47df712b2db3 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -4892,7 +4892,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4908,7 +4908,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -24952,6 +24952,5 @@ "endpointVersion": 1, "deviceIdentifier": 61442 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 50442d83dc7c86..1e9b38131fcd3a 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -1106,14 +1106,19 @@ server cluster ThreadNetworkDiagnostics = 53 { } server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -1122,12 +1127,7 @@ server cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -1146,17 +1146,17 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute nullable int32u beaconLostCount = 5; diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 6c19d24cea2e2b..f459b29fda6d47 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -3635,7 +3635,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -3651,7 +3651,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -7625,6 +7625,5 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 5eebcd1509757c..ff6e1d89abe3d5 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -980,14 +980,19 @@ server cluster ThreadNetworkDiagnostics = 53 { } server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -996,12 +1001,7 @@ server cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -1020,17 +1020,17 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute nullable int32u beaconLostCount = 5; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index f65a1cce9813d9..797191afec660a 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -3995,7 +3995,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4011,7 +4011,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -7292,6 +7292,5 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index 28f5cc2267aac3..7c7991dcd46842 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -4091,7 +4091,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4107,7 +4107,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -8098,6 +8098,5 @@ "endpointVersion": 1, "deviceIdentifier": 268 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index 56ad431c298d0f..25af2d38a2016a 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -3995,7 +3995,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4011,7 +4011,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -6120,6 +6120,5 @@ "endpointVersion": 1, "deviceIdentifier": 21 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index f1e790264acaab..4fb63718c56d3f 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -3995,7 +3995,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4011,7 +4011,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -7292,6 +7292,5 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index ff3b54a26143cf..2a97bf908cc5e5 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -3995,7 +3995,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4011,7 +4011,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -8992,6 +8992,5 @@ "endpointVersion": 1, "deviceIdentifier": 10 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index bf196890ebc3c5..8f3d08634d4fee 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -3995,7 +3995,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4011,7 +4011,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -8410,6 +8410,5 @@ "endpointVersion": 1, "deviceIdentifier": 269 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index 20a8e0c75dc947..636067adf5276e 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -4139,7 +4139,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4155,7 +4155,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -6316,6 +6316,5 @@ "endpointVersion": 1, "deviceIdentifier": 43 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index 02352a331087eb..bcb8620e9f78fc 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -3995,7 +3995,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4011,7 +4011,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -6168,6 +6168,5 @@ "endpointVersion": 1, "deviceIdentifier": 774 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index daeb4cc38e9e9b..0ad450a9dcd1f5 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -3995,7 +3995,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4011,7 +4011,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -7988,6 +7988,5 @@ "endpointVersion": 1, "deviceIdentifier": 768 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index 26d5056fa36623..6c9100e779e1d4 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -3995,7 +3995,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4011,7 +4011,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -6168,6 +6168,5 @@ "endpointVersion": 1, "deviceIdentifier": 775 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index 538b059eda4555..ec01b87b7ad288 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -3995,7 +3995,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4011,7 +4011,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -6184,6 +6184,5 @@ "endpointVersion": 1, "deviceIdentifier": 262 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index 1f85e0ada0f7b1..a7b495f0b0dd4c 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -3995,7 +3995,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4011,7 +4011,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -6296,6 +6296,5 @@ "endpointVersion": 1, "deviceIdentifier": 263 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index f22063145e368c..ed0f172d112392 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -3995,7 +3995,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4011,7 +4011,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -7292,6 +7292,5 @@ "endpointVersion": 1, "deviceIdentifier": 256 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index 66b8b588475acb..e8f5776ae9c8da 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -3995,7 +3995,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4011,7 +4011,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -7292,6 +7292,5 @@ "endpointVersion": 1, "deviceIdentifier": 259 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index c6c1d5182f9c8f..6d91c2d0dc2c18 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -3995,7 +3995,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4011,7 +4011,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -6968,6 +6968,5 @@ "endpointVersion": 1, "deviceIdentifier": 266 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index 6713399e2622c1..a06e8188855ec9 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -3995,7 +3995,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4011,7 +4011,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -6248,6 +6248,5 @@ "endpointVersion": 1, "deviceIdentifier": 773 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index ec71e602af570a..f6a2b8573964a7 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -3995,7 +3995,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4011,7 +4011,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -6400,6 +6400,5 @@ "endpointVersion": 1, "deviceIdentifier": 34 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index f6573c1f54f963..728571c0f17cc8 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -3995,7 +3995,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4011,7 +4011,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -6168,6 +6168,5 @@ "endpointVersion": 1, "deviceIdentifier": 770 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index b5f12e79ca7e0c..8843cf3786c92b 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -4043,7 +4043,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4059,7 +4059,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -7648,6 +7648,5 @@ "endpointVersion": 1, "deviceIdentifier": 769 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index a5866fe6ca890a..25dab8f0464414 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -3995,7 +3995,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4011,7 +4011,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -6850,6 +6850,5 @@ "endpointVersion": 1, "deviceIdentifier": 514 } - ], - "log": [] + ] } \ No newline at end of file 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 844783d83a75e0..ed32526863a0f9 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 @@ -975,14 +975,19 @@ server cluster ThreadNetworkDiagnostics = 53 { } server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -991,12 +996,7 @@ server cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -1015,17 +1015,17 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute nullable int32u beaconLostCount = 5; diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap index a48084b0f6dafb..69a31428179cf4 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap @@ -4091,7 +4091,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4107,7 +4107,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -8682,6 +8682,5 @@ "endpointVersion": 1, "deviceIdentifier": 21 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter index 4a98fa793255b6..2fdb718365673c 100644 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter +++ b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter @@ -1106,14 +1106,19 @@ server cluster ThreadNetworkDiagnostics = 53 { } server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -1122,12 +1127,7 @@ server cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -1146,17 +1146,17 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute nullable int32u beaconLostCount = 5; diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.zap b/examples/dynamic-bridge-app/bridge-common/bridge-app.zap index 96f163a503fd6a..a775ed1e208079 100644 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.zap +++ b/examples/dynamic-bridge-app/bridge-common/bridge-app.zap @@ -3585,7 +3585,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -3601,7 +3601,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -7543,6 +7543,5 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ], - "log": [] + ] } \ No newline at end of file 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 e0c4c633f41dbe..685a337eb450e8 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 @@ -1189,14 +1189,19 @@ server cluster ThreadNetworkDiagnostics = 53 { } server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -1205,12 +1210,7 @@ server cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -1229,17 +1229,17 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute nullable int32u beaconLostCount = 5; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index 65caf97f1205e3..e7f065a2a1b2a4 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -4073,7 +4073,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4089,7 +4089,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -9453,6 +9453,5 @@ "endpointVersion": 1, "deviceIdentifier": 15 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index b350d6881407d0..2f18fcd19cc2db 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1143,14 +1143,19 @@ server cluster ThreadNetworkDiagnostics = 53 { } server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -1159,12 +1164,7 @@ server cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -1183,17 +1183,17 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute nullable int32u beaconLostCount = 5; diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 23a796072a305a..0489f9a4cd1243 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -4183,7 +4183,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4199,7 +4199,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -8341,6 +8341,5 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ], - "log": [] -} + ] +} \ No newline at end of file diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.zap b/examples/lighting-app/nxp/zap/lighting-on-off.zap index fb6ae13cbef3d1..271e7fffafad36 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.zap +++ b/examples/lighting-app/nxp/zap/lighting-on-off.zap @@ -4286,7 +4286,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4302,7 +4302,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -9113,6 +9113,5 @@ "endpointVersion": 1, "deviceIdentifier": 256 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.zap index e115da1cba0722..27adf15eee8625 100644 --- a/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.zap @@ -4065,7 +4065,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4081,7 +4081,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -7796,6 +7796,5 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.matter index 2babfa44176079..df102d23fcf5f9 100644 --- a/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.matter @@ -981,14 +981,19 @@ server cluster SoftwareDiagnostics = 52 { } server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -997,12 +1002,7 @@ server cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -1021,17 +1021,17 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute nullable int32u beaconLostCount = 5; diff --git a/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.zap index 5fd49d06d42449..cbbf21a2a786ab 100644 --- a/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.zap @@ -4091,7 +4091,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4107,7 +4107,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -8194,6 +8194,5 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index b9cd922f84bcd0..c3c3ef210e1087 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -1059,14 +1059,19 @@ server cluster ThreadNetworkDiagnostics = 53 { } server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -1075,12 +1080,7 @@ server cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -1099,17 +1099,17 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute nullable int32u beaconLostCount = 5; diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 2053a0f9c8265f..ee6b508d7c480e 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -4120,7 +4120,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4136,7 +4136,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -7919,6 +7919,5 @@ "endpointVersion": 1, "deviceIdentifier": 10 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/lock-app/nxp/zap/lock-app.zap b/examples/lock-app/nxp/zap/lock-app.zap index 9e38e46c9a0457..4e37d0e54ff8a1 100644 --- a/examples/lock-app/nxp/zap/lock-app.zap +++ b/examples/lock-app/nxp/zap/lock-app.zap @@ -4286,7 +4286,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4302,7 +4302,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -6720,6 +6720,5 @@ "endpointVersion": 1, "deviceIdentifier": 10 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/log-source-app/log-source-common/log-source-app.zap b/examples/log-source-app/log-source-common/log-source-app.zap index 27f19eaf5ee416..1ea2cf4e4ab6b2 100644 --- a/examples/log-source-app/log-source-common/log-source-app.zap +++ b/examples/log-source-app/log-source-common/log-source-app.zap @@ -3511,6 +3511,5 @@ "endpointVersion": 1, "deviceIdentifier": null } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap index 30f6ee691b7525..312a1972cd39a9 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap @@ -4943,6 +4943,5 @@ "endpointVersion": 1, "deviceIdentifier": 22 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap index 66ea6671a0c6e7..61226b943ae3e0 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap @@ -7397,6 +7397,5 @@ "endpointVersion": 1, "deviceIdentifier": 61442 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index d1297b2d54d5a5..e47559d7bd8e55 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1203,14 +1203,19 @@ server cluster SoftwareDiagnostics = 52 { } server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -1219,12 +1224,7 @@ server cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -1243,17 +1243,17 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute nullable int32u beaconLostCount = 5; diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index dc3eaaa3c3e87a..044ad763c179d2 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -2631,7 +2631,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -2647,7 +2647,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -9034,6 +9034,5 @@ "endpointVersion": 1, "deviceIdentifier": 258 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index a3c05f8d0437cd..ed84ad41e6adeb 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1172,14 +1172,19 @@ server cluster SoftwareDiagnostics = 52 { } server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -1188,12 +1193,7 @@ server cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -1212,17 +1212,17 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute nullable int32u beaconLostCount = 5; diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index c625d42b26062b..59a37d382cc978 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -2831,7 +2831,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -2847,7 +2847,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -9034,6 +9034,5 @@ "endpointVersion": 1, "deviceIdentifier": 258 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index 0428270de6e1dc..7d11ad734c203a 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -8006,6 +8006,5 @@ "endpointVersion": 1, "deviceIdentifier": 771 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap index 812ad8d8297c60..dee73bed4701fc 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap @@ -6742,6 +6742,5 @@ "endpointVersion": 1, "deviceIdentifier": 772 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index 22f114fdae0d8f..cc0e826786f862 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -561,14 +561,19 @@ server cluster SoftwareDiagnostics = 52 { } server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -577,12 +582,7 @@ server cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -601,17 +601,17 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute nullable int32u beaconLostCount = 5; diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap index 0b89a97d460fd8..6dcff0b0b49b3a 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap @@ -2075,7 +2075,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -2091,7 +2091,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4136,6 +4136,5 @@ "endpointVersion": 1, "deviceIdentifier": 770 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index f636c77d358674..ea931fef29f83f 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1164,14 +1164,19 @@ server cluster ThreadNetworkDiagnostics = 53 { } server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -1180,12 +1185,7 @@ server cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -1204,17 +1204,17 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute nullable int32u beaconLostCount = 5; diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 29688403480c2a..f26871c0e84d16 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -4151,7 +4151,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4167,7 +4167,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -14757,6 +14757,5 @@ "endpointVersion": 1, "deviceIdentifier": 769 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index dfd9d1fb2da51a..68575fe6c53ee2 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -1200,14 +1200,19 @@ server cluster ThreadNetworkDiagnostics = 53 { } server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -1216,12 +1221,7 @@ server cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -1240,17 +1240,17 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute nullable int32u beaconLostCount = 5; diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index dd0af1b8937550..ea94217f1b4f9b 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -3963,7 +3963,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -3979,7 +3979,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -12481,6 +12481,5 @@ "endpointVersion": 1, "deviceIdentifier": 36 } - ], - "log": [] + ] } \ No newline at end of file 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 74a785490f520f..0c5130f3e4704a 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 @@ -1383,14 +1383,19 @@ server cluster ThreadNetworkDiagnostics = 53 { } server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -1399,12 +1404,7 @@ server cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -1423,17 +1423,17 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute nullable int32u beaconLostCount = 5; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index 98f7624ffc5955..b8f5998fe8c16e 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -3888,7 +3888,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -3904,7 +3904,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -16513,6 +16513,5 @@ "endpointVersion": 1, "deviceIdentifier": 263 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index e9553397544da5..75138274260fdc 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -1172,14 +1172,19 @@ server cluster ThreadNetworkDiagnostics = 53 { } server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -1188,12 +1193,7 @@ server cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -1212,17 +1212,17 @@ server cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute nullable int32u beaconLostCount = 5; diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index e942682e88665e..d298fdd3c2b266 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -4852,7 +4852,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4868,7 +4868,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -9335,6 +9335,5 @@ "endpointVersion": 2, "deviceIdentifier": 514 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index 407375cfc91598..b730a4a19f1752 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -4952,7 +4952,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4968,7 +4968,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -24919,6 +24919,5 @@ "endpointVersion": 1, "deviceIdentifier": 61442 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/scripts/tools/zap/tests/inputs/lighting-app.zap b/scripts/tools/zap/tests/inputs/lighting-app.zap index 1285e4840e30e9..1c7552a7e9a382 100644 --- a/scripts/tools/zap/tests/inputs/lighting-app.zap +++ b/scripts/tools/zap/tests/inputs/lighting-app.zap @@ -4183,7 +4183,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4199,7 +4199,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -8309,6 +8309,5 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp b/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp index 444a14b6a2d431..dc6e751b0d5f4b 100644 --- a/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp +++ b/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp @@ -101,12 +101,12 @@ CHIP_ERROR WiFiDiagosticsAttrAccess::ReadWiFiBssId(AttributeValueEncoder & aEnco CHIP_ERROR WiFiDiagosticsAttrAccess::ReadSecurityType(AttributeValueEncoder & aEncoder) { Attributes::SecurityType::TypeInfo::Type securityType; - uint8_t value = 0; + SecurityTypeEnum value = SecurityTypeEnum::kUnspecified; if (DeviceLayer::GetDiagnosticDataProvider().GetWiFiSecurityType(value) == CHIP_NO_ERROR) { - securityType.SetNonNull(static_cast(value)); - ChipLogProgress(Zcl, "The current type of Wi-Fi security used: %d", value); + securityType.SetNonNull(value); + ChipLogProgress(Zcl, "The current type of Wi-Fi security used: %d", to_underlying(value)); } else { @@ -123,7 +123,7 @@ CHIP_ERROR WiFiDiagosticsAttrAccess::ReadWiFiVersion(AttributeValueEncoder & aEn if (DeviceLayer::GetDiagnosticDataProvider().GetWiFiVersion(value) == CHIP_NO_ERROR) { - version.SetNonNull(static_cast(value)); + version.SetNonNull(static_cast(value)); ChipLogProgress(Zcl, "The current 802.11 standard version in use by the Node: %d", value); } else @@ -261,7 +261,7 @@ class WiFiDiagnosticsDelegate : public DeviceLayer::WiFiDiagnosticsDelegate { ChipLogProgress(Zcl, "WiFiDiagnosticsDelegate: OnAssociationFailureDetected"); - Events::AssociationFailure::Type event{ static_cast(associationFailureCause), status }; + Events::AssociationFailure::Type event{ static_cast(associationFailureCause), status }; for (auto endpoint : EnabledEndpointsWithServerCluster(WiFiNetworkDiagnostics::Id)) { @@ -280,7 +280,7 @@ class WiFiDiagnosticsDelegate : public DeviceLayer::WiFiDiagnosticsDelegate { ChipLogProgress(Zcl, "WiFiDiagnosticsDelegate: OnConnectionStatusChanged"); - Events::ConnectionStatus::Type event{ static_cast(connectionStatus) }; + Events::ConnectionStatus::Type event{ static_cast(connectionStatus) }; for (auto endpoint : EnabledEndpointsWithServerCluster(WiFiNetworkDiagnostics::Id)) { // If WiFi Network Diagnostics cluster is implemented on this endpoint diff --git a/src/app/common/templates/config-data.yaml b/src/app/common/templates/config-data.yaml index 0cdde61a50a466..53b7ff06533a53 100644 --- a/src/app/common/templates/config-data.yaml +++ b/src/app/common/templates/config-data.yaml @@ -27,7 +27,6 @@ WeakEnums: - RoutingRole - SaturationMoveMode - SaturationStepMode - - SecurityType - StepMode - TemperatureDisplayMode 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 986fb8581a2fa3..f1e81dd925b897 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 @@ -16,7 +16,7 @@ limitations under the License. --> - + @@ -25,7 +25,7 @@ limitations under the License. - + @@ -34,14 +34,14 @@ limitations under the License. - + - + @@ -58,8 +58,8 @@ limitations under the License. WIFI_NETWORK_DIAGNOSTICS_CLUSTER The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. BSSID - SecurityType - WiFiVersion + SecurityType + WiFiVersion ChannelNumber RSSI BeaconLostCount @@ -79,12 +79,12 @@ 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. - + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index a9b594db9971e6..d0e3124e5ead92 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -1624,14 +1624,19 @@ client cluster ThreadNetworkDiagnostics = 53 { } client cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCause : ENUM8 { + enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; kAssociationFailed = 1; kAuthenticationFailed = 2; kSsidNotFound = 3; } - enum SecurityType : ENUM8 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { kUnspecified = 0; kNone = 1; kWep = 2; @@ -1640,12 +1645,7 @@ client cluster WiFiNetworkDiagnostics = 54 { kWpa3 = 5; } - enum WiFiConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum WiFiVersionType : ENUM8 { + enum WiFiVersionEnum : ENUM8 { kA = 0; kB = 1; kG = 2; @@ -1664,17 +1664,17 @@ client cluster WiFiNetworkDiagnostics = 54 { } info event AssociationFailure = 1 { - AssociationFailureCause associationFailure = 0; + AssociationFailureCauseEnum associationFailure = 0; INT16U status = 1; } info event ConnectionStatus = 2 { - WiFiConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; + readonly attribute nullable SecurityTypeEnum securityType = 1; + readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; readonly attribute nullable int16u channelNumber = 3; readonly attribute nullable int8s rssi = 4; readonly attribute nullable int32u beaconLostCount = 5; diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 788ec08acb2b31..efe89791b7d774 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -7379,7 +7379,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -7395,7 +7395,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -21035,6 +21035,5 @@ "endpointVersion": 1, "deviceIdentifier": 22 } - ], - "log": [] + ] } \ No newline at end of file diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index ddf4fa19e6c276..1c6dba70667e8c 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -12790,7 +12790,7 @@ CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback::~CHIPWiFiNetworkDiagnos } void CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12857,7 +12857,7 @@ CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback::~CHIPWiFiNetworkDiagnost } void CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 1ed67b416df0cf..76ab4b1bb4aa09 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -5298,8 +5298,9 @@ class CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback } } - static void CallbackFn(void * context, - const chip::app::DataModel::Nullable & value); + static void + CallbackFn(void * context, + const chip::app::DataModel::Nullable & value); static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( @@ -5331,7 +5332,7 @@ class CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback static void CallbackFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 95420909d786dc..2ef328b8938b30 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -10184,8 +10184,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="bssid", Tag=0x00000000, Type=typing.Union[Nullable, bytes]), - ClusterObjectFieldDescriptor(Label="securityType", Tag=0x00000001, Type=typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.SecurityType]), - ClusterObjectFieldDescriptor(Label="wiFiVersion", Tag=0x00000002, Type=typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.WiFiVersionType]), + ClusterObjectFieldDescriptor(Label="securityType", Tag=0x00000001, Type=typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.SecurityTypeEnum]), + ClusterObjectFieldDescriptor(Label="wiFiVersion", Tag=0x00000002, Type=typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.WiFiVersionEnum]), ClusterObjectFieldDescriptor(Label="channelNumber", Tag=0x00000003, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="rssi", Tag=0x00000004, Type=typing.Union[Nullable, int]), ClusterObjectFieldDescriptor(Label="beaconLostCount", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), @@ -10205,8 +10205,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) bssid: 'typing.Union[Nullable, bytes]' = None - securityType: 'typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.SecurityType]' = None - wiFiVersion: 'typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.WiFiVersionType]' = None + securityType: 'typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.SecurityTypeEnum]' = None + wiFiVersion: 'typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.WiFiVersionEnum]' = None channelNumber: 'typing.Union[Nullable, uint]' = None rssi: 'typing.Union[Nullable, int]' = None beaconLostCount: 'typing.Union[None, Nullable, uint]' = None @@ -10225,7 +10225,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class AssociationFailureCause(MatterIntEnum): + class AssociationFailureCauseEnum(MatterIntEnum): kUnknown = 0x00 kAssociationFailed = 0x01 kAuthenticationFailed = 0x02 @@ -10236,7 +10236,16 @@ class AssociationFailureCause(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 4, - class SecurityType(MatterIntEnum): + class ConnectionStatusEnum(MatterIntEnum): + kConnected = 0x00 + kNotConnected = 0x01 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 2, + + class SecurityTypeEnum(MatterIntEnum): kUnspecified = 0x00 kNone = 0x01 kWep = 0x02 @@ -10249,16 +10258,7 @@ class SecurityType(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 6, - class WiFiConnectionStatus(MatterIntEnum): - kConnected = 0x00 - kNotConnected = 0x01 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 2, - - class WiFiVersionType(MatterIntEnum): + class WiFiVersionEnum(MatterIntEnum): kA = 0x00 kB = 0x01 kG = 0x02 @@ -10324,9 +10324,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.SecurityType]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.SecurityTypeEnum]) - value: 'typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.SecurityType]' = NullValue + value: 'typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.SecurityTypeEnum]' = NullValue @dataclass class WiFiVersion(ClusterAttributeDescriptor): @@ -10340,9 +10340,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.WiFiVersionType]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.WiFiVersionEnum]) - value: 'typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.WiFiVersionType]' = NullValue + value: 'typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.WiFiVersionEnum]' = NullValue @dataclass class ChannelNumber(ClusterAttributeDescriptor): @@ -10635,11 +10635,11 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="associationFailure", Tag=0, Type=WiFiNetworkDiagnostics.Enums.AssociationFailureCause), + ClusterObjectFieldDescriptor(Label="associationFailure", Tag=0, Type=WiFiNetworkDiagnostics.Enums.AssociationFailureCauseEnum), ClusterObjectFieldDescriptor(Label="status", Tag=1, Type=uint), ]) - associationFailure: 'WiFiNetworkDiagnostics.Enums.AssociationFailureCause' = 0 + associationFailure: 'WiFiNetworkDiagnostics.Enums.AssociationFailureCauseEnum' = 0 status: 'uint' = 0 @dataclass @@ -10656,10 +10656,10 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="connectionStatus", Tag=0, Type=WiFiNetworkDiagnostics.Enums.WiFiConnectionStatus), + ClusterObjectFieldDescriptor(Label="connectionStatus", Tag=0, Type=WiFiNetworkDiagnostics.Enums.ConnectionStatusEnum), ]) - connectionStatus: 'WiFiNetworkDiagnostics.Enums.WiFiConnectionStatus' = 0 + connectionStatus: 'WiFiNetworkDiagnostics.Enums.ConnectionStatusEnum' = 0 @dataclass diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 1ef44453ff147b..b39b224e530b91 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -3100,8 +3100,14 @@ - RoutingRole - ThreadConnectionStatus WiFiNetworkDiagnostics: - - AssociationFailureCause - - SecurityType + # AssociationFailureCauseEnum was originally just named + # AssociationFailureCause, but we generate the same API for both + # of those names, so the name can just change here. + - AssociationFailureCauseEnum + # SecurityTypeEnum was originally just named SecurityType, but we + # generate the same API for both of those names, so the name can + # just change here. + - SecurityTypeEnum - WiFiConnectionStatus - WiFiVersionType EthernetNetworkDiagnostics: @@ -3480,12 +3486,18 @@ - Connected - NotConnected WiFiNetworkDiagnostics: - AssociationFailureCause: + # AssociationFailureCauseEnum was originally just named + # AssociationFailureCause, but we generate the same API for both + # of those names, so the name can just change here. + AssociationFailureCauseEnum: - Unknown - AssociationFailed - AuthenticationFailed - SsidNotFound - SecurityType: + # SecurityTypeEnum was originally just named SecurityType, but we + # generate the same API for both of those names, so the name can + # just change here. + SecurityTypeEnum: - Unspecified - None - WEP @@ -6677,6 +6689,9 @@ - TransferProtocolEnum OccupancySensing: - OccupancySensorTypeEnum + WiFiNetworkDiagnostics: + - ConnectionStatusEnum + - WiFiVersionEnum enum values: DoorLock: LockDataTypeEnum: @@ -6701,6 +6716,17 @@ - Ultrasonic - PIRAndUltrasonic - PhysicalContact + WiFiNetworkDiagnostics: + ConnectionStatusEnum: + - Connected + - NotConnected + WiFiVersionEnum: + - A + - B + - G + - N + - Ac + - Ax bitmaps: OccupancySensing: - OccupancyBitmap @@ -6726,6 +6752,9 @@ - LogsIntent - LogsStatus - LogsTransferProtocol + WiFiNetworkDiagnostics: + - WiFiConnectionStatus + - WiFiVersionType removed: enum values: DoorLock: @@ -6746,3 +6775,6 @@ IntentEnum: LogsIntent StatusEnum: LogsStatus TransferProtocolEnum: LogsTransferProtocol + WiFiNetworkDiagnostics: + ConnectionStatusEnum: WiFiConnectionStatus + WiFiVersionEnum: WiFiVersionType diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index b7730af98b7781..f5b16e64a5c544 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -20410,6 +20410,21 @@ typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsAssociationFailureCause) { = 0x03, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsConnectionStatus) { + MTRWiFiNetworkDiagnosticsConnectionStatusConnected MTR_NEWLY_AVAILABLE = 0x00, + MTRWiFiNetworkDiagnosticsConnectionStatusNotConnected MTR_NEWLY_AVAILABLE = 0x01, +} MTR_NEWLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsWiFiConnectionStatus) { + MTRWiFiNetworkDiagnosticsWiFiConnectionStatusConnected API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsConnectionStatusConnected") + = 0x00, + MTRWiFiNetworkDiagnosticsWiFiConnectionStatusNotConnected API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsConnectionStatusNotConnected") + = 0x01, +} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsConnectionStatus"); + typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsSecurityType) { MTRWiFiNetworkDiagnosticsSecurityTypeUnspecified API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, MTRWiFiNetworkDiagnosticsSecurityTypeNone API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, @@ -20419,38 +20434,54 @@ typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsSecurityType) { MTRWiFiNetworkDiagnosticsSecurityTypeWPA3 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsWiFiConnectionStatus) { - MTRWiFiNetworkDiagnosticsWiFiConnectionStatusConnected API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRWiFiNetworkDiagnosticsWiFiConnectionStatusNotConnected API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - = 0x01, -} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsWiFiVersion) { + MTRWiFiNetworkDiagnosticsWiFiVersionA MTR_NEWLY_AVAILABLE = 0x00, + MTRWiFiNetworkDiagnosticsWiFiVersionB MTR_NEWLY_AVAILABLE = 0x01, + MTRWiFiNetworkDiagnosticsWiFiVersionG MTR_NEWLY_AVAILABLE = 0x02, + MTRWiFiNetworkDiagnosticsWiFiVersionN MTR_NEWLY_AVAILABLE = 0x03, + MTRWiFiNetworkDiagnosticsWiFiVersionAc MTR_NEWLY_AVAILABLE = 0x04, + MTRWiFiNetworkDiagnosticsWiFiVersionAx MTR_NEWLY_AVAILABLE = 0x05, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsWiFiVersionType) { - MTRWiFiNetworkDiagnosticsWiFiVersionTypeA API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRWiFiNetworkDiagnosticsWiFiVersionType80211a API_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionTypeA", - ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + MTRWiFiNetworkDiagnosticsWiFiVersionTypeA API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionA") = 0x00, - MTRWiFiNetworkDiagnosticsWiFiVersionTypeB API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRWiFiNetworkDiagnosticsWiFiVersionType80211b API_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionTypeB", - ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + MTRWiFiNetworkDiagnosticsWiFiVersionType80211a API_DEPRECATED( + "Please use MTRWiFiNetworkDiagnosticsWiFiVersionA", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00, + MTRWiFiNetworkDiagnosticsWiFiVersionTypeB API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionB") = 0x01, - MTRWiFiNetworkDiagnosticsWiFiVersionTypeG API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRWiFiNetworkDiagnosticsWiFiVersionType80211g API_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionTypeG", - ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + MTRWiFiNetworkDiagnosticsWiFiVersionType80211b API_DEPRECATED( + "Please use MTRWiFiNetworkDiagnosticsWiFiVersionB", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x01, + MTRWiFiNetworkDiagnosticsWiFiVersionTypeG API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionG") = 0x02, - MTRWiFiNetworkDiagnosticsWiFiVersionTypeN API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTRWiFiNetworkDiagnosticsWiFiVersionType80211n API_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionTypeN", - ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + MTRWiFiNetworkDiagnosticsWiFiVersionType80211g API_DEPRECATED( + "Please use MTRWiFiNetworkDiagnosticsWiFiVersionG", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x02, + MTRWiFiNetworkDiagnosticsWiFiVersionTypeN API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionN") + = 0x03, + MTRWiFiNetworkDiagnosticsWiFiVersionType80211n API_DEPRECATED( + "Please use MTRWiFiNetworkDiagnosticsWiFiVersionN", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTRWiFiNetworkDiagnosticsWiFiVersionTypeAc API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, - MTRWiFiNetworkDiagnosticsWiFiVersionType80211ac API_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionTypeAc", + MTRWiFiNetworkDiagnosticsWiFiVersionTypeAc API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionAc") + = 0x04, + MTRWiFiNetworkDiagnosticsWiFiVersionType80211ac API_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionAc", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTRWiFiNetworkDiagnosticsWiFiVersionTypeAx API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, - MTRWiFiNetworkDiagnosticsWiFiVersionType80211ax API_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionTypeAx", + MTRWiFiNetworkDiagnosticsWiFiVersionTypeAx API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionAx") + = 0x05, + MTRWiFiNetworkDiagnosticsWiFiVersionType80211ax API_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionAx", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, -} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersion"); typedef NS_OPTIONS(uint32_t, MTRWiFiNetworkDiagnosticsFeature) { MTRWiFiNetworkDiagnosticsFeaturePacketCounts API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 7fddd14016d486..a9a15d7a717e7e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -35603,7 +35603,7 @@ - (void)readAttributeSecurityTypeWithCompletion:(void (^)(NSNumber * _Nullable v { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; - return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -35613,7 +35613,7 @@ - (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -35623,9 +35623,9 @@ + (void)readAttributeSecurityTypeWithClusterStateCache:(MTRClusterStateCacheCont queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(NullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(NullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; @@ -35647,7 +35647,7 @@ - (void)readAttributeWiFiVersionWithCompletion:(void (^)(NSNumber * _Nullable va { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; - return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -35657,7 +35657,7 @@ - (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams * _Nonnull)p reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -35667,9 +35667,9 @@ + (void)readAttributeWiFiVersionWithClusterStateCache:(MTRClusterStateCacheConta queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(NullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(NullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index d29c25961b81f9..06d1db9b81a3bd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -307,22 +307,22 @@ typedef void (*ThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallback)( void *, chip::app::Clusters::ThreadNetworkDiagnostics::RoutingRole); typedef void (*NullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*WiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallback)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCause); -typedef void (*NullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*WiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallback)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::SecurityType); -typedef void (*NullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*WiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallback)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiConnectionStatus); -typedef void (*NullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*WiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallback)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiVersionType); -typedef void (*NullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); +typedef void (*WiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallback)( + void *, chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum); +typedef void (*NullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*WiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallback)( + void *, chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum); +typedef void (*NullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*WiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallback)( + void *, chip::app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum); +typedef void (*NullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*WiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallback)( + void *, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum); +typedef void (*NullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); typedef void (*EthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallback)( void *, chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum); typedef void (*NullableEthernetNetworkDiagnosticsClusterPHYRateEnumAttributeCallback)( @@ -17193,287 +17193,289 @@ class MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubs MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCause value); + static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum value); }; -class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge - : public MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge +class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge + : public MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge( + MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(queue, handler, action), + MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge::OnDone; + using MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge - : public MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge +class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge + : public MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge( + MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(queue, handler, action), + MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge::OnDone; + using MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::SecurityType value); + static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum value); }; -class MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge - : public MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge +class MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge + : public MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( + MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(queue, handler, action), + MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge::OnDone; + using MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; - MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge - : public MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge +class MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge + : public MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( + MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(queue, handler, action), + MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge::OnDone; + using MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiConnectionStatus value); + static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum value); }; -class MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge - : public MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge +class MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge + : public MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge( + MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(queue, handler, action), + MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge::OnDone; + using MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, - OnSuccessFn){}; + MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge - : public MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge +class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge( + MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(queue, handler, action), + MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge::OnDone; + using MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiVersionType value); + static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum value); }; -class MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge - : public MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge +class MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge + : public MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( + MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(queue, handler, action), + MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge::OnDone; + using MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(dispatch_queue_t queue, + MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge - : public MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge +class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge + : public MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( + MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(queue, handler, action), + MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge::OnDone; + using MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index c059ee3a199a6c..06ccb67aa9d099 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -17991,15 +17991,15 @@ } } -void MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCause value) +void MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -18014,8 +18014,8 @@ } } -void MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -18026,7 +18026,8 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseEnumAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished() { if (!mQueue) { return; @@ -18041,15 +18042,15 @@ } } -void MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::WiFiNetworkDiagnostics::SecurityType value) +void MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -18064,8 +18065,8 @@ } } -void MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -18076,7 +18077,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableWiFiNetworkDiagnosticsClusterConnectionStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -18091,15 +18092,15 @@ } } -void MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiConnectionStatus value) +void MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -18114,8 +18115,8 @@ } } -void MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -18126,7 +18127,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -18141,15 +18142,15 @@ } } -void MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiVersionType value) +void MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -18164,8 +18165,8 @@ } } -void MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -18176,7 +18177,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; diff --git a/src/include/platform/DiagnosticDataProvider.h b/src/include/platform/DiagnosticDataProvider.h index 0165c55c0bc2bb..27a92eeeeb339f 100644 --- a/src/include/platform/DiagnosticDataProvider.h +++ b/src/include/platform/DiagnosticDataProvider.h @@ -157,7 +157,7 @@ class DiagnosticDataProvider * WiFi network diagnostics methods */ virtual CHIP_ERROR GetWiFiBssId(ByteSpan & value); - virtual CHIP_ERROR GetWiFiSecurityType(uint8_t & securityType); + virtual CHIP_ERROR GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType); virtual CHIP_ERROR GetWiFiVersion(uint8_t & wiFiVersion); virtual CHIP_ERROR GetWiFiChannelNumber(uint16_t & channelNumber); virtual CHIP_ERROR GetWiFiRssi(int8_t & rssi); @@ -333,7 +333,8 @@ inline CHIP_ERROR DiagnosticDataProvider::GetWiFiBssId(ByteSpan & value) return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } -inline CHIP_ERROR DiagnosticDataProvider::GetWiFiSecurityType(uint8_t & securityType) +inline CHIP_ERROR +DiagnosticDataProvider::GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) { return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } diff --git a/src/platform/Ameba/ConnectivityManagerImpl.cpp b/src/platform/Ameba/ConnectivityManagerImpl.cpp index 789bb5f6711ef8..670c060e95b94f 100644 --- a/src/platform/Ameba/ConnectivityManagerImpl.cpp +++ b/src/platform/Ameba/ConnectivityManagerImpl.cpp @@ -583,7 +583,7 @@ void ConnectivityManagerImpl::OnStationConnected() if (delegate) { delegate->OnConnectionStatusChanged( - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::WiFiConnectionStatus::kConnected)); + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum::kConnected)); } UpdateInternetConnectivityState(); @@ -599,7 +599,7 @@ void ConnectivityManagerImpl::OnStationDisconnected() WiFiDiagnosticsDelegate * delegate = GetDiagnosticDataProvider().GetWiFiDiagnosticsDelegate(); uint16_t reason = NetworkCommissioning::AmebaWiFiDriver::GetInstance().GetLastDisconnectReason(); uint8_t associationFailureCause = - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCause::kUnknown); + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kUnknown); if (delegate) { @@ -608,17 +608,17 @@ void ConnectivityManagerImpl::OnStationDisconnected() case RTW_NO_ERROR: case RTW_NONE_NETWORK: associationFailureCause = - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCause::kSsidNotFound); + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kSsidNotFound); delegate->OnAssociationFailureDetected(associationFailureCause, reason); break; case RTW_CONNECT_FAIL: associationFailureCause = - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCause::kAssociationFailed); + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kAssociationFailed); delegate->OnAssociationFailureDetected(associationFailureCause, reason); break; case RTW_WRONG_PASSWORD: - associationFailureCause = - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCause::kAuthenticationFailed); + associationFailureCause = chip::to_underlying( + chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kAuthenticationFailed); delegate->OnAssociationFailureDetected(associationFailureCause, reason); break; #if defined(CONFIG_PLATFORM_8710C) @@ -634,7 +634,7 @@ void ConnectivityManagerImpl::OnStationDisconnected() } delegate->OnDisconnectionDetected(reason); delegate->OnConnectionStatusChanged( - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::WiFiConnectionStatus::kNotConnected)); + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum::kNotConnected)); } UpdateInternetConnectivityState(); diff --git a/src/platform/Ameba/DiagnosticDataProviderImpl.cpp b/src/platform/Ameba/DiagnosticDataProviderImpl.cpp index e7ca68fff83d9c..13ac2ba0979195 100644 --- a/src/platform/Ameba/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Ameba/DiagnosticDataProviderImpl.cpp @@ -273,12 +273,14 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBssId(ByteSpan & BssId) CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiVersion(uint8_t & wifiVersion) { // Support 802.11a/n Wi-Fi in AmebaD chipset - wifiVersion = to_underlying(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionType::kN); + wifiVersion = to_underlying(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum::kN); return CHIP_NO_ERROR; } -CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(uint8_t & securityType) +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) { + using app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum; + unsigned int _auth_type; unsigned short _security = 0; rtw_wifi_setting_t setting; @@ -286,29 +288,28 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(uint8_t & securityTyp #ifdef CONFIG_PLATFORM_8721D if (wext_get_enc_ext("wlan0", &_security, &setting.key_idx, setting.password) < 0) { - securityType = 0; + securityType = SecurityTypeEnum::kUnspecified; } else { switch (_security) { case IW_ENCODE_ALG_NONE: - setting.security_type = EMBER_ZCL_SECURITY_TYPE_NONE; + securityType = SecurityTypeEnum::kNone; break; case IW_ENCODE_ALG_WEP: - setting.security_type = EMBER_ZCL_SECURITY_TYPE_WEP; + securityType = SecurityTypeEnum::kWep; break; case IW_ENCODE_ALG_TKIP: - setting.security_type = EMBER_ZCL_SECURITY_TYPE_WPA; + securityType = SecurityTypeEnum::kWpa; break; case IW_ENCODE_ALG_CCMP: - setting.security_type = EMBER_ZCL_SECURITY_TYPE_WPA2; + securityType = SecurityTypeEnum::kWpa2; break; default: - setting.security_type = EMBER_ZCL_SECURITY_TYPE_UNSPECIFIED; + securityType = SecurityTypeEnum::kUnspecified; break; } - securityType = setting.security_type; } #else wext_get_enc_ext("wlan0", &_security, &setting.key_idx, setting.password); @@ -321,30 +322,29 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(uint8_t & securityTyp switch (_security) { case IW_ENCODE_ALG_NONE: - setting.security_type = EMBER_ZCL_SECURITY_TYPE_NONE; + securityType = SecurityTypeEnum::kNone; break; case IW_ENCODE_ALG_WEP: - setting.security_type = EMBER_ZCL_SECURITY_TYPE_WEP; + securityType = SecurityTypeEnum::kWep; break; case IW_ENCODE_ALG_TKIP: if (_auth_type == WPA_SECURITY) - setting.security_type = EMBER_ZCL_SECURITY_TYPE_WPA; + securityType = SecurityTypeEnum::kWpa; else if (_auth_type == WPA2_SECURITY) - setting.security_type = EMBER_ZCL_SECURITY_TYPE_WPA2; + securityType = SecurityTypeEnum::kWpa2; break; case IW_ENCODE_ALG_CCMP: if (_auth_type == WPA_SECURITY) - setting.security_type = EMBER_ZCL_SECURITY_TYPE_WPA; + securityType = SecurityTypeEnum::kWpa; else if (_auth_type == WPA2_SECURITY) - setting.security_type = EMBER_ZCL_SECURITY_TYPE_WPA2; + securityType = SecurityTypeEnum::kWpa2; else if (_auth_type == WPA3_SECURITY) - setting.security_type = EMBER_ZCL_SECURITY_TYPE_WPA3; + securityType = SecurityTypeEnum::kWpa3; break; default: - setting.security_type = EMBER_ZCL_SECURITY_TYPE_UNSPECIFIED; + securityType = SecurityTypeEnum::Unspecified; break; } - securityType = setting.security_type; } #endif diff --git a/src/platform/Ameba/DiagnosticDataProviderImpl.h b/src/platform/Ameba/DiagnosticDataProviderImpl.h index 1ef6ee1b0a35a4..83484c1dfd5419 100644 --- a/src/platform/Ameba/DiagnosticDataProviderImpl.h +++ b/src/platform/Ameba/DiagnosticDataProviderImpl.h @@ -55,7 +55,7 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider #if CHIP_DEVICE_CONFIG_ENABLE_WIFI CHIP_ERROR GetWiFiBssId(ByteSpan & BssId) override; - CHIP_ERROR GetWiFiSecurityType(uint8_t & securityType) override; + CHIP_ERROR GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) override; CHIP_ERROR GetWiFiVersion(uint8_t & wifiVersion) override; CHIP_ERROR GetWiFiChannelNumber(uint16_t & channelNumber) override; CHIP_ERROR GetWiFiRssi(int8_t & rssi) override; diff --git a/src/platform/Beken/DiagnosticDataProviderImpl.cpp b/src/platform/Beken/DiagnosticDataProviderImpl.cpp index 1c27da06511eb6..f8cb5c584800e8 100644 --- a/src/platform/Beken/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Beken/DiagnosticDataProviderImpl.cpp @@ -173,38 +173,40 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBssId(ByteSpan & BssId) CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiVersion(uint8_t & wifiVersion) { // Support 802.11a/n Wi-Fi in Beken chipset - wiFiVersion = to_underlying(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionType::kN); + wiFiVersion = to_underlying(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum::kN); return CHIP_NO_ERROR; } -CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(uint8_t & securityType) +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) { + using app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum; + int cipher_type; cipher_type = bk_sta_cipher_type(); switch (cipher_type) { case BK_SECURITY_TYPE_NONE: - securityType = EMBER_ZCL_SECURITY_TYPE_NONE; + securityType = SecurityTypeEnum::kNone; break; case BK_SECURITY_TYPE_WEP: - securityType = EMBER_ZCL_SECURITY_TYPE_WEP; + securityType = SecurityTypeEnum::kWep; break; case BK_SECURITY_TYPE_WPA_TKIP: case BK_SECURITY_TYPE_WPA_AES: - securityType = EMBER_ZCL_SECURITY_TYPE_WPA; + securityType = SecurityTypeEnum::kWpa; break; case BK_SECURITY_TYPE_WPA2_AES: case BK_SECURITY_TYPE_WPA2_TKIP: case BK_SECURITY_TYPE_WPA2_MIXED: - securityType = EMBER_ZCL_SECURITY_TYPE_WPA2; + securityType = SecurityTypeEnum::kWpa2; break; case BK_SECURITY_TYPE_WPA3_SAE: case BK_SECURITY_TYPE_WPA3_WPA2_MIXED: - securityType = EMBER_ZCL_SECURITY_TYPE_WPA3; + securityType = SecurityTypeEnum::kWpa3; break; case BK_SECURITY_TYPE_AUTO: default: - securityType = EMBER_ZCL_SECURITY_TYPE_UNSPECIFIED; + securityType = SecurityTypeEnum::kUnspecified; } return CHIP_NO_ERROR; } diff --git a/src/platform/Beken/DiagnosticDataProviderImpl.h b/src/platform/Beken/DiagnosticDataProviderImpl.h index a8984868c6e495..ecae313ea1643e 100644 --- a/src/platform/Beken/DiagnosticDataProviderImpl.h +++ b/src/platform/Beken/DiagnosticDataProviderImpl.h @@ -51,7 +51,7 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider #if CHIP_DEVICE_CONFIG_ENABLE_WIFI CHIP_ERROR GetWiFiBssId(ByteSpan & BssId) override; - CHIP_ERROR GetWiFiSecurityType(uint8_t & securityType) override; + CHIP_ERROR GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) override; CHIP_ERROR GetWiFiVersion(uint8_t & wifiVersion) override; CHIP_ERROR GetWiFiChannelNumber(uint16_t & channelNumber) override; CHIP_ERROR GetWiFiRssi(int8_t & rssi) override; diff --git a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp index 831775ef50436f..f426c5a56cbd69 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp +++ b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp @@ -679,7 +679,7 @@ void ConnectivityManagerImpl::OnStationConnected() if (delegate) { delegate->OnConnectionStatusChanged( - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::WiFiConnectionStatus::kConnected)); + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum::kConnected)); } UpdateInternetConnectivityState(); @@ -697,7 +697,7 @@ void ConnectivityManagerImpl::OnStationDisconnected() WiFiDiagnosticsDelegate * delegate = GetDiagnosticDataProvider().GetWiFiDiagnosticsDelegate(); uint16_t reason = NetworkCommissioning::ESPWiFiDriver::GetInstance().GetLastDisconnectReason(); uint8_t associationFailureCause = - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCause::kUnknown); + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kUnknown); switch (reason) { @@ -711,7 +711,7 @@ void ConnectivityManagerImpl::OnStationDisconnected() case WIFI_REASON_CIPHER_SUITE_REJECTED: case WIFI_REASON_PAIRWISE_CIPHER_INVALID: associationFailureCause = - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCause::kAssociationFailed); + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kAssociationFailed); if (delegate) { delegate->OnAssociationFailureDetected(associationFailureCause, reason); @@ -724,7 +724,7 @@ void ConnectivityManagerImpl::OnStationDisconnected() case WIFI_REASON_INVALID_PMKID: case WIFI_REASON_802_1X_AUTH_FAILED: associationFailureCause = - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCause::kAuthenticationFailed); + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kAuthenticationFailed); if (delegate) { delegate->OnAssociationFailureDetected(associationFailureCause, reason); @@ -732,7 +732,7 @@ void ConnectivityManagerImpl::OnStationDisconnected() break; case WIFI_REASON_NO_AP_FOUND: associationFailureCause = - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCause::kSsidNotFound); + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kSsidNotFound); if (delegate) { delegate->OnAssociationFailureDetected(associationFailureCause, reason); @@ -756,7 +756,7 @@ void ConnectivityManagerImpl::OnStationDisconnected() { delegate->OnDisconnectionDetected(reason); delegate->OnConnectionStatusChanged( - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::WiFiConnectionStatus::kNotConnected)); + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum::kNotConnected)); } UpdateInternetConnectivityState(); diff --git a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp index c21e72e21abc59..e71a6a2386a954 100644 --- a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp +++ b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp @@ -62,22 +62,23 @@ InterfaceTypeEnum GetInterfaceType(const char * if_desc) } #if CHIP_DEVICE_CONFIG_ENABLE_WIFI -uint8_t MapAuthModeToSecurityType(wifi_auth_mode_t authmode) +app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum MapAuthModeToSecurityType(wifi_auth_mode_t authmode) { + using app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum; switch (authmode) { case WIFI_AUTH_OPEN: - return 1; + return SecurityTypeEnum::kNone; case WIFI_AUTH_WEP: - return 2; + return SecurityTypeEnum::kWep; case WIFI_AUTH_WPA_PSK: - return 3; + return SecurityTypeEnum::kWpa; case WIFI_AUTH_WPA2_PSK: - return 4; + return SecurityTypeEnum::kWpa2; case WIFI_AUTH_WPA3_PSK: - return 5; + return SecurityTypeEnum::kWpa3; default: - return 0; + return SecurityTypeEnum::kUnspecified; } } @@ -277,9 +278,11 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBssId(ByteSpan & BssId) return CHIP_NO_ERROR; } -CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(uint8_t & securityType) +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) { - securityType = 0; + using app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum; + + securityType = SecurityTypeEnum::kUnspecified; wifi_ap_record_t ap_info; esp_err_t err; diff --git a/src/platform/ESP32/DiagnosticDataProviderImpl.h b/src/platform/ESP32/DiagnosticDataProviderImpl.h index a63a4c375d42b1..ff8f252a6844f1 100644 --- a/src/platform/ESP32/DiagnosticDataProviderImpl.h +++ b/src/platform/ESP32/DiagnosticDataProviderImpl.h @@ -53,7 +53,7 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider #if CHIP_DEVICE_CONFIG_ENABLE_WIFI CHIP_ERROR GetWiFiBssId(ByteSpan & BssId) override; - CHIP_ERROR GetWiFiSecurityType(uint8_t & securityType) override; + CHIP_ERROR GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) override; CHIP_ERROR GetWiFiVersion(uint8_t & wifiVersion) override; CHIP_ERROR GetWiFiChannelNumber(uint16_t & channelNumber) override; CHIP_ERROR GetWiFiRssi(int8_t & rssi) override; diff --git a/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp b/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp index 69b7705217099e..19bb5154ceed3c 100644 --- a/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.cpp @@ -202,8 +202,10 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBssId(ByteSpan & value) return err; } -CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(uint8_t & securityType) +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) { + using app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum; + cy_wcm_associated_ap_info_t ap_info; cy_rslt_t result = CY_RSLT_SUCCESS; CHIP_ERROR err = CHIP_NO_ERROR; @@ -216,27 +218,27 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(uint8_t & securityTyp } if (ap_info.security == CY_WCM_SECURITY_OPEN) { - securityType = EMBER_ZCL_SECURITY_TYPE_NONE; + securityType = SecurityTypeEnum::kNone; } else if (ap_info.security & WPA3_SECURITY) { - securityType = EMBER_ZCL_SECURITY_TYPE_WPA3; + securityType = SecurityTypeEnum::kWpa3; } else if (ap_info.security & WPA2_SECURITY) { - securityType = EMBER_ZCL_SECURITY_TYPE_WPA2; + securityType = SecurityTypeEnum::kWpa2; } else if (ap_info.security & WPA_SECURITY) { - securityType = EMBER_ZCL_SECURITY_TYPE_WPA; + securityType = SecurityTypeEnum::kWpa; } else if (ap_info.security & WEP_ENABLED) { - securityType = EMBER_ZCL_SECURITY_TYPE_WEP; + securityType = SecurityTypeEnum::kWep; } else { - securityType = EMBER_ZCL_SECURITY_TYPE_UNSPECIFIED; + securityType = SecurityTypeEnum::kUnspecified; } exit: @@ -260,17 +262,17 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiVersion(uint8_t & wiFiVersion) /* VHT Capable */ if (bss_info.vht_cap) { - wiFiVersion = to_underlying(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionType::kAc); + wiFiVersion = to_underlying(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum::kAc); } /* HT Capable */ else if (bss_info.n_cap) { - wiFiVersion = to_underlying(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionType::kN); + wiFiVersion = to_underlying(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum::kN); } /* 11g Capable */ else { - wiFiVersion = to_underlying(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionType::kG); + wiFiVersion = to_underlying(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum::kG); } exit: diff --git a/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.h b/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.h index 3202cbbf9e7f39..80470d7996c22b 100644 --- a/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.h +++ b/src/platform/Infineon/PSOC6/DiagnosticDataProviderImpl.h @@ -76,7 +76,7 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider void ReleaseNetworkInterfaces(NetworkInterface * netifp) override; CHIP_ERROR GetWiFiBssId(ByteSpan & BssId) override; - CHIP_ERROR GetWiFiSecurityType(uint8_t & securityType) override; + CHIP_ERROR GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) override; CHIP_ERROR GetWiFiVersion(uint8_t & wifiVersion) override; CHIP_ERROR GetWiFiChannelNumber(uint16_t & channelNumber) override; CHIP_ERROR GetWiFiRssi(int8_t & rssi) override; diff --git a/src/platform/Infineon/PSOC6/NetworkCommissioningDriver.h b/src/platform/Infineon/PSOC6/NetworkCommissioningDriver.h index 76a232213e92c2..d0f8dcf2929e5a 100644 --- a/src/platform/Infineon/PSOC6/NetworkCommissioningDriver.h +++ b/src/platform/Infineon/PSOC6/NetworkCommissioningDriver.h @@ -17,6 +17,8 @@ #pragma once #include +#include +#include #include namespace chip { @@ -114,7 +116,7 @@ class P6WiFiDriver final : public WiFiDriver CHIP_ERROR ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, const char * key, uint8_t keyLen); static void scan_result_callback(cy_wcm_scan_result_t * result_ptr, void * user_data, cy_wcm_scan_status_t status); - uint8_t ConvertSecuritytype(cy_wcm_security_t security); + BitFlags ConvertSecuritytype(cy_wcm_security_t security); void OnConnectWiFiNetwork(); void OnScanWiFiNetworkDone(); diff --git a/src/platform/Infineon/PSOC6/NetworkCommissioningWiFiDriver.cpp b/src/platform/Infineon/PSOC6/NetworkCommissioningWiFiDriver.cpp index d8e413236953a5..a228582a4cbffb 100644 --- a/src/platform/Infineon/PSOC6/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/Infineon/PSOC6/NetworkCommissioningWiFiDriver.cpp @@ -190,28 +190,30 @@ void P6WiFiDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * callback } } -uint8_t P6WiFiDriver::ConvertSecuritytype(cy_wcm_security_t security) +BitFlags P6WiFiDriver::ConvertSecuritytype(cy_wcm_security_t security) { - uint8_t securityType = EMBER_ZCL_SECURITY_TYPE_UNSPECIFIED; + using app::Clusters::NetworkCommissioning::WiFiSecurity; + + BitFlags securityType; if (security == CY_WCM_SECURITY_OPEN) { - securityType = EMBER_ZCL_SECURITY_TYPE_NONE; + securityType.Set(WiFiSecurity::kUnencrypted); } else if (security & WPA3_SECURITY) { - securityType = EMBER_ZCL_SECURITY_TYPE_WPA3; + securityType.Set(WiFiSecurity::kWpa3Personal); } else if (security & WPA2_SECURITY) { - securityType = EMBER_ZCL_SECURITY_TYPE_WPA2; + securityType.Set(WiFiSecurity::kWpa2Personal); } else if (security & WPA_SECURITY) { - securityType = EMBER_ZCL_SECURITY_TYPE_WPA; + securityType.Set(WiFiSecurity::kWpaPersonal); } else if (security & WEP_ENABLED) { - securityType = EMBER_ZCL_SECURITY_TYPE_WEP; + securityType.Set(WiFiSecurity::kWep); } return securityType; } @@ -229,9 +231,9 @@ void P6WiFiDriver::scan_result_callback(cy_wcm_scan_result_t * result_ptr, void { /* Copy Scan results and increment the AP count */ memcpy(&scan_result_list[NumAP], (void *) result_ptr, sizeof(cy_wcm_scan_result_t)); - /* Convert Security type to proper EmberAfSecurityType value */ - scan_result_list[NumAP].security = - static_cast(P6WiFiDriver::GetInstance().ConvertSecuritytype(scan_result_list[NumAP].security)); + /* Convert Security type to proper WiFiSecurity value */ + scan_result_list[NumAP].security = static_cast( + P6WiFiDriver::GetInstance().ConvertSecuritytype(scan_result_list[NumAP].security).Raw()); NumAP++; } /* end of if ( result_ptr != NULL ) */ } /* end of else */ diff --git a/src/platform/Linux/ConnectivityManagerImpl.cpp b/src/platform/Linux/ConnectivityManagerImpl.cpp index df0ef5602db5f2..f3d3d2b138bd54 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.cpp +++ b/src/platform/Linux/ConnectivityManagerImpl.cpp @@ -406,12 +406,12 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaFiW1Wpa_supplicant1Inte if (delegate) { delegate->OnDisconnectionDetected(reason); - delegate->OnConnectionStatusChanged(static_cast(WiFiConnectionStatus::kConnected)); + delegate->OnConnectionStatusChanged(static_cast(ConnectionStatusEnum::kConnected)); } if (mAssociattionStarted) { - uint8_t associationFailureCause = static_cast(AssociationFailureCause::kUnknown); + uint8_t associationFailureCause = static_cast(AssociationFailureCauseEnum::kUnknown); uint16_t status = WLAN_STATUS_UNSPECIFIED_FAILURE; switch (abs(reason)) @@ -421,13 +421,13 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaFiW1Wpa_supplicant1Inte case WLAN_REASON_DISASSOC_STA_HAS_LEFT: case WLAN_REASON_DISASSOC_LOW_ACK: case WLAN_REASON_BSS_TRANSITION_DISASSOC: - associationFailureCause = static_cast(AssociationFailureCause::kAssociationFailed); + associationFailureCause = static_cast(AssociationFailureCauseEnum::kAssociationFailed); status = wpa_fi_w1_wpa_supplicant1_interface_get_assoc_status_code(mWpaSupplicant.iface); break; case WLAN_REASON_PREV_AUTH_NOT_VALID: case WLAN_REASON_DEAUTH_LEAVING: case WLAN_REASON_IEEE_802_1X_AUTH_FAILED: - associationFailureCause = static_cast(AssociationFailureCause::kAuthenticationFailed); + associationFailureCause = static_cast(AssociationFailureCauseEnum::kAuthenticationFailed); status = wpa_fi_w1_wpa_supplicant1_interface_get_auth_status_code(mWpaSupplicant.iface); break; default: @@ -453,7 +453,7 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaFiW1Wpa_supplicant1Inte { if (delegate) { - delegate->OnConnectionStatusChanged(static_cast(WiFiConnectionStatus::kNotConnected)); + delegate->OnConnectionStatusChanged(static_cast(ConnectionStatusEnum::kNotConnected)); } DeviceLayer::SystemLayer().ScheduleLambda([]() { ConnectivityMgrImpl().UpdateNetworkStatus(); }); @@ -1188,7 +1188,7 @@ CHIP_ERROR ConnectivityManagerImpl::GetWiFiBssId(ByteSpan & value) return err; } -CHIP_ERROR ConnectivityManagerImpl::GetWiFiSecurityType(uint8_t & securityType) +CHIP_ERROR ConnectivityManagerImpl::GetWiFiSecurityType(SecurityTypeEnum & securityType) { const gchar * mode = nullptr; @@ -1205,35 +1205,35 @@ CHIP_ERROR ConnectivityManagerImpl::GetWiFiSecurityType(uint8_t & securityType) if (strncmp(mode, "WPA-PSK", 7) == 0) { - securityType = EMBER_ZCL_SECURITY_TYPE_WPA; + securityType = SecurityTypeEnum::kWpa; } else if (strncmp(mode, "WPA2-PSK", 8) == 0) { - securityType = EMBER_ZCL_SECURITY_TYPE_WPA2; + securityType = SecurityTypeEnum::kWpa2; } else if (strncmp(mode, "WPA2-EAP", 8) == 0) { - securityType = EMBER_ZCL_SECURITY_TYPE_WPA2; + securityType = SecurityTypeEnum::kWpa2; } else if (strncmp(mode, "WPA3-PSK", 8) == 0) { - securityType = EMBER_ZCL_SECURITY_TYPE_WPA3; + securityType = SecurityTypeEnum::kWpa3; } else if (strncmp(mode, "WEP", 3) == 0) { - securityType = EMBER_ZCL_SECURITY_TYPE_WEP; + securityType = SecurityTypeEnum::kWep; } else if (strncmp(mode, "NONE", 4) == 0) { - securityType = EMBER_ZCL_SECURITY_TYPE_NONE; + securityType = SecurityTypeEnum::kNone; } else if (strncmp(mode, "WPA-NONE", 8) == 0) { - securityType = EMBER_ZCL_SECURITY_TYPE_NONE; + securityType = SecurityTypeEnum::kNone; } else { - securityType = EMBER_ZCL_SECURITY_TYPE_UNSPECIFIED; + securityType = SecurityTypeEnum::kUnspecified; } return CHIP_NO_ERROR; @@ -1242,7 +1242,7 @@ CHIP_ERROR ConnectivityManagerImpl::GetWiFiSecurityType(uint8_t & securityType) CHIP_ERROR ConnectivityManagerImpl::GetWiFiVersion(uint8_t & wiFiVersion) { // We don't have direct API to get the WiFi version yet, return 802.11n on Linux simulation. - wiFiVersion = to_underlying(WiFiVersionType::kN); + wiFiVersion = to_underlying(WiFiVersionEnum::kN); return CHIP_NO_ERROR; } diff --git a/src/platform/Linux/ConnectivityManagerImpl.h b/src/platform/Linux/ConnectivityManagerImpl.h index fe1591185af58e..1ddb171d405a3c 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.h +++ b/src/platform/Linux/ConnectivityManagerImpl.h @@ -136,7 +136,7 @@ class ConnectivityManagerImpl final : public ConnectivityManager, bool IsWiFiManagementStarted(); int32_t GetDisconnectReason(); CHIP_ERROR GetWiFiBssId(ByteSpan & value); - CHIP_ERROR GetWiFiSecurityType(uint8_t & securityType); + CHIP_ERROR GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType); CHIP_ERROR GetWiFiVersion(uint8_t & wiFiVersion); CHIP_ERROR GetConfiguredNetwork(NetworkCommissioning::Network & network); CHIP_ERROR StartWiFiScan(ByteSpan ssid, NetworkCommissioning::WiFiDriver::ScanCallback * callback); diff --git a/src/platform/Linux/DiagnosticDataProviderImpl.cpp b/src/platform/Linux/DiagnosticDataProviderImpl.cpp index 4a348b89cc2f0c..2444b359cd83e3 100644 --- a/src/platform/Linux/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Linux/DiagnosticDataProviderImpl.cpp @@ -823,7 +823,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBssId(ByteSpan & value) return ConnectivityMgrImpl().GetWiFiBssId(value); } -CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(uint8_t & securityType) +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) { return ConnectivityMgrImpl().GetWiFiSecurityType(securityType); } diff --git a/src/platform/Linux/DiagnosticDataProviderImpl.h b/src/platform/Linux/DiagnosticDataProviderImpl.h index 5d09747c90225d..7dab9dafa68d84 100644 --- a/src/platform/Linux/DiagnosticDataProviderImpl.h +++ b/src/platform/Linux/DiagnosticDataProviderImpl.h @@ -85,7 +85,7 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider #if CHIP_DEVICE_CONFIG_ENABLE_WPA CHIP_ERROR GetWiFiVersion(uint8_t & wiFiVersion) override; CHIP_ERROR GetWiFiBssId(ByteSpan & value) override; - CHIP_ERROR GetWiFiSecurityType(uint8_t & securityType) override; + CHIP_ERROR GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) override; #endif private: diff --git a/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.cpp b/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.cpp index 143492e363078a..9b40585f108c4c 100644 --- a/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.cpp +++ b/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.cpp @@ -246,8 +246,10 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBssId(ByteSpan & BssId) return CHIP_NO_ERROR; } -CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(uint8_t & securityType) +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) { + using app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum; + securityType = SecurityTypeEnum::kUnspecified; // int authmode; // authmode = mgmr_get_security_type(); diff --git a/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.h b/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.h index f3e403d5294e61..357e3dbb9a3ef4 100644 --- a/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.h +++ b/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.h @@ -51,7 +51,7 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider CHIP_ERROR GetNetworkInterfaces(NetworkInterface ** netifpp) override; void ReleaseNetworkInterfaces(NetworkInterface * netifp) override; CHIP_ERROR GetWiFiBssId(ByteSpan & BssId) override; - CHIP_ERROR GetWiFiSecurityType(uint8_t & securityType) override; + CHIP_ERROR GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) override; CHIP_ERROR GetWiFiVersion(uint8_t & wifiVersion) override; CHIP_ERROR GetWiFiChannelNumber(uint16_t & channelNumber) override; CHIP_ERROR GetWiFiRssi(int8_t & rssi) override; diff --git a/src/platform/bouffalolab/BL602/PlatformManagerImpl.cpp b/src/platform/bouffalolab/BL602/PlatformManagerImpl.cpp index 86b4421eb751f1..a8739d6adfbe9e 100644 --- a/src/platform/bouffalolab/BL602/PlatformManagerImpl.cpp +++ b/src/platform/bouffalolab/BL602/PlatformManagerImpl.cpp @@ -69,7 +69,7 @@ static void WifiStaDisconect(void) uint16_t reason = NetworkCommissioning::BLWiFiDriver::GetInstance().GetLastDisconnectReason(); uint8_t associationFailureCause = - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCause::kUnknown); + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kUnknown); WiFiDiagnosticsDelegate * delegate = GetDiagnosticDataProvider().GetWiFiDiagnosticsDelegate(); if (ConnectivityManagerImpl::mWiFiStationState == ConnectivityManager::kWiFiStationState_Disconnecting) @@ -85,7 +85,7 @@ static void WifiStaDisconect(void) case WLAN_FW_ASSOCIATE_FAIILURE: case WLAN_FW_4WAY_HANDSHAKE_ERROR_PSK_TIMEOUT_FAILURE: associationFailureCause = - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCause::kAssociationFailed); + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kAssociationFailed); if (delegate) { delegate->OnAssociationFailureDetected(associationFailureCause, reason); @@ -102,7 +102,7 @@ static void WifiStaDisconect(void) case WLAN_FW_DISCONNECT_BY_USER_WITH_DEAUTH: case WLAN_FW_DISCONNECT_BY_USER_NO_DEAUTH: associationFailureCause = - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCause::kAuthenticationFailed); + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kAuthenticationFailed); if (delegate) { delegate->OnAssociationFailureDetected(associationFailureCause, reason); @@ -110,7 +110,7 @@ static void WifiStaDisconect(void) break; case WLAN_FW_SCAN_NO_BSSID_AND_CHANNEL: associationFailureCause = - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCause::kSsidNotFound); + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kSsidNotFound); if (delegate) { delegate->OnAssociationFailureDetected(associationFailureCause, reason); @@ -137,7 +137,7 @@ static void WifiStaDisconect(void) { delegate->OnDisconnectionDetected(reason); delegate->OnConnectionStatusChanged( - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::WiFiConnectionStatus::kNotConnected)); + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum::kNotConnected)); } ConnectivityMgrImpl().ChangeWiFiStationState(ConnectivityManagerImpl::kWiFiStationState_Disconnecting); @@ -164,7 +164,7 @@ static void WifiStaConnected(void) if (delegate) { delegate->OnConnectionStatusChanged( - chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::WiFiConnectionStatus::kConnected)); + chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum::kConnected)); } } typedef void (*aos_event_cb)(input_event_t * event, void * private_data); diff --git a/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.cpp b/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.cpp index e7326edd91f2fa..af6f39631250c4 100644 --- a/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.cpp +++ b/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.cpp @@ -50,11 +50,16 @@ CHIP_ERROR DiagnosticDataProviderImplNrf::GetWiFiBssId(ByteSpan & value) return err; } -CHIP_ERROR DiagnosticDataProviderImplNrf::GetWiFiSecurityType(uint8_t & securityType) +CHIP_ERROR +DiagnosticDataProviderImplNrf::GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) { + using app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum; + WiFiManager::WiFiInfo info; CHIP_ERROR err = WiFiManager::Instance().GetWiFiInfo(info); - securityType = info.mSecurityType; + // TODO: The values here are probably wrong. See + // https://github.com/project-chip/connectedhomeip/issues/25096 + securityType = static_cast(info.mSecurityType); return err; } diff --git a/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.h b/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.h index 3b770e627428e8..1f6307726fc0ba 100644 --- a/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.h +++ b/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.h @@ -33,7 +33,7 @@ class DiagnosticDataProviderImplNrf : public DiagnosticDataProviderImpl public: #ifdef CONFIG_WIFI_NRF700X CHIP_ERROR GetWiFiBssId(ByteSpan & value) override; - CHIP_ERROR GetWiFiSecurityType(uint8_t & securityType) override; + CHIP_ERROR GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) override; CHIP_ERROR GetWiFiVersion(uint8_t & wiFiVersion) override; CHIP_ERROR GetWiFiChannelNumber(uint16_t & channelNumber) override; CHIP_ERROR GetWiFiRssi(int8_t & rssi) override; diff --git a/src/platform/nxp/mw320/ConnectivityManagerImpl.cpp b/src/platform/nxp/mw320/ConnectivityManagerImpl.cpp index 75b6058a28b58b..c5aa4adf1f9b69 100644 --- a/src/platform/nxp/mw320/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/mw320/ConnectivityManagerImpl.cpp @@ -209,42 +209,44 @@ CHIP_ERROR ConnectivityManagerImpl::GetWiFiBssId(ByteSpan & value) return CHIP_NO_ERROR; } -CHIP_ERROR ConnectivityManagerImpl::GetWiFiSecurityType(uint8_t & securityType) +CHIP_ERROR ConnectivityManagerImpl::GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) { + using app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum; + int ret = wlan_get_current_network(&sta_network); if (ret != WM_SUCCESS) { // Set as no security by default - securityType = EMBER_ZCL_SECURITY_TYPE_NONE; + securityType = SecurityTypeEnum::kNone; return CHIP_NO_ERROR; } switch (sta_network.security.type) { case WLAN_SECURITY_WEP_OPEN: case WLAN_SECURITY_WEP_SHARED: - securityType = EMBER_ZCL_SECURITY_TYPE_WEP; + securityType = SecurityTypeEnum::kWep; break; case WLAN_SECURITY_WPA: - securityType = EMBER_ZCL_SECURITY_TYPE_WPA; + securityType = SecurityTypeEnum::kWpa; break; case WLAN_SECURITY_WPA2: - securityType = EMBER_ZCL_SECURITY_TYPE_WPA2; + securityType = SecurityTypeEnum::kWpa2; break; case WLAN_SECURITY_WPA3_SAE: - securityType = EMBER_ZCL_SECURITY_TYPE_WPA3; + securityType = SecurityTypeEnum::kWpa3; break; case WLAN_SECURITY_NONE: default: // Default: No_security - securityType = EMBER_ZCL_SECURITY_TYPE_NONE; + securityType = SecurityTypeEnum::kNone; } - ChipLogProgress(DeviceLayer, "GetWiFiSecurityType: %u", securityType); + ChipLogProgress(DeviceLayer, "GetWiFiSecurityType: %u", to_underlying(securityType)); return CHIP_NO_ERROR; } CHIP_ERROR ConnectivityManagerImpl::GetWiFiVersion(uint8_t & wiFiVersion) { - wiFiVersion = to_underlying(WiFiVersionType::kN); + wiFiVersion = to_underlying(WiFiVersionEnum::kN); ChipLogProgress(DeviceLayer, "GetWiFiVersion: %u", wiFiVersion); return CHIP_NO_ERROR; } @@ -371,23 +373,23 @@ bool ConnectivityManagerImpl::_GetBssInfo(const uint8_t sid, NetworkCommissionin // => security if (res.wep) { - result.security.SetRaw(EMBER_ZCL_SECURITY_TYPE_WEP); + result.security.Set(WiFiSecurity::kWep); } else if (res.wpa) { - result.security.SetRaw(EMBER_ZCL_SECURITY_TYPE_WPA); + result.security.Set(WiFiSecurity::kWpaPersonal); } else if ((res.wpa2) || (res.wpa2_entp)) { - result.security.SetRaw(EMBER_ZCL_SECURITY_TYPE_WPA2); + result.security.Set(WiFiSecurity::kWpa2Personal); } else if (res.wpa3_sae) { - result.security.SetRaw(EMBER_ZCL_SECURITY_TYPE_WPA3); + result.security.Set(WiFiSecurity::kWpa3Personal); } else { - result.security.SetRaw(EMBER_ZCL_SECURITY_TYPE_NONE); + result.security.Set(WiFiSecurity::kUnencrypted); } return true; diff --git a/src/platform/nxp/mw320/ConnectivityManagerImpl.h b/src/platform/nxp/mw320/ConnectivityManagerImpl.h index fa1b2a89150a06..83360590706920 100644 --- a/src/platform/nxp/mw320/ConnectivityManagerImpl.h +++ b/src/platform/nxp/mw320/ConnectivityManagerImpl.h @@ -85,7 +85,7 @@ class ConnectivityManagerImpl final : public ConnectivityManager, #if CHIP_DEVICE_CONFIG_ENABLE_WPA void StartWiFiManagement(); CHIP_ERROR GetWiFiBssId(ByteSpan & value); - CHIP_ERROR GetWiFiSecurityType(uint8_t & securityType); + CHIP_ERROR GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType); CHIP_ERROR GetWiFiVersion(uint8_t & wiFiVersion); #endif CHIP_ERROR GetConfiguredNetwork(NetworkCommissioning::Network & network); diff --git a/src/platform/nxp/mw320/DiagnosticDataProviderImpl.cpp b/src/platform/nxp/mw320/DiagnosticDataProviderImpl.cpp index 244cd30fde1cfc..4c6e7df903c8d6 100644 --- a/src/platform/nxp/mw320/DiagnosticDataProviderImpl.cpp +++ b/src/platform/nxp/mw320/DiagnosticDataProviderImpl.cpp @@ -299,7 +299,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBssId(ByteSpan & value) return ConnectivityMgrImpl().GetWiFiBssId(value); } -CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(uint8_t & securityType) +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) { return ConnectivityMgrImpl().GetWiFiSecurityType(securityType); } diff --git a/src/platform/nxp/mw320/DiagnosticDataProviderImpl.h b/src/platform/nxp/mw320/DiagnosticDataProviderImpl.h index 939a692fcf4baf..1314aaa5a64883 100644 --- a/src/platform/nxp/mw320/DiagnosticDataProviderImpl.h +++ b/src/platform/nxp/mw320/DiagnosticDataProviderImpl.h @@ -71,7 +71,7 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider CHIP_ERROR GetWiFiVersion(uint8_t & wiFiVersion) override; CHIP_ERROR GetWiFiBssId(ByteSpan & value) override; - CHIP_ERROR GetWiFiSecurityType(uint8_t & securityType) override; + CHIP_ERROR GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) override; }; /** diff --git a/src/platform/silabs/DiagnosticDataProviderImpl.cpp b/src/platform/silabs/DiagnosticDataProviderImpl.cpp index 0cce168fc3b298..64451504c038f2 100644 --- a/src/platform/silabs/DiagnosticDataProviderImpl.cpp +++ b/src/platform/silabs/DiagnosticDataProviderImpl.cpp @@ -360,13 +360,17 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBssId(ByteSpan & BssId) return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } -CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(uint8_t & securityType) +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) { + using app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum; + wfx_wifi_scan_result_t ap; int32_t err = wfx_get_ap_info(&ap); if (err == 0) { - securityType = ap.security; + // TODO: Is this actually right? Do the wfx_wifi_scan_result_t values + // match the Matter spec ones? + securityType = static_cast(ap.security); return CHIP_NO_ERROR; } return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; @@ -374,7 +378,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(uint8_t & securityTyp CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiVersion(uint8_t & wifiVersion) { - wifiVersion = to_underlying(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionType::kN); + wifiVersion = to_underlying(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum::kN); return CHIP_NO_ERROR; } diff --git a/src/platform/silabs/DiagnosticDataProviderImpl.h b/src/platform/silabs/DiagnosticDataProviderImpl.h index 869a50bc636319..bbaa8bff7dd26d 100644 --- a/src/platform/silabs/DiagnosticDataProviderImpl.h +++ b/src/platform/silabs/DiagnosticDataProviderImpl.h @@ -58,7 +58,7 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider #if SL_WIFI CHIP_ERROR GetWiFiBssId(ByteSpan & BssId) override; - CHIP_ERROR GetWiFiSecurityType(uint8_t & securityType) override; + CHIP_ERROR GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) override; CHIP_ERROR GetWiFiVersion(uint8_t & wifiVersion) override; CHIP_ERROR GetWiFiChannelNumber(uint16_t & channelNumber) override; CHIP_ERROR GetWiFiRssi(int8_t & rssi) override; diff --git a/src/platform/webos/ConnectivityManagerImpl.cpp b/src/platform/webos/ConnectivityManagerImpl.cpp index be4b9a57f23f07..32870b75c180aa 100644 --- a/src/platform/webos/ConnectivityManagerImpl.cpp +++ b/src/platform/webos/ConnectivityManagerImpl.cpp @@ -402,12 +402,12 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaFiW1Wpa_supplicant1Inte if (delegate) { delegate->OnDisconnectionDetected(reason); - delegate->OnConnectionStatusChanged(static_cast(WiFiConnectionStatus::kConnected)); + delegate->OnConnectionStatusChanged(static_cast(ConnectionStatusEnum::kConnected)); } if (mAssociattionStarted) { - uint8_t associationFailureCause = static_cast(AssociationFailureCause::kUnknown); + uint8_t associationFailureCause = static_cast(AssociationFailureCauseEnum::kUnknown); uint16_t status = WLAN_STATUS_UNSPECIFIED_FAILURE; switch (abs(reason)) @@ -417,13 +417,13 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaFiW1Wpa_supplicant1Inte case WLAN_REASON_DISASSOC_STA_HAS_LEFT: case WLAN_REASON_DISASSOC_LOW_ACK: case WLAN_REASON_BSS_TRANSITION_DISASSOC: - associationFailureCause = static_cast(AssociationFailureCause::kAssociationFailed); + associationFailureCause = static_cast(AssociationFailureCauseEnum::kAssociationFailed); status = wpa_fi_w1_wpa_supplicant1_interface_get_assoc_status_code(mWpaSupplicant.iface); break; case WLAN_REASON_PREV_AUTH_NOT_VALID: case WLAN_REASON_DEAUTH_LEAVING: case WLAN_REASON_IEEE_802_1X_AUTH_FAILED: - associationFailureCause = static_cast(AssociationFailureCause::kAuthenticationFailed); + associationFailureCause = static_cast(AssociationFailureCauseEnum::kAuthenticationFailed); status = wpa_fi_w1_wpa_supplicant1_interface_get_auth_status_code(mWpaSupplicant.iface); break; default: @@ -441,7 +441,7 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaFiW1Wpa_supplicant1Inte { if (delegate) { - delegate->OnConnectionStatusChanged(static_cast(WiFiConnectionStatus::kNotConnected)); + delegate->OnConnectionStatusChanged(static_cast(ConnectionStatusEnum::kNotConnected)); } DeviceLayer::SystemLayer().ScheduleLambda([]() { ConnectivityMgrImpl().UpdateNetworkStatus(); }); @@ -1150,7 +1150,7 @@ CHIP_ERROR ConnectivityManagerImpl::GetWiFiBssId(ByteSpan & value) return err; } -CHIP_ERROR ConnectivityManagerImpl::GetWiFiSecurityType(uint8_t & securityType) +CHIP_ERROR ConnectivityManagerImpl::GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) { const gchar * mode = nullptr; @@ -1167,35 +1167,35 @@ CHIP_ERROR ConnectivityManagerImpl::GetWiFiSecurityType(uint8_t & securityType) if (strncmp(mode, "WPA-PSK", 7) == 0) { - securityType = EMBER_ZCL_SECURITY_TYPE_WPA; + securityType = SecurityTypeEnum::kWpa; } else if (strncmp(mode, "WPA2-PSK", 8) == 0) { - securityType = EMBER_ZCL_SECURITY_TYPE_WPA2; + securityType = SecurityTypeEnum::kWpa2; } else if (strncmp(mode, "WPA2-EAP", 8) == 0) { - securityType = EMBER_ZCL_SECURITY_TYPE_WPA2; + securityType = SecurityTypeEnum::kWpa2; } else if (strncmp(mode, "WPA3-PSK", 8) == 0) { - securityType = EMBER_ZCL_SECURITY_TYPE_WPA3; + securityType = SecurityTypeEnum::kWpa3; } else if (strncmp(mode, "WEP", 3) == 0) { - securityType = EMBER_ZCL_SECURITY_TYPE_WEP; + securityType = SecurityTypeEnum::kWep; } else if (strncmp(mode, "NONE", 4) == 0) { - securityType = EMBER_ZCL_SECURITY_TYPE_NONE; + securityType = SecurityTypeEnum::kNone; } else if (strncmp(mode, "WPA-NONE", 8) == 0) { - securityType = EMBER_ZCL_SECURITY_TYPE_NONE; + securityType = SecurityTypeEnum::kNone; } else { - securityType = EMBER_ZCL_SECURITY_TYPE_UNSPECIFIED; + securityType = SecurityTypeEnum::kUnspecified; } return CHIP_NO_ERROR; @@ -1204,7 +1204,7 @@ CHIP_ERROR ConnectivityManagerImpl::GetWiFiSecurityType(uint8_t & securityType) CHIP_ERROR ConnectivityManagerImpl::GetWiFiVersion(uint8_t & wiFiVersion) { // We don't have direct API to get the WiFi version yet, return 802.11n on Linux simulation. - wiFiVersion = to_underlying(WiFiVersionType::kN); + wiFiVersion = to_underlying(WiFiVersionEnum::kN); return CHIP_NO_ERROR; } diff --git a/src/platform/webos/ConnectivityManagerImpl.h b/src/platform/webos/ConnectivityManagerImpl.h index d790ff667455da..2d3b08c647282e 100644 --- a/src/platform/webos/ConnectivityManagerImpl.h +++ b/src/platform/webos/ConnectivityManagerImpl.h @@ -136,7 +136,7 @@ class ConnectivityManagerImpl final : public ConnectivityManager, bool IsWiFiManagementStarted(); int32_t GetDisconnectReason(); CHIP_ERROR GetWiFiBssId(ByteSpan & value); - CHIP_ERROR GetWiFiSecurityType(uint8_t & securityType); + CHIP_ERROR GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType); CHIP_ERROR GetWiFiVersion(uint8_t & wiFiVersion); CHIP_ERROR GetConfiguredNetwork(NetworkCommissioning::Network & network); CHIP_ERROR StartWiFiScan(ByteSpan ssid, NetworkCommissioning::WiFiDriver::ScanCallback * callback); diff --git a/src/platform/webos/DiagnosticDataProviderImpl.cpp b/src/platform/webos/DiagnosticDataProviderImpl.cpp index 4035e2400e0bf3..22790a4705849c 100644 --- a/src/platform/webos/DiagnosticDataProviderImpl.cpp +++ b/src/platform/webos/DiagnosticDataProviderImpl.cpp @@ -792,7 +792,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBssId(ByteSpan & value) return ConnectivityMgrImpl().GetWiFiBssId(value); } -CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(uint8_t & securityType) +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) { return ConnectivityMgrImpl().GetWiFiSecurityType(securityType); } diff --git a/src/platform/webos/DiagnosticDataProviderImpl.h b/src/platform/webos/DiagnosticDataProviderImpl.h index a16a6673404e5b..ba933b8743dfbf 100644 --- a/src/platform/webos/DiagnosticDataProviderImpl.h +++ b/src/platform/webos/DiagnosticDataProviderImpl.h @@ -83,7 +83,7 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider #if CHIP_DEVICE_CONFIG_ENABLE_WPA CHIP_ERROR GetWiFiVersion(uint8_t & wiFiVersion) override; CHIP_ERROR GetWiFiBssId(ByteSpan & value) override; - CHIP_ERROR GetWiFiSecurityType(uint8_t & securityType) override; + CHIP_ERROR GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) override; #endif private: diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index df3fd75a163dba..956e1628f22048 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -7986,9 +7986,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace SecurityType { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); @@ -8003,9 +8004,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8018,7 +8019,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::WiFiNetworkDia EmberAfStatus SetNull(chip::EndpointId endpoint) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); @@ -8026,7 +8027,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) } EmberAfStatus Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -8041,9 +8042,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, namespace WiFiVersion { EmberAfStatus Get(chip::EndpointId endpoint, - DataModel::Nullable & value) + DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); @@ -8058,9 +8059,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiVersionType value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8073,7 +8074,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::WiFiNetworkDia EmberAfStatus SetNull(chip::EndpointId endpoint) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); @@ -8081,7 +8082,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) } EmberAfStatus Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index a7a5778ee7d27f..a34bcdffbef3bb 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -1413,20 +1413,20 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace SecurityType { EmberAfStatus Get(chip::EndpointId endpoint, - DataModel::Nullable & value); // SecurityType -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::WiFiNetworkDiagnostics::SecurityType value); + DataModel::Nullable & value); // SecurityTypeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum value); EmberAfStatus SetNull(chip::EndpointId endpoint); EmberAfStatus Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); } // namespace SecurityType namespace WiFiVersion { EmberAfStatus Get(chip::EndpointId endpoint, - DataModel::Nullable & value); // WiFiVersionType -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiVersionType value); + DataModel::Nullable & value); // WiFiVersionEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum value); EmberAfStatus SetNull(chip::EndpointId endpoint); EmberAfStatus Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); } // namespace WiFiVersion namespace ChannelNumber { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index 975887b2b10eb3..138f23bafc022a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -835,9 +835,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ThreadNetworkDiagnostic } } -static auto __attribute__((unused)) EnsureKnownEnumValue(WiFiNetworkDiagnostics::AssociationFailureCause val) +static auto __attribute__((unused)) EnsureKnownEnumValue(WiFiNetworkDiagnostics::AssociationFailureCauseEnum val) { - using EnumType = WiFiNetworkDiagnostics::AssociationFailureCause; + using EnumType = WiFiNetworkDiagnostics::AssociationFailureCauseEnum; switch (val) { case EnumType::kUnknown: @@ -849,48 +849,37 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(WiFiNetworkDiagnostics: return static_cast(4); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(WiFiNetworkDiagnostics::SecurityType val) +static auto __attribute__((unused)) EnsureKnownEnumValue(WiFiNetworkDiagnostics::ConnectionStatusEnum val) { - using EnumType = WiFiNetworkDiagnostics::SecurityType; + using EnumType = WiFiNetworkDiagnostics::ConnectionStatusEnum; switch (val) { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM - case EnumType::kUnspecified: - case EnumType::kNone: - case EnumType::kWep: - case EnumType::kWpa: - case EnumType::kWpa2: - case EnumType::kWpa3: -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM - case EMBER_ZCL_SECURITY_TYPE_UNSPECIFIED: - case EMBER_ZCL_SECURITY_TYPE_NONE: - case EMBER_ZCL_SECURITY_TYPE_WEP: - case EMBER_ZCL_SECURITY_TYPE_WPA: - case EMBER_ZCL_SECURITY_TYPE_WPA2: - case EMBER_ZCL_SECURITY_TYPE_WPA3: -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM + case EnumType::kConnected: + case EnumType::kNotConnected: return val; default: - return static_cast(6); + return static_cast(2); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(WiFiNetworkDiagnostics::WiFiConnectionStatus val) +static auto __attribute__((unused)) EnsureKnownEnumValue(WiFiNetworkDiagnostics::SecurityTypeEnum val) { - using EnumType = WiFiNetworkDiagnostics::WiFiConnectionStatus; + using EnumType = WiFiNetworkDiagnostics::SecurityTypeEnum; switch (val) { - case EnumType::kConnected: - case EnumType::kNotConnected: + case EnumType::kUnspecified: + case EnumType::kNone: + case EnumType::kWep: + case EnumType::kWpa: + case EnumType::kWpa2: + case EnumType::kWpa3: return val; default: - return static_cast(2); + return static_cast(6); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(WiFiNetworkDiagnostics::WiFiVersionType val) +static auto __attribute__((unused)) EnsureKnownEnumValue(WiFiNetworkDiagnostics::WiFiVersionEnum val) { - using EnumType = WiFiNetworkDiagnostics::WiFiVersionType; + using EnumType = WiFiNetworkDiagnostics::WiFiVersionEnum; switch (val) { case EnumType::kA: 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 53979c1e483e2b..3843edaa5baaba 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 @@ -976,8 +976,8 @@ enum class ThreadNetworkDiagnosticsFeature : uint32_t namespace WiFiNetworkDiagnostics { -// Enum for AssociationFailureCause -enum class AssociationFailureCause : uint8_t +// Enum for AssociationFailureCauseEnum +enum class AssociationFailureCauseEnum : uint8_t { kUnknown = 0x00, kAssociationFailed = 0x01, @@ -990,43 +990,36 @@ enum class AssociationFailureCause : uint8_t kUnknownEnumValue = 4, }; -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -// Enum for SecurityType -enum class SecurityType : uint8_t +// Enum for ConnectionStatusEnum +enum class ConnectionStatusEnum : uint8_t { - kUnspecified = 0x00, - kNone = 0x01, - kWep = 0x02, - kWpa = 0x03, - kWpa2 = 0x04, - kWpa3 = 0x05, + kConnected = 0x00, + kNotConnected = 0x01, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 2, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using SecurityType = EmberAfSecurityType; -static SecurityType __attribute__((unused)) kSecurityTypekUnknownEnumValue = static_cast(6); -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -// Enum for WiFiConnectionStatus -enum class WiFiConnectionStatus : uint8_t +// Enum for SecurityTypeEnum +enum class SecurityTypeEnum : uint8_t { - kConnected = 0x00, - kNotConnected = 0x01, + kUnspecified = 0x00, + kNone = 0x01, + kWep = 0x02, + kWpa = 0x03, + kWpa2 = 0x04, + kWpa3 = 0x05, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 6, }; -// Enum for WiFiVersionType -enum class WiFiVersionType : uint8_t +// Enum for WiFiVersionEnum +enum class WiFiVersionEnum : uint8_t { kA = 0x00, kB = 0x01, 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 5ee93ffd9987e6..b2eb0e244fd787 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 @@ -9722,9 +9722,9 @@ struct TypeInfo namespace SecurityType { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SecurityType::Id; } @@ -9734,9 +9734,9 @@ struct TypeInfo namespace WiFiVersion { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::WiFiVersion::Id; } @@ -9981,8 +9981,8 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } static constexpr bool kIsFabricScoped = false; - AssociationFailureCause associationFailure = static_cast(0); - uint16_t status = static_cast(0); + AssociationFailureCauseEnum associationFailure = static_cast(0); + uint16_t status = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -9994,8 +9994,8 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::AssociationFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - AssociationFailureCause associationFailure = static_cast(0); - uint16_t status = static_cast(0); + AssociationFailureCauseEnum associationFailure = static_cast(0); + uint16_t status = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -10016,7 +10016,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } static constexpr bool kIsFabricScoped = false; - WiFiConnectionStatus connectionStatus = static_cast(0); + ConnectionStatusEnum connectionStatus = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -10028,7 +10028,7 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::ConnectionStatus::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - WiFiConnectionStatus connectionStatus = static_cast(0); + ConnectionStatusEnum connectionStatus = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; diff --git a/zzz_generated/app-common/app-common/zap-generated/enums.h b/zzz_generated/app-common/app-common/zap-generated/enums.h index 5acca623760f4b..23fc30001f54e7 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -237,17 +237,6 @@ enum EmberAfSaturationStepMode : uint8_t EMBER_ZCL_SATURATION_STEP_MODE_DOWN = 3, }; -// Enum for SecurityType -enum EmberAfSecurityType : uint8_t -{ - EMBER_ZCL_SECURITY_TYPE_UNSPECIFIED = 0, - EMBER_ZCL_SECURITY_TYPE_NONE = 1, - EMBER_ZCL_SECURITY_TYPE_WEP = 2, - EMBER_ZCL_SECURITY_TYPE_WPA = 3, - EMBER_ZCL_SECURITY_TYPE_WPA2 = 4, - EMBER_ZCL_SECURITY_TYPE_WPA3 = 5, -}; - // Enum for StepMode enum EmberAfStepMode : uint8_t { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 48f456892a7f81..39592423078f0c 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -10820,9 +10820,9 @@ void registerClusterWiFiNetworkDiagnostics(Commands & commands, CredentialIssuer make_unique>(Id, credsIssuerConfig), // make_unique>>( Id, "bssid", Attributes::Bssid::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( + make_unique>>( Id, "security-type", 0, UINT8_MAX, Attributes::SecurityType::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( + make_unique>>( Id, "wi-fi-version", 0, UINT8_MAX, Attributes::WiFiVersion::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>(Id, "channel-number", 0, UINT16_MAX, Attributes::ChannelNumber::Id, 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 960010e828274d..16b35f0739e84d 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -6194,12 +6194,12 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("BSSID", 1, value); } case WiFiNetworkDiagnostics::Attributes::SecurityType::Id: { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SecurityType", 1, value); } case WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id: { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("WiFiVersion", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 1344bc9124e1fb..740762a894ffdd 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -50266,7 +50266,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); } @@ -50274,7 +50274,7 @@ class Test_TC_DGWIFI_2_1Suite : public TestCommand case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U));