From 9e4234d71399d10576e02b4e58d081021fdad944 Mon Sep 17 00:00:00 2001 From: Ricardo Casallas <77841255+rcasallas-silabs@users.noreply.github.com> Date: Mon, 27 Mar 2023 07:56:10 -0400 Subject: [PATCH 001/158] Silabs CPMS support added. (#25824) * Silabs CPMS support added. * SilabsDeviceAttestationCreds: Code review. --- .../silabs/SilabsDeviceAttestationCreds.cpp | 88 +++++++++++++++---- examples/platform/silabs/silabs_creds.h | 28 +++--- src/platform/silabs/SilabsConfig.h | 10 ++- 3 files changed, 92 insertions(+), 34 deletions(-) diff --git a/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp b/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp index 2b405196b31059..01f54cc36506c8 100644 --- a/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp +++ b/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp @@ -19,11 +19,15 @@ #include #include #include +#include +#include -#include "psa/crypto.h" #include "silabs_creds.h" -extern uint8_t __attestation_credentials_base[]; +using namespace chip::DeviceLayer::Internal; + +extern uint8_t linker_nvm_end[]; +static uint8_t * _credentials_address = (uint8_t *) linker_nvm_end; namespace chip { namespace Credentials { @@ -33,12 +37,28 @@ namespace { class DeviceAttestationCredsSilabs : public DeviceAttestationCredentialsProvider { + // Miss-aligned certificates is a common error, and printing the first few bytes is + // useful to verify proper alignment. Eight bytes is enough for this purpose. + static constexpr size_t kDebugLength = 8; public: - CHIP_ERROR GetCertificationDeclaration(MutableByteSpan & out_buffer) override + CHIP_ERROR GetCertificationDeclaration(MutableByteSpan & out_span) override { - ByteSpan cd_span(((uint8_t *) __attestation_credentials_base) + SILABS_CREDENTIALS_CD_OFFSET, SILABS_CREDENTIALS_CD_SIZE); - return CopySpanToMutableSpan(cd_span, out_buffer); + uint32_t offset = SILABS_CREDENTIALS_CD_OFFSET; + uint32_t size = SILABS_CREDENTIALS_CD_SIZE; + + if (SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_CD_Offset) && + SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_CD_Size)) + { + ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_CD_Offset, offset)); + ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_CD_Size, size)); + } + + uint8_t * address = _credentials_address + offset; + ByteSpan cd_span(address, size); + ChipLogProgress(DeviceLayer, "GetCertificationDeclaration, addr:%p, size:%lu", address, size); + ChipLogByteSpan(DeviceLayer, ByteSpan(cd_span.data(), kDebugLength > cd_span.size() ? cd_span.size() : kDebugLength)); + return CopySpanToMutableSpan(cd_span, out_span); } CHIP_ERROR GetFirmwareInformation(MutableByteSpan & out_firmware_info_buffer) override @@ -48,31 +68,63 @@ class DeviceAttestationCredsSilabs : public DeviceAttestationCredentialsProvider return CHIP_NO_ERROR; } - CHIP_ERROR GetDeviceAttestationCert(MutableByteSpan & out_buffer) override + CHIP_ERROR GetDeviceAttestationCert(MutableByteSpan & out_span) override { - ByteSpan cert_span(((uint8_t *) __attestation_credentials_base) + SILABS_CREDENTIALS_DAC_OFFSET, - SILABS_CREDENTIALS_DAC_SIZE); - return CopySpanToMutableSpan(cert_span, out_buffer); + uint32_t offset = SILABS_CREDENTIALS_DAC_OFFSET; + uint32_t size = SILABS_CREDENTIALS_DAC_SIZE; + + if (SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_DAC_Offset) && + SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_DAC_Size)) + { + ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_DAC_Offset, offset)); + ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_DAC_Size, size)); + } + + uint8_t * address = _credentials_address + offset; + ByteSpan cert_span(address, size); + ChipLogProgress(DeviceLayer, "GetDeviceAttestationCert, addr:%p, size:%lu", address, size); + ChipLogByteSpan(DeviceLayer, ByteSpan(cert_span.data(), kDebugLength > cert_span.size() ? cert_span.size() : kDebugLength)); + return CopySpanToMutableSpan(cert_span, out_span); } - CHIP_ERROR GetProductAttestationIntermediateCert(MutableByteSpan & out_pai_buffer) override + CHIP_ERROR GetProductAttestationIntermediateCert(MutableByteSpan & out_span) override { - ByteSpan cert_span(((uint8_t *) __attestation_credentials_base) + SILABS_CREDENTIALS_PAI_OFFSET, - SILABS_CREDENTIALS_PAI_SIZE); - return CopySpanToMutableSpan(cert_span, out_pai_buffer); + uint32_t offset = SILABS_CREDENTIALS_PAI_OFFSET; + uint32_t size = SILABS_CREDENTIALS_PAI_SIZE; + + if (SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_PAI_Offset) && + SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_PAI_Size)) + { + ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_PAI_Offset, offset)); + ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_PAI_Size, size)); + } + + uint8_t * address = _credentials_address + offset; + ByteSpan cert_span(address, size); + ChipLogProgress(DeviceLayer, "GetProductAttestationIntermediateCert, addr:%p, size:%lu", address, size); + ChipLogByteSpan(DeviceLayer, ByteSpan(cert_span.data(), kDebugLength > cert_span.size() ? cert_span.size() : kDebugLength)); + return CopySpanToMutableSpan(cert_span, out_span); } - CHIP_ERROR SignWithDeviceAttestationKey(const ByteSpan & message_to_sign, MutableByteSpan & out_buffer) override + CHIP_ERROR SignWithDeviceAttestationKey(const ByteSpan & message_to_sign, MutableByteSpan & out_span) override { - psa_key_id_t key_id = SILABS_CREDENTIALS_DAC_KEY_ID; + uint32_t key_id = SILABS_CREDENTIALS_DAC_KEY_ID; uint8_t signature[64] = { 0 }; size_t signature_size = sizeof(signature); - psa_status_t err = psa_sign_message(key_id, PSA_ALG_ECDSA(PSA_ALG_SHA_256), message_to_sign.data(), message_to_sign.size(), - signature, signature_size, &signature_size); + if (SilabsConfig::ConfigValueExists(SilabsConfig::kConfigKey_Creds_KeyId)) + { + ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_KeyId, key_id)); + } + + ChipLogProgress(DeviceLayer, "SignWithDeviceAttestationKey, key:%lu", key_id); + + psa_status_t err = + psa_sign_message(static_cast(key_id), PSA_ALG_ECDSA(PSA_ALG_SHA_256), message_to_sign.data(), + message_to_sign.size(), signature, signature_size, &signature_size); VerifyOrReturnError(!err, CHIP_ERROR_INTERNAL); - return CopySpanToMutableSpan(ByteSpan(signature, signature_size), out_buffer); + return CopySpanToMutableSpan(ByteSpan(signature, signature_size), out_span); } }; diff --git a/examples/platform/silabs/silabs_creds.h b/examples/platform/silabs/silabs_creds.h index f4808c61e7589c..792c7b2238afaa 100644 --- a/examples/platform/silabs/silabs_creds.h +++ b/examples/platform/silabs/silabs_creds.h @@ -10,32 +10,32 @@ #ifndef SILABS_DEVICE_CREDENTIALS #define SILABS_DEVICE_CREDENTIALS -#ifndef SILABS_CREDENTIALS_CD_OFFSET -#define SILABS_CREDENTIALS_CD_OFFSET 0x0000 +#ifndef SILABS_CREDENTIALS_DAC_KEY_ID +#define SILABS_CREDENTIALS_DAC_KEY_ID 0x0002 #endif -#ifndef SILABS_CREDENTIALS_CD_SIZE -#define SILABS_CREDENTIALS_CD_SIZE 541 +#ifndef SILABS_CREDENTIALS_DAC_OFFSET +#define SILABS_CREDENTIALS_DAC_OFFSET 0x0000 #endif -#ifndef SILABS_CREDENTIALS_PAI_OFFSET -#define SILABS_CREDENTIALS_PAI_OFFSET 0x400 +#ifndef SILABS_CREDENTIALS_DAC_SIZE +#define SILABS_CREDENTIALS_DAC_SIZE 0 #endif -#ifndef SILABS_CREDENTIALS_PAI_SIZE -#define SILABS_CREDENTIALS_PAI_SIZE 463 +#ifndef SILABS_CREDENTIALS_PAI_OFFSET +#define SILABS_CREDENTIALS_PAI_OFFSET 0x0200 #endif -#ifndef SILABS_CREDENTIALS_DAC_OFFSET -#define SILABS_CREDENTIALS_DAC_OFFSET 0x600 +#ifndef SILABS_CREDENTIALS_PAI_SIZE +#define SILABS_CREDENTIALS_PAI_SIZE 0 #endif -#ifndef SILABS_CREDENTIALS_DAC_SIZE -#define SILABS_CREDENTIALS_DAC_SIZE 492 +#ifndef SILABS_CREDENTIALS_CD_OFFSET +#define SILABS_CREDENTIALS_CD_OFFSET 0x0400 #endif -#ifndef SILABS_CREDENTIALS_DAC_KEY_ID -#define SILABS_CREDENTIALS_DAC_KEY_ID PSA_KEY_ID_USER_MIN + 1 +#ifndef SILABS_CREDENTIALS_CD_SIZE +#define SILABS_CREDENTIALS_CD_SIZE 0 #endif #endif // SILABS_DEVICE_CREDENTIALS diff --git a/src/platform/silabs/SilabsConfig.h b/src/platform/silabs/SilabsConfig.h index cee73df868a7aa..a7aa0312aa9845 100644 --- a/src/platform/silabs/SilabsConfig.h +++ b/src/platform/silabs/SilabsConfig.h @@ -26,8 +26,6 @@ #include -#include - #include "nvm3.h" #include "nvm3_hal_flash.h" @@ -137,6 +135,14 @@ class SilabsConfig static constexpr Key kConfigKey_YearDaySchedules = SilabsConfigKey(kMatterConfig_KeyBase, 0x16); static constexpr Key kConfigKey_HolidaySchedules = SilabsConfigKey(kMatterConfig_KeyBase, 0x17); static constexpr Key kConfigKey_OpKeyMap = SilabsConfigKey(kMatterConfig_KeyBase, 0x20); + static constexpr Key kConfigKey_Creds_KeyId = SilabsConfigKey(kMatterConfig_KeyBase, 0x21); + static constexpr Key kConfigKey_Creds_Base_Addr = SilabsConfigKey(kMatterConfig_KeyBase, 0x22); + static constexpr Key kConfigKey_Creds_DAC_Offset = SilabsConfigKey(kMatterConfig_KeyBase, 0x23); + static constexpr Key kConfigKey_Creds_DAC_Size = SilabsConfigKey(kMatterConfig_KeyBase, 0x24); + static constexpr Key kConfigKey_Creds_PAI_Offset = SilabsConfigKey(kMatterConfig_KeyBase, 0x25); + static constexpr Key kConfigKey_Creds_PAI_Size = SilabsConfigKey(kMatterConfig_KeyBase, 0x26); + static constexpr Key kConfigKey_Creds_CD_Offset = SilabsConfigKey(kMatterConfig_KeyBase, 0x27); + static constexpr Key kConfigKey_Creds_CD_Size = SilabsConfigKey(kMatterConfig_KeyBase, 0x28); static constexpr Key kConfigKey_GroupKeyMax = SilabsConfigKey(kMatterConfig_KeyBase, 0x1E); // Allows 16 Group Keys to be created. From 3ab91366d88b17226ae7eccdb342810805680f80 Mon Sep 17 00:00:00 2001 From: wyhong <30567533+wy-hh@users.noreply.github.com> Date: Mon, 27 Mar 2023 20:08:08 +0800 Subject: [PATCH 002/158] [Bouffalolab] Fix some implemenations to get Wi-Fi Diagnostic information (#25621) * Correct some return DiagnosticDataProviderImpl * Fix restyle * Get wifi diagnostic data when wifi is connected * Fix restyle * Fix compile error after restyled * correct comments * wraper security type access * Fix restyle --- .../BL602/DiagnosticDataProviderImpl.cpp | 80 ++++++++++--------- .../bouffalolab/BL602/wifi_mgmr_portable.c | 45 ++++++++++- .../bouffalolab/BL602/wifi_mgmr_portable.h | 8 +- third_party/bouffalolab/bl602/bl_iot_sdk.gni | 4 + 4 files changed, 94 insertions(+), 43 deletions(-) diff --git a/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.cpp b/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.cpp index 7c1d8fe9c28ff6..2b61b4bae3a990 100644 --- a/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.cpp +++ b/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.cpp @@ -18,7 +18,7 @@ /** * @file * Provides an implementation of the DiagnosticDataProvider object - * for k32w0 platform. + * for Bouffalolab BL602 platform. */ #include @@ -36,6 +36,7 @@ extern "C" { #include #include #include +#include } extern uint8_t _heap_size; @@ -43,25 +44,6 @@ extern uint8_t _heap_size; namespace chip { namespace DeviceLayer { -uint8_t MapAuthModeToSecurityType(int authmode) -{ - switch (authmode) - { - case WIFI_EVENT_BEACON_IND_AUTH_OPEN: - return 1; - case WIFI_EVENT_BEACON_IND_AUTH_WEP: - return 2; - case WIFI_EVENT_BEACON_IND_AUTH_WPA_PSK: - return 3; - case WIFI_EVENT_BEACON_IND_AUTH_WPA2_PSK: - return 4; - case WIFI_EVENT_BEACON_IND_AUTH_WPA3_SAE: - return 5; - default: - return 0; - } -} - DiagnosticDataProviderImpl & DiagnosticDataProviderImpl::GetDefaultInstance() { static DiagnosticDataProviderImpl sInstance; @@ -248,37 +230,60 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBssId(ByteSpan & BssId) CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) { - using app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum; - securityType = SecurityTypeEnum::kUnspecified; - // int authmode; + if (ConnectivityMgrImpl()._IsWiFiStationConnected()) + { + if (wifi_mgmr_security_type_is_open()) + { + securityType = app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum::kNone; + } + else if (wifi_mgmr_security_type_is_wpa()) + { + securityType = app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum::kWpa; + } + else if (wifi_mgmr_security_type_is_wpa2()) + { + securityType = app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum::kWpa2; + } + else if (wifi_mgmr_security_type_is_wpa3()) + { + securityType = app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum::kWpa3; + } + else + { + securityType = app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum::kWep; + } - // authmode = mgmr_get_security_type(); - // securityType = MapAuthModeToSecurityType(authmode); - return CHIP_NO_ERROR; + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_READ_FAILED; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiVersion(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum & wifiVersion) { - // TODO: Keeping existing behavior, but this looks broken. - // https://github.com/project-chip/connectedhomeip/issues/25546 - wifiVersion = app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum::kA; - return CHIP_NO_ERROR; + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiChannelNumber(uint16_t & channelNumber) { - channelNumber = 0; - - // channelNumber = mgmr_get_current_channel_num(); + if (ConnectivityMgrImpl()._IsWiFiStationConnected()) + { + channelNumber = wifiMgmr.channel; + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; + return CHIP_ERROR_READ_FAILED; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiRssi(int8_t & rssi) { - // rssi = mgmr_get_rssi(); + if (ConnectivityMgrImpl()._IsWiFiStationConnected()) + { + rssi = wifiMgmr.wlan_sta.sta.rssi; + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; + return CHIP_ERROR_READ_FAILED; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconLostCount(uint32_t & beaconLostCount) @@ -353,13 +358,12 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketUnicastTxCount(uint32_t & pa CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiOverrunCount(uint64_t & overrunCount) { - overrunCount = 0; return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } CHIP_ERROR DiagnosticDataProviderImpl::ResetWiFiNetworkDiagnosticsCounts() { - return CHIP_NO_ERROR; + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconRxCount(uint32_t & beaconRxCount) diff --git a/src/platform/bouffalolab/BL602/wifi_mgmr_portable.c b/src/platform/bouffalolab/BL602/wifi_mgmr_portable.c index c41c3bcc8562cb..04ee57fe66c4b7 100644 --- a/src/platform/bouffalolab/BL602/wifi_mgmr_portable.c +++ b/src/platform/bouffalolab/BL602/wifi_mgmr_portable.c @@ -1,9 +1,18 @@ +#include +#include + #include #include #include +#include -#include -#include +#include + +#include +#include +#include + +extern struct wpa_sm gWpaSm; int wifi_mgmr_get_bssid(uint8_t * bssid) { @@ -103,3 +112,35 @@ int wifi_mgmr_profile_ssid_get(uint8_t * ssid) return profile_msg.ssid_len; } + +bool wifi_mgmr_security_type_is_open(void) +{ + return strlen(wifiMgmr.wifi_mgmr_stat_info.passphr) == 0; +} + +bool wifi_mgmr_security_type_is_wpa(void) +{ + return WPA_PROTO_WPA == gWpaSm.proto; +} + +bool wifi_mgmr_security_type_is_wpa2(void) +{ + if (WPA_PROTO_RSN == gWpaSm.proto) + { + return (gWpaSm.key_mgmt & + (WPA_KEY_MGMT_IEEE8021X | WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_PSK_SHA256 | WPA_KEY_MGMT_FT_PSK | + WPA_KEY_MGMT_IEEE8021X_SHA256 | WPA_KEY_MGMT_FT_IEEE8021X)) != 0; + } + + return false; +} + +bool wifi_mgmr_security_type_is_wpa3(void) +{ + if (WPA_PROTO_RSN == gWpaSm.proto) + { + return (gWpaSm.key_mgmt & (WPA_KEY_MGMT_SAE | WPA_KEY_MGMT_FT_SAE)) != 0; + } + + return false; +} diff --git a/src/platform/bouffalolab/BL602/wifi_mgmr_portable.h b/src/platform/bouffalolab/BL602/wifi_mgmr_portable.h index 243cec7ecdd87a..cf25c7ef730c14 100644 --- a/src/platform/bouffalolab/BL602/wifi_mgmr_portable.h +++ b/src/platform/bouffalolab/BL602/wifi_mgmr_portable.h @@ -6,15 +6,17 @@ extern "C" { #endif void wifi_mgmr_sta_ssid_get(char * ssid); -int mgmr_get_security_type(void); int wifi_mgmr_get_bssid(uint8_t * bssid); -int mgmr_get_current_channel_num(void); -int mgmr_get_rssi(void); void wifi_mgmr_conn_result_get(uint16_t * status_code, uint16_t * reason_code); int wifi_mgmr_profile_ssid_get(uint8_t * ssid); int wifi_mgmr_get_scan_ap_num(void); void wifi_mgmr_get_scan_result(wifi_mgmr_ap_item_t * result, int * num, uint8_t scan_type, char * ssid); +bool wifi_mgmr_security_type_is_open(void); +bool wifi_mgmr_security_type_is_wpa(void); +bool wifi_mgmr_security_type_is_wpa2(void); +bool wifi_mgmr_security_type_is_wpa3(void); + #ifdef __cplusplus } #endif diff --git a/third_party/bouffalolab/bl602/bl_iot_sdk.gni b/third_party/bouffalolab/bl602/bl_iot_sdk.gni index 2376a32a7441e7..85cf926562b4fa 100644 --- a/third_party/bouffalolab/bl602/bl_iot_sdk.gni +++ b/third_party/bouffalolab/bl602/bl_iot_sdk.gni @@ -677,6 +677,10 @@ template("bl_iot_sdk") { "${bl_iot_sdk_root}/components/network/wifi_hosal/include", "${bl_iot_sdk_root}/components/network/wifi_manager", "${bl_iot_sdk_root}/components/network/wifi_manager/bl60x_wifi_driver/include", + "${bl_iot_sdk_root}/components/security", + "${bl_iot_sdk_root}/components/security/wpa_supplicant/include", + "${bl_iot_sdk_root}/components/security/wpa_supplicant/src", + "${bl_iot_sdk_root}/components/security/wpa_supplicant/port/include", ] cflags_c = [ "-Wno-sign-compare" ] From d81612c06cfc66c5536d17a8b35e4616d8b8b3df Mon Sep 17 00:00:00 2001 From: joonhaengHeo <85541460+joonhaengHeo@users.noreply.github.com> Date: Mon, 27 Mar 2023 23:13:39 +0900 Subject: [PATCH 003/158] Fix Android Attestation error (#25837) --- .../ExampleAttestationTrustStoreDelegate.kt | 3 ++- .../DeviceProvisioningFragment.kt | 19 ++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/attestation/ExampleAttestationTrustStoreDelegate.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/attestation/ExampleAttestationTrustStoreDelegate.kt index 4e723faeffecd3..c94a64d1b8d00f 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/attestation/ExampleAttestationTrustStoreDelegate.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/attestation/ExampleAttestationTrustStoreDelegate.kt @@ -1,6 +1,7 @@ package com.google.chip.chiptool.attestation import android.util.Base64 +import android.util.Log import chip.devicecontroller.AttestationTrustStoreDelegate import chip.devicecontroller.ChipDeviceController import java.util.* @@ -13,7 +14,7 @@ class ExampleAttestationTrustStoreDelegate(val chipDeviceController: ChipDeviceC override fun getProductAttestationAuthorityCert(skid: ByteArray): ByteArray? { return paaCerts .map { Base64.decode(it, Base64.DEFAULT) } - .firstOrNull { cert -> chipDeviceController.extractSkidFromPaaCert(cert) == skid } + .firstOrNull { cert -> Arrays.equals(chipDeviceController.extractSkidFromPaaCert(cert), skid) } } companion object { diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/DeviceProvisioningFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/DeviceProvisioningFragment.kt index fa6c2bf7883db0..743f853acb9a38 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/DeviceProvisioningFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/DeviceProvisioningFragment.kt @@ -60,6 +60,8 @@ class DeviceProvisioningFragment : Fragment() { private lateinit var scope: CoroutineScope + private var dialog: AlertDialog? = null + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) deviceController = ChipClient.getDeviceController(requireContext()) @@ -87,6 +89,7 @@ class DeviceProvisioningFragment : Fragment() { override fun onStop() { super.onStop() gatt = null + dialog = null } override fun onDestroy() { @@ -104,7 +107,7 @@ class DeviceProvisioningFragment : Fragment() { private fun setAttestationDelegate() { deviceController.setDeviceAttestationDelegate(DEVICE_ATTESTATION_FAILED_TIMEOUT - ) { devicePtr, attestationInfo, errorCode -> + ) { devicePtr, _, errorCode -> Log.i(TAG, "Device attestation errorCode: $errorCode, " + "Look at 'src/credentials/attestation_verifier/DeviceAttestationVerifier.h' " + "AttestationVerificationResult enum to understand the errors") @@ -120,7 +123,11 @@ class DeviceProvisioningFragment : Fragment() { } activity.runOnUiThread(Runnable { - val dialog = AlertDialog.Builder(activity) + if (dialog != null && dialog?.isShowing == true) { + Log.d(TAG, "dialog is already showing") + return@Runnable + } + dialog = AlertDialog.Builder(activity) .setPositiveButton("Continue", DialogInterface.OnClickListener { dialog, id -> deviceController.continueCommissioning(devicePtr, true) @@ -131,9 +138,7 @@ class DeviceProvisioningFragment : Fragment() { }) .setTitle("Device Attestation") .setMessage("Device Attestation failed for device under commissioning. Do you wish to continue pairing?") - .create() - - dialog.show() + .show() }) } } @@ -230,6 +235,8 @@ class DeviceProvisioningFragment : Fragment() { ?.onCommissioningComplete(0) } else { showMessage(R.string.rendezvous_over_ble_pairing_failure_text) + FragmentUtil.getHost(this@DeviceProvisioningFragment, Callback::class.java) + ?.onCommissioningComplete(errorCode) } } @@ -238,6 +245,8 @@ class DeviceProvisioningFragment : Fragment() { if (code != STATUS_PAIRING_SUCCESS) { showMessage(R.string.rendezvous_over_ble_pairing_failure_text) + FragmentUtil.getHost(this@DeviceProvisioningFragment, Callback::class.java) + ?.onCommissioningComplete(code) } } From ee5fdea419a09cc5dfd6d2cc62e1bd4b242a9bcc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Mar 2023 10:23:06 -0400 Subject: [PATCH 004/158] Bump third_party/mbedtls/repo from `4a1de0f` to `1857335` (#25843) Bumps [third_party/mbedtls/repo](https://github.com/ARMmbed/mbedtls) from `4a1de0f` to `1857335`. - [Release notes](https://github.com/ARMmbed/mbedtls/releases) - [Commits](https://github.com/ARMmbed/mbedtls/compare/4a1de0f1a46f7a2feb55b5fdf1d5abcbc5bcd94b...18573354f7dd224ba588c0151b4eede41f6e975d) --- updated-dependencies: - dependency-name: third_party/mbedtls/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/mbedtls/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/mbedtls/repo b/third_party/mbedtls/repo index 4a1de0f1a46f7a..18573354f7dd22 160000 --- a/third_party/mbedtls/repo +++ b/third_party/mbedtls/repo @@ -1 +1 @@ -Subproject commit 4a1de0f1a46f7a2feb55b5fdf1d5abcbc5bcd94b +Subproject commit 18573354f7dd224ba588c0151b4eede41f6e975d From 58c7031070f20ec2375db1af2581a3ea90b450b1 Mon Sep 17 00:00:00 2001 From: wyhong <30567533+wy-hh@users.noreply.github.com> Date: Mon, 27 Mar 2023 22:24:50 +0800 Subject: [PATCH 005/158] [Bouffalolab] Add Device Information provider support (#25838) * add device info provider support * correct building for bl702 * Fix restyle --- examples/lighting-app/bouffalolab/bl602/BUILD.gn | 1 + examples/lighting-app/bouffalolab/bl702/BUILD.gn | 1 + examples/platform/bouffalolab/common/plat/platform.cpp | 8 ++++++++ 3 files changed, 10 insertions(+) diff --git a/examples/lighting-app/bouffalolab/bl602/BUILD.gn b/examples/lighting-app/bouffalolab/bl602/BUILD.gn index a6ef75ec04a1a0..ef0424f16ed10d 100644 --- a/examples/lighting-app/bouffalolab/bl602/BUILD.gn +++ b/examples/lighting-app/bouffalolab/bl602/BUILD.gn @@ -104,6 +104,7 @@ bouffalolab_executable("lighting_app") { } sources += [ + "${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp", "${example_common_dir}/AppTask.cpp", "${example_common_dir}/ZclCallbacks.cpp", "${examples_plat_common_dir}/plat/LEDWidget.cpp", diff --git a/examples/lighting-app/bouffalolab/bl702/BUILD.gn b/examples/lighting-app/bouffalolab/bl702/BUILD.gn index 19dfe7aa7e70af..75eeba1aaf569d 100644 --- a/examples/lighting-app/bouffalolab/bl702/BUILD.gn +++ b/examples/lighting-app/bouffalolab/bl702/BUILD.gn @@ -137,6 +137,7 @@ bouffalolab_executable("lighting_app") { deps = [ ":sdk", "${chip_root}/examples/lighting-app/lighting-common", + "${chip_root}/examples/providers:device_info_provider", "${chip_root}/src/lib", "${chip_root}/src/setup_payload", "${chip_root}/third_party/openthread/platforms:libopenthread-platform", diff --git a/examples/platform/bouffalolab/common/plat/platform.cpp b/examples/platform/bouffalolab/common/plat/platform.cpp index a6d142a1a75575..692b469eeb2c3b 100644 --- a/examples/platform/bouffalolab/common/plat/platform.cpp +++ b/examples/platform/bouffalolab/common/plat/platform.cpp @@ -58,6 +58,8 @@ #include "Rpc.h" #endif +#include + #if CONFIG_ENABLE_CHIP_SHELL || PW_RPC_ENABLED #include "uart.h" #endif @@ -77,6 +79,8 @@ chip::app::Clusters::NetworkCommissioning::Instance } #endif +static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; + void ChipEventHandler(const ChipDeviceEvent * event, intptr_t arg) { switch (event->Type) @@ -201,11 +205,15 @@ CHIP_ERROR PlatformManagerImpl::PlatformInit(void) chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(EXT_DISCOVERY_TIMEOUT_SECS); #endif + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + static CommonCaseDeviceServerInitParams initParams; (void) initParams.InitializeStaticResourcesBeforeServerInit(); ReturnLogErrorOnFailure(chip::Server::GetInstance().Init(initParams)); + gExampleDeviceInfoProvider.SetStorageDelegate(&chip::Server::GetInstance().GetPersistentStorage()); + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); #if CHIP_ENABLE_OPENTHREAD From 840f6375d116cacb794b0ccabe0ed712a2bc4701 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 27 Mar 2023 12:51:02 -0400 Subject: [PATCH 006/158] Generate all client structs (#25847) * Generate all client side structs * Zap regen --- .../bridge-common/bridge-app.matter | 12 +- ...tnode_heatingcoolingunit_ncdGai1E5a.matter | 6 + .../bridge-common/bridge-app.matter | 12 +- .../light-switch-app.matter | 10 +- .../ota-provider-app.matter | 12 +- .../placeholder/linux/apps/app1/config.matter | 55 +++-- .../placeholder/linux/apps/app2/config.matter | 55 +++-- examples/tv-app/tv-common/tv-app.matter | 30 +-- .../tv-casting-common/tv-casting-app.matter | 49 ++-- .../templates/app/MatterIDL.zapt | 11 +- .../data_model/controller-clusters.matter | 215 +++++++++++------- 11 files changed, 278 insertions(+), 189 deletions(-) diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 464416e0943658..bca32307a85592 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -253,6 +253,12 @@ client cluster AccessControl = 31 { kRemoved = 2; } + struct Target { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + fabric_scoped struct AccessControlEntryStruct { fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; @@ -261,12 +267,6 @@ client cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - struct Target { - nullable cluster_id cluster = 0; - nullable endpoint_no endpoint = 1; - nullable devtype_id deviceType = 2; - } - fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 9d30700dab65f1..8bfe255db605df 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1295,6 +1295,12 @@ client cluster Thermostat = 513 { kAutoMode = 0x20; } + struct ThermostatScheduleTransition { + int16u transitionTime = 0; + nullable int16s heatSetpoint = 1; + nullable int16s coolSetpoint = 2; + } + readonly attribute nullable int16s localTemperature = 0; readonly attribute nullable int16s outdoorTemperature = 1; readonly attribute bitmap8 occupancy = 2; diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter index b84898e28a475f..3712d03cc89685 100644 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter +++ b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter @@ -253,6 +253,12 @@ client cluster AccessControl = 31 { kRemoved = 2; } + struct Target { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + fabric_scoped struct AccessControlEntryStruct { fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; @@ -261,12 +267,6 @@ client cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - struct Target { - nullable cluster_id cluster = 0; - nullable endpoint_no endpoint = 1; - nullable devtype_id deviceType = 2; - } - fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; 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 81d3c89077291d..8c609e0e857717 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 @@ -157,16 +157,16 @@ client cluster Scenes = 5 { kCopyAllScenes = 0x1; } - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; - } - struct AttributeValuePair { optional attrib_id attributeID = 0; int8u attributeValue[] = 1; } + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + readonly attribute int8u sceneCount = 0; readonly attribute int8u currentScene = 1; readonly attribute group_id currentGroup = 2; diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index 2bb77fc4bd7a03..8fa58b8d08a544 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -45,6 +45,12 @@ client cluster AccessControl = 31 { kRemoved = 2; } + struct Target { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + fabric_scoped struct AccessControlEntryStruct { fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; @@ -53,12 +59,6 @@ client cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - struct Target { - nullable cluster_id cluster = 0; - nullable endpoint_no endpoint = 1; - nullable devtype_id deviceType = 2; - } - fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 57b7d1cc115cfc..e7951c4c0ac5d6 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1673,6 +1673,12 @@ client cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; @@ -1843,6 +1849,11 @@ server cluster OperationalCredentials = 62 { } client cluster FixedLabel = 64 { + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + readonly attribute LabelStruct labelList[] = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1891,17 +1902,17 @@ client cluster ModeSelect = 80 { kDeponoff = 0x1; } + struct SemanticTagStruct { + vendor_id mfgCode = 0; + enum16 value = 1; + } + struct ModeOptionStruct { char_string<64> label = 0; int8u mode = 1; SemanticTagStruct semanticTags[] = 2; } - struct SemanticTagStruct { - vendor_id mfgCode = 0; - enum16 value = 1; - } - readonly attribute char_string<32> description = 0; readonly attribute nullable enum16 standardNamespace = 1; readonly attribute ModeOptionStruct supportedModes[] = 2; @@ -2931,8 +2942,15 @@ client cluster ContentLauncher = 1290 { kHls = 0x2; } - struct ContentSearchStruct { - ParameterStruct parameterList[] = 0; + struct DimensionStruct { + double width = 0; + double height = 1; + MetricTypeEnum metric = 2; + } + + struct AdditionalInfoStruct { + char_string name = 0; + char_string value = 1; } struct ParameterStruct { @@ -2941,9 +2959,14 @@ client cluster ContentLauncher = 1290 { optional AdditionalInfoStruct externalIDList[] = 2; } - struct AdditionalInfoStruct { - char_string name = 0; - char_string value = 1; + struct ContentSearchStruct { + ParameterStruct parameterList[] = 0; + } + + struct StyleInformationStruct { + optional char_string imageURL = 0; + optional char_string color = 1; + optional DimensionStruct size = 2; } struct BrandingInformationStruct { @@ -2955,18 +2978,6 @@ client cluster ContentLauncher = 1290 { optional StyleInformationStruct waterMark = 5; } - struct StyleInformationStruct { - optional char_string imageURL = 0; - optional char_string color = 1; - optional DimensionStruct size = 2; - } - - struct DimensionStruct { - double width = 0; - double height = 1; - MetricTypeEnum metric = 2; - } - readonly attribute CHAR_STRING acceptHeader[] = 0; attribute bitmap32 supportedStreamingProtocols = 1; readonly attribute command_id generatedCommandList[] = 65528; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 24cf414ac711f7..4027d5b05c70a8 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1642,6 +1642,12 @@ client cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; @@ -1812,6 +1818,11 @@ server cluster OperationalCredentials = 62 { } client cluster FixedLabel = 64 { + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + readonly attribute LabelStruct labelList[] = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1860,17 +1871,17 @@ client cluster ModeSelect = 80 { kDeponoff = 0x1; } + struct SemanticTagStruct { + vendor_id mfgCode = 0; + enum16 value = 1; + } + struct ModeOptionStruct { char_string<64> label = 0; int8u mode = 1; SemanticTagStruct semanticTags[] = 2; } - struct SemanticTagStruct { - vendor_id mfgCode = 0; - enum16 value = 1; - } - readonly attribute char_string<32> description = 0; readonly attribute nullable enum16 standardNamespace = 1; readonly attribute ModeOptionStruct supportedModes[] = 2; @@ -2900,8 +2911,15 @@ client cluster ContentLauncher = 1290 { kHls = 0x2; } - struct ContentSearchStruct { - ParameterStruct parameterList[] = 0; + struct DimensionStruct { + double width = 0; + double height = 1; + MetricTypeEnum metric = 2; + } + + struct AdditionalInfoStruct { + char_string name = 0; + char_string value = 1; } struct ParameterStruct { @@ -2910,9 +2928,14 @@ client cluster ContentLauncher = 1290 { optional AdditionalInfoStruct externalIDList[] = 2; } - struct AdditionalInfoStruct { - char_string name = 0; - char_string value = 1; + struct ContentSearchStruct { + ParameterStruct parameterList[] = 0; + } + + struct StyleInformationStruct { + optional char_string imageURL = 0; + optional char_string color = 1; + optional DimensionStruct size = 2; } struct BrandingInformationStruct { @@ -2924,18 +2947,6 @@ client cluster ContentLauncher = 1290 { optional StyleInformationStruct waterMark = 5; } - struct StyleInformationStruct { - optional char_string imageURL = 0; - optional char_string color = 1; - optional DimensionStruct size = 2; - } - - struct DimensionStruct { - double width = 0; - double height = 1; - MetricTypeEnum metric = 2; - } - readonly attribute CHAR_STRING acceptHeader[] = 0; attribute bitmap32 supportedStreamingProtocols = 1; readonly attribute command_id generatedCommandList[] = 65528; diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index ad38b6dca1023b..27726bd2435045 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -636,15 +636,6 @@ client cluster NetworkCommissioning = 49 { boolean connected = 1; } - struct WiFiInterfaceScanResult { - WiFiSecurity security = 0; - octet_string<32> ssid = 1; - octet_string<6> bssid = 2; - int16u channel = 3; - WiFiBand wiFiBand = 4; - int8s rssi = 5; - } - struct ThreadInterfaceScanResult { int16u panId = 0; int64u extendedPanId = 1; @@ -656,6 +647,15 @@ client cluster NetworkCommissioning = 49 { int8u lqi = 7; } + struct WiFiInterfaceScanResult { + WiFiSecurity security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBand wiFiBand = 4; + int8s rssi = 5; + } + readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfo networks[] = 1; readonly attribute int8u scanMaxTimeSeconds = 2; @@ -1366,12 +1366,6 @@ client cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } - fabric_scoped struct NOCStruct { - fabric_sensitive octet_string noc = 1; - nullable fabric_sensitive octet_string icac = 2; - fabric_idx fabricIndex = 254; - } - fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; vendor_id vendorID = 2; @@ -1381,6 +1375,12 @@ client cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; 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 7404eab8dddd41..5407e91327de6e 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 @@ -1917,6 +1917,11 @@ client cluster MediaPlayback = 1286 { kVariableSpeed = 0x2; } + struct PlaybackPositionStruct { + epoch_us updatedAt = 0; + nullable int64u position = 1; + } + readonly attribute PlaybackStateEnum currentState = 0; readonly attribute nullable epoch_us startTime = 1; readonly attribute nullable int64u duration = 2; @@ -2162,8 +2167,15 @@ client cluster ContentLauncher = 1290 { kHls = 0x2; } - struct ContentSearchStruct { - ParameterStruct parameterList[] = 0; + struct DimensionStruct { + double width = 0; + double height = 1; + MetricTypeEnum metric = 2; + } + + struct AdditionalInfoStruct { + char_string name = 0; + char_string value = 1; } struct ParameterStruct { @@ -2172,9 +2184,14 @@ client cluster ContentLauncher = 1290 { optional AdditionalInfoStruct externalIDList[] = 2; } - struct AdditionalInfoStruct { - char_string name = 0; - char_string value = 1; + struct ContentSearchStruct { + ParameterStruct parameterList[] = 0; + } + + struct StyleInformationStruct { + optional char_string imageURL = 0; + optional char_string color = 1; + optional DimensionStruct size = 2; } struct BrandingInformationStruct { @@ -2186,18 +2203,6 @@ client cluster ContentLauncher = 1290 { optional StyleInformationStruct waterMark = 5; } - struct StyleInformationStruct { - optional char_string imageURL = 0; - optional char_string color = 1; - optional DimensionStruct size = 2; - } - - struct DimensionStruct { - double width = 0; - double height = 1; - MetricTypeEnum metric = 2; - } - readonly attribute CHAR_STRING acceptHeader[] = 0; attribute bitmap32 supportedStreamingProtocols = 1; readonly attribute command_id generatedCommandList[] = 65528; @@ -2281,6 +2286,11 @@ client cluster ApplicationLauncher = 1292 { char_string applicationID = 1; } + struct ApplicationEPStruct { + ApplicationStruct application = 0; + optional endpoint_no endpoint = 1; + } + readonly attribute INT16U catalogList[] = 0; attribute nullable ApplicationEPStruct currentApp = 1; readonly attribute command_id generatedCommandList[] = 65528; @@ -2316,6 +2326,11 @@ client cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } + struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; + } + readonly attribute char_string<32> vendorName = 0; readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; diff --git a/src/app/zap-templates/templates/app/MatterIDL.zapt b/src/app/zap-templates/templates/app/MatterIDL.zapt index 6dffbb4c64e4c4..875b1fb3f562e5 100644 --- a/src/app/zap-templates/templates/app/MatterIDL.zapt +++ b/src/app/zap-templates/templates/app/MatterIDL.zapt @@ -25,10 +25,17 @@ } {{/zcl_bitmaps}} - {{#chip_cluster_specific_structs}} + {{#if (is_client side)~}} + {{#zcl_structs}} {{~>idl_structure_definition extraIndent=1}} - {{/chip_cluster_specific_structs}} + {{/zcl_structs}} + {{~else~}} + {{#chip_cluster_specific_structs}} + {{~>idl_structure_definition extraIndent=1}} + + {{/chip_cluster_specific_structs}} + {{/if}} {{#zcl_events}} {{#if isFabricSensitive}}fabric_sensitive {{/if~}} {{priority}} event {{!ensure space}} {{~#chip_access_elements entity="event"~}} diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index e482a876d9f7c9..0779181c512f58 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -129,16 +129,16 @@ client cluster Scenes = 5 { kCopyAllScenes = 0x1; } - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; - } - struct AttributeValuePair { optional attrib_id attributeID = 0; int8u attributeValue[] = 1; } + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + readonly attribute int8u sceneCount = 0; readonly attribute int8u currentScene = 1; readonly attribute group_id currentGroup = 2; @@ -491,6 +491,12 @@ client cluster AccessControl = 31 { kRemoved = 2; } + struct Target { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + fabric_scoped struct AccessControlEntryStruct { fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; @@ -499,12 +505,6 @@ client cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - struct Target { - nullable cluster_id cluster = 0; - nullable endpoint_no endpoint = 1; - nullable devtype_id deviceType = 2; - } - fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; @@ -1153,6 +1153,21 @@ client cluster PowerSource = 47 { kReplaceable = 0x8; } + struct BatChargeFaultChangeType { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + struct BatFaultChangeType { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + struct WiredFaultChangeType { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + info event WiredFaultChange = 0 { WiredFaultEnum current[] = 0; WiredFaultEnum previous[] = 1; @@ -1314,15 +1329,6 @@ client cluster NetworkCommissioning = 49 { boolean connected = 1; } - struct WiFiInterfaceScanResult { - WiFiSecurity security = 0; - octet_string<32> ssid = 1; - octet_string<6> bssid = 2; - int16u channel = 3; - WiFiBand wiFiBand = 4; - int8s rssi = 5; - } - struct ThreadInterfaceScanResult { int16u panId = 0; int64u extendedPanId = 1; @@ -1334,6 +1340,15 @@ client cluster NetworkCommissioning = 49 { int8u lqi = 7; } + struct WiFiInterfaceScanResult { + WiFiSecurity security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBand wiFiBand = 4; + int8s rssi = 5; + } + readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfo networks[] = 1; readonly attribute int8u scanMaxTimeSeconds = 2; @@ -1635,6 +1650,21 @@ client cluster ThreadNetworkDiagnostics = 53 { boolean isChild = 13; } + struct OperationalDatasetComponents { + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; + } + struct RouteTable { int64u extAddress = 0; int16u rloc16 = 1; @@ -1653,21 +1683,6 @@ client cluster ThreadNetworkDiagnostics = 53 { int16u flags = 1; } - struct OperationalDatasetComponents { - boolean activeTimestampPresent = 0; - boolean pendingTimestampPresent = 1; - boolean masterKeyPresent = 2; - boolean networkNamePresent = 3; - boolean extendedPanIdPresent = 4; - boolean meshLocalPrefixPresent = 5; - boolean delayPresent = 6; - boolean panIdPresent = 7; - boolean channelPresent = 8; - boolean pskcPresent = 9; - boolean securityPolicyPresent = 10; - boolean channelMaskPresent = 11; - } - info event ConnectionStatus = 0 { ConnectionStatusEnum connectionStatus = 0; } @@ -2007,12 +2022,6 @@ client cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } - fabric_scoped struct NOCStruct { - fabric_sensitive octet_string noc = 1; - nullable fabric_sensitive octet_string icac = 2; - fabric_idx fabricIndex = 254; - } - fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; vendor_id vendorID = 2; @@ -2022,6 +2031,12 @@ client cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; @@ -2109,16 +2124,16 @@ client cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } - fabric_scoped struct GroupKeyMapStruct { + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; - int16u groupKeySetID = 2; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; fabric_idx fabricIndex = 254; } - fabric_scoped struct GroupInfoMapStruct { + fabric_scoped struct GroupKeyMapStruct { group_id groupId = 1; - endpoint_no endpoints[] = 2; - optional char_string<16> groupName = 3; + int16u groupKeySetID = 2; fabric_idx fabricIndex = 254; } @@ -2175,6 +2190,11 @@ client cluster GroupKeyManagement = 63 { } client cluster FixedLabel = 64 { + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + readonly attribute LabelStruct labelList[] = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -2185,6 +2205,11 @@ client cluster FixedLabel = 64 { } client cluster UserLabel = 65 { + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + attribute access(write: manage) LabelStruct labelList[] = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -2213,17 +2238,17 @@ client cluster ModeSelect = 80 { kDeponoff = 0x1; } + struct SemanticTagStruct { + vendor_id mfgCode = 0; + enum16 value = 1; + } + struct ModeOptionStruct { char_string<64> label = 0; int8u mode = 1; SemanticTagStruct semanticTags[] = 2; } - struct SemanticTagStruct { - vendor_id mfgCode = 0; - enum16 value = 1; - } - readonly attribute char_string<32> description = 0; readonly attribute nullable enum16 standardNamespace = 1; readonly attribute ModeOptionStruct supportedModes[] = 2; @@ -4189,8 +4214,15 @@ client cluster ContentLauncher = 1290 { kHls = 0x2; } - struct ContentSearchStruct { - ParameterStruct parameterList[] = 0; + struct DimensionStruct { + double width = 0; + double height = 1; + MetricTypeEnum metric = 2; + } + + struct AdditionalInfoStruct { + char_string name = 0; + char_string value = 1; } struct ParameterStruct { @@ -4199,9 +4231,14 @@ client cluster ContentLauncher = 1290 { optional AdditionalInfoStruct externalIDList[] = 2; } - struct AdditionalInfoStruct { - char_string name = 0; - char_string value = 1; + struct ContentSearchStruct { + ParameterStruct parameterList[] = 0; + } + + struct StyleInformationStruct { + optional char_string imageURL = 0; + optional char_string color = 1; + optional DimensionStruct size = 2; } struct BrandingInformationStruct { @@ -4213,18 +4250,6 @@ client cluster ContentLauncher = 1290 { optional StyleInformationStruct waterMark = 5; } - struct StyleInformationStruct { - optional char_string imageURL = 0; - optional char_string color = 1; - optional DimensionStruct size = 2; - } - - struct DimensionStruct { - double width = 0; - double height = 1; - MetricTypeEnum metric = 2; - } - readonly attribute CHAR_STRING acceptHeader[] = 0; attribute bitmap32 supportedStreamingProtocols = 1; readonly attribute command_id generatedCommandList[] = 65528; @@ -4308,6 +4333,11 @@ client cluster ApplicationLauncher = 1292 { kApplicationPlatform = 0x1; } + struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; + } + struct ApplicationEPStruct { ApplicationStruct application = 0; optional endpoint_no endpoint = 1; @@ -4353,6 +4383,11 @@ client cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } + struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; + } + readonly attribute char_string<32> vendorName = 0; readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; @@ -4606,26 +4641,6 @@ client cluster UnitTesting = 4294048773 { kValueC = 0x4; } - struct TestListStructOctet { - int64u member1 = 0; - octet_string<32> member2 = 1; - } - - struct NullablesAndOptionalsStruct { - nullable int16u nullableInt = 0; - optional int16u optionalInt = 1; - optional nullable int16u nullableOptionalInt = 2; - nullable char_string nullableString = 3; - optional char_string optionalString = 4; - optional nullable char_string nullableOptionalString = 5; - nullable SimpleStruct nullableStruct = 6; - optional SimpleStruct optionalStruct = 7; - optional nullable SimpleStruct nullableOptionalStruct = 8; - nullable SimpleEnum nullableList[] = 9; - optional SimpleEnum optionalList[] = 10; - optional nullable SimpleEnum nullableOptionalList[] = 11; - } - struct SimpleStruct { int8u a = 0; boolean b = 1; @@ -4648,6 +4663,21 @@ client cluster UnitTesting = 4294048773 { fabric_idx fabricIndex = 254; } + struct NullablesAndOptionalsStruct { + nullable int16u nullableInt = 0; + optional int16u optionalInt = 1; + optional nullable int16u nullableOptionalInt = 2; + nullable char_string nullableString = 3; + optional char_string optionalString = 4; + optional nullable char_string nullableOptionalString = 5; + nullable SimpleStruct nullableStruct = 6; + optional SimpleStruct optionalStruct = 7; + optional nullable SimpleStruct nullableOptionalStruct = 8; + nullable SimpleEnum nullableList[] = 9; + optional SimpleEnum optionalList[] = 10; + optional nullable SimpleEnum nullableOptionalList[] = 11; + } + struct NestedStruct { int8u a = 0; boolean b = 1; @@ -4664,6 +4694,15 @@ client cluster UnitTesting = 4294048773 { int8u g[] = 6; } + struct DoubleNestedStructList { + NestedStructList a[] = 0; + } + + struct TestListStructOctet { + int64u member1 = 0; + octet_string<32> member2 = 1; + } + info event TestEvent = 1 { INT8U arg1 = 1; SimpleEnum arg2 = 2; From 871214293ba547516de2427321267e590b902ca8 Mon Sep 17 00:00:00 2001 From: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com> Date: Mon, 27 Mar 2023 14:43:37 -0400 Subject: [PATCH 007/158] [Silabs] Fix enable_openthread_cli/uart build configuration (#25835) * This fix an issue where openthread cli was defined and uart files compiled when if not needed mostly on the wifi builds * The conditional default does work in the declare args. put it there --- examples/platform/silabs/efr32/BUILD.gn | 4 +--- src/test_driver/efr32/BUILD.gn | 5 +---- third_party/silabs/efr32_sdk.gni | 3 ++- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index e12653554324d7..d9e7d9e961a87f 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -58,7 +58,6 @@ assert(!(use_wf200 && chip_enable_openthread)) if (chip_enable_wifi) { assert(use_rs9116 || use_wf200 || use_SiWx917) - enable_openthread_cli = false import("${chip_root}/src/platform/silabs/efr32/wifi_args.gni") if (use_rs9116) { @@ -293,8 +292,7 @@ source_set("efr32-common") { sources += [ "LEDWidget.cpp" ] } - if (chip_enable_pw_rpc || chip_build_libshell || enable_openthread_cli || - use_wf200 || use_rs9116) { + if (chip_enable_pw_rpc || chip_build_libshell || enable_openthread_cli) { sources += [ "uart.cpp" ] } diff --git a/src/test_driver/efr32/BUILD.gn b/src/test_driver/efr32/BUILD.gn index 4d8ca6b8c05464..e440bb3ac475c2 100644 --- a/src/test_driver/efr32/BUILD.gn +++ b/src/test_driver/efr32/BUILD.gn @@ -73,13 +73,10 @@ silabs_executable("efr32_device_tests") { "${examples_common_plat_dir}/PigweedLogger.cpp", "${examples_common_plat_dir}/heap_4_silabs.c", "${examples_plat_dir}/init_efrPlatform.cpp", + "${examples_plat_dir}/uart.cpp", "src/main.cpp", ] - if (chip_enable_pw_rpc || chip_build_libshell || enable_openthread_cli) { - sources += [ "${examples_plat_dir}/uart.cpp" ] - } - deps = [ ":nl_test_service.nanopb_rpc", ":sdk", diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index e84552089b6f65..5ba8df783142da 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -33,8 +33,9 @@ declare_args() { # Build openthread with prebuilt silabs lib use_silabs_thread_lib = false - enable_openthread_cli = true + # enable by default for thread/non-wifi-ncp builds + enable_openthread_cli = !(use_rs9116 || use_wf200 || use_SiWx917) kvs_max_entries = 255 # Use Silabs factory data provider example. From def9802275c65ce678217a55574ba70e1367d1a4 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 27 Mar 2023 15:50:22 -0400 Subject: [PATCH 008/158] Move `CHIPCallbackTypes.h` into codegen.py generated (build time generation) (#25788) * Start moving CHIPCallbackTypes JNI to jinja-based codegen * Restyle * Updated build rules ... deps not yet working, but a starting point exists * Fix include naming for the new path, add/update unit tests * Add missing files, restyle * Remove some newlines that seemed extra * Undo gdbgui comment out - this was for local bootstrap only * Simplify the generator script a bit, without any deltas in output * Updated copyright time --- .../generators/java/CHIPCallbackTypes.jinja | 40 + .../generators/java/ChipClustersCpp.jinja | 2 +- .../matter_idl/generators/java/__init__.py | 21 +- .../matter_idl/tests/available_tests.yaml | 5 + .../jni/CHIPCallbackTypes.h | 28 + .../DemoClusterClient-InvokeSubscribeImpl.cpp | 2 +- .../jni/CHIPCallbackTypes.h | 28 + .../DemoClusterClient-InvokeSubscribeImpl.cpp | 2 +- .../optional_argument/jni/CHIPCallbackTypes.h | 26 + .../MyClusterClient-InvokeSubscribeImpl.cpp | 2 +- .../several_clusters/jni/CHIPCallbackTypes.h | 30 + .../jni/FirstClient-InvokeSubscribeImpl.cpp | 2 +- .../jni/SecondClient-InvokeSubscribeImpl.cpp | 2 +- .../jni/ThirdClient-InvokeSubscribeImpl.cpp | 2 +- .../simple_attribute/jni/CHIPCallbackTypes.h | 27 + .../MyClusterClient-InvokeSubscribeImpl.cpp | 2 +- src/controller/data_model/BUILD.gn | 2 + src/controller/java/BUILD.gn | 4 + src/controller/java/CHIPDefaultCallbacks.h | 2 +- .../java/templates/CHIPCallbackTypes.zapt | 25 - .../java/templates/CHIPClustersWrite-JNI.zapt | 2 +- .../templates/CHIPInvokeCallbacks-src.zapt | 4 +- .../java/templates/CHIPInvokeCallbacks.zapt | 4 +- .../java/templates/CHIPReadCallbacks.zapt | 4 +- src/controller/java/templates/templates.json | 5 - .../java/zap-generated/CHIPCallbackTypes.h | 2521 ----------------- .../zap-generated/CHIPClustersWrite-JNI.cpp | 2 +- .../zap-generated/CHIPInvokeCallbacks.cpp | 2 +- .../java/zap-generated/CHIPInvokeCallbacks.h | 2 +- .../java/zap-generated/CHIPReadCallbacks.h | 2 +- 30 files changed, 229 insertions(+), 2573 deletions(-) create mode 100644 scripts/py_matter_idl/matter_idl/generators/java/CHIPCallbackTypes.jinja create mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/CHIPCallbackTypes.h create mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/CHIPCallbackTypes.h create mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/CHIPCallbackTypes.h create mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPCallbackTypes.h create mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/CHIPCallbackTypes.h delete mode 100644 src/controller/java/templates/CHIPCallbackTypes.zapt delete mode 100644 src/controller/java/zap-generated/CHIPCallbackTypes.h diff --git a/scripts/py_matter_idl/matter_idl/generators/java/CHIPCallbackTypes.jinja b/scripts/py_matter_idl/matter_idl/generators/java/CHIPCallbackTypes.jinja new file mode 100644 index 00000000000000..2cc43bc99b0d7e --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/generators/java/CHIPCallbackTypes.jinja @@ -0,0 +1,40 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +typedef void (*CHIPDefaultSuccessCallbackType)(void *, const chip::app::DataModel::NullObjectType &); +typedef void (*CHIPDefaultWriteSuccessCallbackType)(void *); +typedef void (*CHIPDefaultFailureCallbackType)(void *, CHIP_ERROR); + +{% for cluster in clientClusters | sort(attribute='code') %} + {%- for response in cluster.structs | select('is_response_struct') -%} +typedef void (*CHIP{{cluster.name}}Cluster{{response.name}}CallbackType)(void *, const chip::app::Clusters::{{cluster.name}}::Commands::{{response.name}}::DecodableType &); + {%- endfor -%} + + {#- TODO: global response types? -#} + {%- for attribute in cluster.attributes | sort(attribute='name') %} +typedef void (*CHIP{{cluster.name}}Cluster{{attribute.definition.name | upfirst}}AttributeCallbackType)(void *, {##} + {%- if attribute.definition.is_list -%} + const chip::app::Clusters::{{cluster.name}}::Attributes::{{attribute.definition.name | upfirst}}::TypeInfo::DecodableType &); + {%- else -%} + chip::app::Clusters::{{cluster.name}}::Attributes::{{attribute.definition.name | upfirst}}::TypeInfo::DecodableArgType); + {%- endif -%} + {%- endfor -%} +{% endfor %} + diff --git a/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersCpp.jinja b/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersCpp.jinja index f37a6b893b7f42..ba84a31a3a5636 100644 --- a/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersCpp.jinja +++ b/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersCpp.jinja @@ -84,7 +84,7 @@ {% endif -%} {% endmacro -%} -#include +#include #include #include diff --git a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py index f1bae24f1f856d..bd641f82a2be59 100644 --- a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py +++ b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py @@ -20,7 +20,8 @@ from matter_idl.generators import CodeGenerator, GeneratorStorage from matter_idl.generators.types import (BasicInteger, BasicString, FundamentalType, IdlBitmapType, IdlEnumType, IdlType, ParseDataType, TypeLookupContext) -from matter_idl.matter_idl_types import Attribute, Cluster, ClusterSide, Command, DataType, Field, FieldQuality, Idl +from matter_idl.matter_idl_types import (Attribute, Cluster, ClusterSide, Command, DataType, Field, FieldQuality, Idl, Struct, + StructTag) from stringcase import capitalcase @@ -388,6 +389,10 @@ def CanGenerateSubscribe(attr: Attribute, lookup: TypeLookupContext) -> bool: return not lookup.is_struct_type(attr.definition.data_type.name) +def IsResponseStruct(s: Struct) -> bool: + return s.tag == StructTag.RESPONSE + + class __JavaCodeGenerator(CodeGenerator): """ Code generation for java-specific files. @@ -414,6 +419,8 @@ def __init__(self, storage: GeneratorStorage, idl: Idl, **kargs): self.jinja_env.filters['createLookupContext'] = CreateLookupContext self.jinja_env.filters['canGenerateSubscribe'] = CanGenerateSubscribe + self.jinja_env.tests['is_response_struct'] = IsResponseStruct + class JavaJNIGenerator(__JavaCodeGenerator): """Generates JNI java files (i.e. C++ source/headers).""" @@ -426,6 +433,15 @@ def internal_render_all(self): Renders .CPP files required for JNI support. """ + self.internal_render_one_output( + template_path="java/CHIPCallbackTypes.jinja", + output_file_name="jni/CHIPCallbackTypes.h", + vars={ + 'idl': self.idl, + 'clientClusters': [c for c in self.idl.clusters if c.side == ClusterSide.CLIENT], + } + ) + # Every cluster has its own impl, to avoid # very large compilations (running out of RAM) for cluster in self.idl.clusters: @@ -462,7 +478,8 @@ def internal_render_all(self): Renders .java files required for java matter support """ - clientClusters = [c for c in self.idl.clusters if c.side == ClusterSide.CLIENT] + clientClusters = [ + c for c in self.idl.clusters if c.side == ClusterSide.CLIENT] self.internal_render_one_output( template_path="java/ClusterReadMapping.jinja", diff --git a/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml b/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml index eebdf5bba7528d..b0ee58585bcc92 100644 --- a/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml +++ b/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml @@ -14,14 +14,17 @@ java-jni: inputs/simple_attribute.matter: jni/MyClusterClient-ReadImpl.cpp: outputs/simple_attribute/jni/MyClusterClient-ReadImpl.cpp jni/MyClusterClient-InvokeSubscribeImpl.cpp: outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp + jni/CHIPCallbackTypes.h: outputs/simple_attribute/jni/CHIPCallbackTypes.h inputs/global_struct_attribute.matter: jni/DemoClusterClient-ReadImpl.cpp: outputs/global_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp jni/DemoClusterClient-InvokeSubscribeImpl.cpp: outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp + jni/CHIPCallbackTypes.h: outputs/global_struct_attribute/jni/CHIPCallbackTypes.h inputs/cluster_struct_attribute.matter: jni/DemoClusterClient-ReadImpl.cpp: outputs/cluster_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp jni/DemoClusterClient-InvokeSubscribeImpl.cpp: outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp + jni/CHIPCallbackTypes.h: outputs/cluster_struct_attribute/jni/CHIPCallbackTypes.h inputs/several_clusters.matter: jni/FirstClient-ReadImpl.cpp: outputs/several_clusters/jni/FirstClient-ReadImpl.cpp @@ -30,10 +33,12 @@ java-jni: jni/FirstClient-InvokeSubscribeImpl.cpp: outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp jni/SecondClient-InvokeSubscribeImpl.cpp: outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp jni/ThirdClient-InvokeSubscribeImpl.cpp: outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp + jni/CHIPCallbackTypes.h: outputs/several_clusters/jni/CHIPCallbackTypes.h inputs/optional_argument.matter: jni/MyClusterClient-ReadImpl.cpp: outputs/optional_argument/jni/MyClusterClient-ReadImpl.cpp jni/MyClusterClient-InvokeSubscribeImpl.cpp: outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp + jni/CHIPCallbackTypes.h: outputs/optional_argument/jni/CHIPCallbackTypes.h java-class: inputs/several_clusters.matter: diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/CHIPCallbackTypes.h b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/CHIPCallbackTypes.h new file mode 100644 index 00000000000000..fcb6fe68e06488 --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/CHIPCallbackTypes.h @@ -0,0 +1,28 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +typedef void (*CHIPDefaultSuccessCallbackType)(void *, const chip::app::DataModel::NullObjectType &); +typedef void (*CHIPDefaultWriteSuccessCallbackType)(void *); +typedef void (*CHIPDefaultFailureCallbackType)(void *, CHIP_ERROR); + + +typedef void (*CHIPDemoClusterClusterSingleFailSafeAttributeCallbackType)(void *, chip::app::Clusters::DemoCluster::Attributes::SingleFailSafe::TypeInfo::DecodableArgType); +typedef void (*CHIPDemoClusterClusterArmFailsafesAttributeCallbackType)(void *, const chip::app::Clusters::DemoCluster::Attributes::ArmFailsafes::TypeInfo::DecodableType &); + diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp index ffb95cbba32653..bd8643b7479144 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/CHIPCallbackTypes.h b/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/CHIPCallbackTypes.h new file mode 100644 index 00000000000000..6abf7f8bc6b9cc --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/CHIPCallbackTypes.h @@ -0,0 +1,28 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +typedef void (*CHIPDefaultSuccessCallbackType)(void *, const chip::app::DataModel::NullObjectType &); +typedef void (*CHIPDefaultWriteSuccessCallbackType)(void *); +typedef void (*CHIPDefaultFailureCallbackType)(void *, CHIP_ERROR); + + +typedef void (*CHIPDemoClusterClusterSingleLabelAttributeCallbackType)(void *, chip::app::Clusters::DemoCluster::Attributes::SingleLabel::TypeInfo::DecodableArgType); +typedef void (*CHIPDemoClusterClusterSomeLabelsAttributeCallbackType)(void *, const chip::app::Clusters::DemoCluster::Attributes::SomeLabels::TypeInfo::DecodableType &); + diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp index cfbd85a630e489..e912528914d41b 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/CHIPCallbackTypes.h b/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/CHIPCallbackTypes.h new file mode 100644 index 00000000000000..3310f9d64f5321 --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/CHIPCallbackTypes.h @@ -0,0 +1,26 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +typedef void (*CHIPDefaultSuccessCallbackType)(void *, const chip::app::DataModel::NullObjectType &); +typedef void (*CHIPDefaultWriteSuccessCallbackType)(void *); +typedef void (*CHIPDefaultFailureCallbackType)(void *, CHIP_ERROR); + + + diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp index 8ceb5c0a0caa3a..1b5e90e300e24e 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPCallbackTypes.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPCallbackTypes.h new file mode 100644 index 00000000000000..9b4ea4e30e366f --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/CHIPCallbackTypes.h @@ -0,0 +1,30 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +typedef void (*CHIPDefaultSuccessCallbackType)(void *, const chip::app::DataModel::NullObjectType &); +typedef void (*CHIPDefaultWriteSuccessCallbackType)(void *); +typedef void (*CHIPDefaultFailureCallbackType)(void *, CHIP_ERROR); + + +typedef void (*CHIPFirstClusterSomeIntegerAttributeCallbackType)(void *, chip::app::Clusters::First::Attributes::SomeInteger::TypeInfo::DecodableArgType); +typedef void (*CHIPSecondClusterSomeBytesAttributeCallbackType)(void *, chip::app::Clusters::Second::Attributes::SomeBytes::TypeInfo::DecodableArgType); +typedef void (*CHIPThirdClusterSomeEnumAttributeCallbackType)(void *, chip::app::Clusters::Third::Attributes::SomeEnum::TypeInfo::DecodableArgType); +typedef void (*CHIPThirdClusterOptionsAttributeCallbackType)(void *, chip::app::Clusters::Third::Attributes::Options::TypeInfo::DecodableArgType); + diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp index bcd50fbe12cc5a..1fd153ff362941 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp index 19229c2a7dd290..d0c349bdda2a28 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp index 125e9a9818ea28..7acf8d7dccec5f 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/CHIPCallbackTypes.h b/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/CHIPCallbackTypes.h new file mode 100644 index 00000000000000..975e27045e0aba --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/CHIPCallbackTypes.h @@ -0,0 +1,27 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +typedef void (*CHIPDefaultSuccessCallbackType)(void *, const chip::app::DataModel::NullObjectType &); +typedef void (*CHIPDefaultWriteSuccessCallbackType)(void *); +typedef void (*CHIPDefaultFailureCallbackType)(void *, CHIP_ERROR); + + +typedef void (*CHIPMyClusterClusterClusterAttrAttributeCallbackType)(void *, chip::app::Clusters::MyCluster::Attributes::ClusterAttr::TypeInfo::DecodableArgType); + diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp index 37adb10694dd09..5b8c3f5e0bc3c1 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/controller/data_model/BUILD.gn b/src/controller/data_model/BUILD.gn index 304bd7acea4942..22c8803ee7ff64 100644 --- a/src/controller/data_model/BUILD.gn +++ b/src/controller/data_model/BUILD.gn @@ -42,6 +42,7 @@ if (current_os == "android" || build_java_matter_controller) { generator = "java-jni" outputs = [ + "jni/CHIPCallbackTypes.h", "jni/IdentifyClient-ReadImpl.cpp", "jni/IdentifyClient-InvokeSubscribeImpl.cpp", "jni/GroupsClient-ReadImpl.cpp", @@ -187,6 +188,7 @@ if (current_os == "android" || build_java_matter_controller) { source_set("java-jni-sources") { public_configs = [ ":java-build-config", + ":java-jni-generate_config", "${chip_root}/src:includes", ] diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index 1aeeb8b27b70df..ce113422854bcb 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -29,6 +29,10 @@ shared_library("jni") { output_extension = "dylib" } + # Temporary while we have circular dependencies between codegen.py and zap + # generated files + check_includes = false + sources = [ "AndroidCallbacks-JNI.cpp", "AndroidCallbacks.cpp", diff --git a/src/controller/java/CHIPDefaultCallbacks.h b/src/controller/java/CHIPDefaultCallbacks.h index 78e8304f0f9728..57ed5526230263 100644 --- a/src/controller/java/CHIPDefaultCallbacks.h +++ b/src/controller/java/CHIPDefaultCallbacks.h @@ -3,7 +3,7 @@ #include #include -#include "zap-generated/CHIPCallbackTypes.h" +#include namespace chip { diff --git a/src/controller/java/templates/CHIPCallbackTypes.zapt b/src/controller/java/templates/CHIPCallbackTypes.zapt deleted file mode 100644 index f527268f99d9fc..00000000000000 --- a/src/controller/java/templates/CHIPCallbackTypes.zapt +++ /dev/null @@ -1,25 +0,0 @@ -{{> header}} -{{#if (chip_has_client_clusters)}} -#include -#include - -typedef void (*CHIPDefaultSuccessCallbackType)(void *, const chip::app::DataModel::NullObjectType &); -typedef void (*CHIPDefaultWriteSuccessCallbackType)(void *); -typedef void (*CHIPDefaultFailureCallbackType)(void *, CHIP_ERROR); - -{{#chip_client_clusters}} -{{#chip_cluster_responses}} -typedef void (*CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}CallbackType)(void *, const chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::DecodableType &); -{{/chip_cluster_responses}} - -{{! TODO: global response types?}} - -{{#zcl_attributes_server}} -{{#if isArray}} -typedef void (*CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}AttributeCallbackType)(void *, const chip::app::Clusters::{{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo::DecodableType &); -{{else}} -typedef void (*CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}AttributeCallbackType)(void *, chip::app::Clusters::{{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo::DecodableArgType); -{{/if}} -{{/zcl_attributes_server}} -{{/chip_client_clusters}} -{{/if}} \ No newline at end of file diff --git a/src/controller/java/templates/CHIPClustersWrite-JNI.zapt b/src/controller/java/templates/CHIPClustersWrite-JNI.zapt index aefa9b9dc19711..8a149383d50801 100644 --- a/src/controller/java/templates/CHIPClustersWrite-JNI.zapt +++ b/src/controller/java/templates/CHIPClustersWrite-JNI.zapt @@ -1,6 +1,6 @@ {{> header}} {{#if (chip_has_client_clusters)}} -#include "CHIPCallbackTypes.h" +#include #include "CHIPInvokeCallbacks.h" #include "CHIPReadCallbacks.h" diff --git a/src/controller/java/templates/CHIPInvokeCallbacks-src.zapt b/src/controller/java/templates/CHIPInvokeCallbacks-src.zapt index e1f445ec112442..f5f8b8cdf4b288 100644 --- a/src/controller/java/templates/CHIPInvokeCallbacks-src.zapt +++ b/src/controller/java/templates/CHIPInvokeCallbacks-src.zapt @@ -1,6 +1,6 @@ {{> header}} {{#if (chip_has_client_clusters)}} -#include "CHIPCallbackTypes.h" +#include #include "CHIPInvokeCallbacks.h" #include @@ -73,4 +73,4 @@ void CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callbac {{/chip_cluster_responses}} {{/chip_client_clusters}} } // namespace chip -{{/if}} \ No newline at end of file +{{/if}} diff --git a/src/controller/java/templates/CHIPInvokeCallbacks.zapt b/src/controller/java/templates/CHIPInvokeCallbacks.zapt index a89db3856a66f9..d0058b4435a506 100644 --- a/src/controller/java/templates/CHIPInvokeCallbacks.zapt +++ b/src/controller/java/templates/CHIPInvokeCallbacks.zapt @@ -1,6 +1,6 @@ {{> header}} {{#if (chip_has_client_clusters)}} -#include "CHIPCallbackTypes.h" +#include #include #include @@ -26,4 +26,4 @@ private: {{/chip_cluster_responses}} {{/chip_client_clusters}} } // namespace chip -{{/if}} \ No newline at end of file +{{/if}} diff --git a/src/controller/java/templates/CHIPReadCallbacks.zapt b/src/controller/java/templates/CHIPReadCallbacks.zapt index 3b87cd783f82ee..44df0869f95515 100644 --- a/src/controller/java/templates/CHIPReadCallbacks.zapt +++ b/src/controller/java/templates/CHIPReadCallbacks.zapt @@ -1,6 +1,6 @@ {{> header}} {{#if (chip_has_client_clusters)}} -#include "CHIPCallbackTypes.h" +#include #include #include @@ -72,4 +72,4 @@ private: {{/zcl_attributes_server}} {{/chip_client_clusters}} -{{/if}} \ No newline at end of file +{{/if}} diff --git a/src/controller/java/templates/templates.json b/src/controller/java/templates/templates.json index 1274530760f33a..c3fab06f887f81 100644 --- a/src/controller/java/templates/templates.json +++ b/src/controller/java/templates/templates.json @@ -54,11 +54,6 @@ "name": "CHIP cluster invoke callbacks for Java (native code)", "output": "src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp" }, - { - "path": "CHIPCallbackTypes.zapt", - "name": "CHIP cluster callback types", - "output": "src/controller/java/zap-generated/CHIPCallbackTypes.h" - }, { "path": "CHIPClustersWrite-JNI.zapt", "name": "CHIP ZCL API for Java (native code for writes)", diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h deleted file mode 100644 index 0a5b77268f5013..00000000000000 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ /dev/null @@ -1,2521 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP -#include -#include - -typedef void (*CHIPDefaultSuccessCallbackType)(void *, const chip::app::DataModel::NullObjectType &); -typedef void (*CHIPDefaultWriteSuccessCallbackType)(void *); -typedef void (*CHIPDefaultFailureCallbackType)(void *, CHIP_ERROR); - -typedef void (*CHIPIdentifyClusterIdentifyTimeAttributeCallbackType)( - void *, chip::app::Clusters::Identify::Attributes::IdentifyTime::TypeInfo::DecodableArgType); -typedef void (*CHIPIdentifyClusterIdentifyTypeAttributeCallbackType)( - void *, chip::app::Clusters::Identify::Attributes::IdentifyType::TypeInfo::DecodableArgType); -typedef void (*CHIPIdentifyClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Identify::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPIdentifyClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Identify::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPIdentifyClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::Identify::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPIdentifyClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::Identify::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPIdentifyClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::Identify::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPIdentifyClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::Identify::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPGroupsClusterAddGroupResponseCallbackType)( - void *, const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType &); -typedef void (*CHIPGroupsClusterViewGroupResponseCallbackType)( - void *, const chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType &); -typedef void (*CHIPGroupsClusterGetGroupMembershipResponseCallbackType)( - void *, const chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType &); -typedef void (*CHIPGroupsClusterRemoveGroupResponseCallbackType)( - void *, const chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType &); - -typedef void (*CHIPGroupsClusterNameSupportAttributeCallbackType)( - void *, chip::app::Clusters::Groups::Attributes::NameSupport::TypeInfo::DecodableArgType); -typedef void (*CHIPGroupsClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Groups::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPGroupsClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Groups::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPGroupsClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::Groups::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPGroupsClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::Groups::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPGroupsClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::Groups::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPGroupsClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::Groups::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPScenesClusterAddSceneResponseCallbackType)( - void *, const chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType &); -typedef void (*CHIPScenesClusterViewSceneResponseCallbackType)( - void *, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType &); -typedef void (*CHIPScenesClusterRemoveSceneResponseCallbackType)( - void *, const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType &); -typedef void (*CHIPScenesClusterRemoveAllScenesResponseCallbackType)( - void *, const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType &); -typedef void (*CHIPScenesClusterStoreSceneResponseCallbackType)( - void *, const chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType &); -typedef void (*CHIPScenesClusterGetSceneMembershipResponseCallbackType)( - void *, const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType &); - -typedef void (*CHIPScenesClusterSceneCountAttributeCallbackType)( - void *, chip::app::Clusters::Scenes::Attributes::SceneCount::TypeInfo::DecodableArgType); -typedef void (*CHIPScenesClusterCurrentSceneAttributeCallbackType)( - void *, chip::app::Clusters::Scenes::Attributes::CurrentScene::TypeInfo::DecodableArgType); -typedef void (*CHIPScenesClusterCurrentGroupAttributeCallbackType)( - void *, chip::app::Clusters::Scenes::Attributes::CurrentGroup::TypeInfo::DecodableArgType); -typedef void (*CHIPScenesClusterSceneValidAttributeCallbackType)( - void *, chip::app::Clusters::Scenes::Attributes::SceneValid::TypeInfo::DecodableArgType); -typedef void (*CHIPScenesClusterNameSupportAttributeCallbackType)( - void *, chip::app::Clusters::Scenes::Attributes::NameSupport::TypeInfo::DecodableArgType); -typedef void (*CHIPScenesClusterLastConfiguredByAttributeCallbackType)( - void *, chip::app::Clusters::Scenes::Attributes::LastConfiguredBy::TypeInfo::DecodableArgType); -typedef void (*CHIPScenesClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Scenes::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPScenesClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Scenes::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPScenesClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::Scenes::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPScenesClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::Scenes::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPScenesClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::Scenes::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPScenesClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::Scenes::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPOnOffClusterOnOffAttributeCallbackType)( - void *, chip::app::Clusters::OnOff::Attributes::OnOff::TypeInfo::DecodableArgType); -typedef void (*CHIPOnOffClusterGlobalSceneControlAttributeCallbackType)( - void *, chip::app::Clusters::OnOff::Attributes::GlobalSceneControl::TypeInfo::DecodableArgType); -typedef void (*CHIPOnOffClusterOnTimeAttributeCallbackType)( - void *, chip::app::Clusters::OnOff::Attributes::OnTime::TypeInfo::DecodableArgType); -typedef void (*CHIPOnOffClusterOffWaitTimeAttributeCallbackType)( - void *, chip::app::Clusters::OnOff::Attributes::OffWaitTime::TypeInfo::DecodableArgType); -typedef void (*CHIPOnOffClusterStartUpOnOffAttributeCallbackType)( - void *, chip::app::Clusters::OnOff::Attributes::StartUpOnOff::TypeInfo::DecodableArgType); -typedef void (*CHIPOnOffClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::OnOff::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPOnOffClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::OnOff::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPOnOffClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::OnOff::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPOnOffClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::OnOff::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPOnOffClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::OnOff::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPOnOffClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::OnOff::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPOnOffSwitchConfigurationClusterSwitchTypeAttributeCallbackType)( - void *, chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo::DecodableArgType); -typedef void (*CHIPOnOffSwitchConfigurationClusterSwitchActionsAttributeCallbackType)( - void *, chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo::DecodableArgType); -typedef void (*CHIPOnOffSwitchConfigurationClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPOnOffSwitchConfigurationClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPOnOffSwitchConfigurationClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::OnOffSwitchConfiguration::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPOnOffSwitchConfigurationClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPOnOffSwitchConfigurationClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPOnOffSwitchConfigurationClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPLevelControlClusterCurrentLevelAttributeCallbackType)( - void *, chip::app::Clusters::LevelControl::Attributes::CurrentLevel::TypeInfo::DecodableArgType); -typedef void (*CHIPLevelControlClusterRemainingTimeAttributeCallbackType)( - void *, chip::app::Clusters::LevelControl::Attributes::RemainingTime::TypeInfo::DecodableArgType); -typedef void (*CHIPLevelControlClusterMinLevelAttributeCallbackType)( - void *, chip::app::Clusters::LevelControl::Attributes::MinLevel::TypeInfo::DecodableArgType); -typedef void (*CHIPLevelControlClusterMaxLevelAttributeCallbackType)( - void *, chip::app::Clusters::LevelControl::Attributes::MaxLevel::TypeInfo::DecodableArgType); -typedef void (*CHIPLevelControlClusterCurrentFrequencyAttributeCallbackType)( - void *, chip::app::Clusters::LevelControl::Attributes::CurrentFrequency::TypeInfo::DecodableArgType); -typedef void (*CHIPLevelControlClusterMinFrequencyAttributeCallbackType)( - void *, chip::app::Clusters::LevelControl::Attributes::MinFrequency::TypeInfo::DecodableArgType); -typedef void (*CHIPLevelControlClusterMaxFrequencyAttributeCallbackType)( - void *, chip::app::Clusters::LevelControl::Attributes::MaxFrequency::TypeInfo::DecodableArgType); -typedef void (*CHIPLevelControlClusterOptionsAttributeCallbackType)( - void *, chip::app::Clusters::LevelControl::Attributes::Options::TypeInfo::DecodableArgType); -typedef void (*CHIPLevelControlClusterOnOffTransitionTimeAttributeCallbackType)( - void *, chip::app::Clusters::LevelControl::Attributes::OnOffTransitionTime::TypeInfo::DecodableArgType); -typedef void (*CHIPLevelControlClusterOnLevelAttributeCallbackType)( - void *, chip::app::Clusters::LevelControl::Attributes::OnLevel::TypeInfo::DecodableArgType); -typedef void (*CHIPLevelControlClusterOnTransitionTimeAttributeCallbackType)( - void *, chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::TypeInfo::DecodableArgType); -typedef void (*CHIPLevelControlClusterOffTransitionTimeAttributeCallbackType)( - void *, chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::TypeInfo::DecodableArgType); -typedef void (*CHIPLevelControlClusterDefaultMoveRateAttributeCallbackType)( - void *, chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::TypeInfo::DecodableArgType); -typedef void (*CHIPLevelControlClusterStartUpCurrentLevelAttributeCallbackType)( - void *, chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo::DecodableArgType); -typedef void (*CHIPLevelControlClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::LevelControl::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPLevelControlClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::LevelControl::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPLevelControlClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::LevelControl::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPLevelControlClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::LevelControl::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPLevelControlClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::LevelControl::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPLevelControlClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::LevelControl::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPBinaryInputBasicClusterActiveTextAttributeCallbackType)( - void *, chip::app::Clusters::BinaryInputBasic::Attributes::ActiveText::TypeInfo::DecodableArgType); -typedef void (*CHIPBinaryInputBasicClusterDescriptionAttributeCallbackType)( - void *, chip::app::Clusters::BinaryInputBasic::Attributes::Description::TypeInfo::DecodableArgType); -typedef void (*CHIPBinaryInputBasicClusterInactiveTextAttributeCallbackType)( - void *, chip::app::Clusters::BinaryInputBasic::Attributes::InactiveText::TypeInfo::DecodableArgType); -typedef void (*CHIPBinaryInputBasicClusterOutOfServiceAttributeCallbackType)( - void *, chip::app::Clusters::BinaryInputBasic::Attributes::OutOfService::TypeInfo::DecodableArgType); -typedef void (*CHIPBinaryInputBasicClusterPolarityAttributeCallbackType)( - void *, chip::app::Clusters::BinaryInputBasic::Attributes::Polarity::TypeInfo::DecodableArgType); -typedef void (*CHIPBinaryInputBasicClusterPresentValueAttributeCallbackType)( - void *, chip::app::Clusters::BinaryInputBasic::Attributes::PresentValue::TypeInfo::DecodableArgType); -typedef void (*CHIPBinaryInputBasicClusterReliabilityAttributeCallbackType)( - void *, chip::app::Clusters::BinaryInputBasic::Attributes::Reliability::TypeInfo::DecodableArgType); -typedef void (*CHIPBinaryInputBasicClusterStatusFlagsAttributeCallbackType)( - void *, chip::app::Clusters::BinaryInputBasic::Attributes::StatusFlags::TypeInfo::DecodableArgType); -typedef void (*CHIPBinaryInputBasicClusterApplicationTypeAttributeCallbackType)( - void *, chip::app::Clusters::BinaryInputBasic::Attributes::ApplicationType::TypeInfo::DecodableArgType); -typedef void (*CHIPBinaryInputBasicClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPBinaryInputBasicClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPBinaryInputBasicClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::BinaryInputBasic::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPBinaryInputBasicClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::BinaryInputBasic::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPBinaryInputBasicClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::BinaryInputBasic::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPBinaryInputBasicClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::BinaryInputBasic::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPDescriptorClusterDeviceTypeListAttributeCallbackType)( - void *, const chip::app::Clusters::Descriptor::Attributes::DeviceTypeList::TypeInfo::DecodableType &); -typedef void (*CHIPDescriptorClusterServerListAttributeCallbackType)( - void *, const chip::app::Clusters::Descriptor::Attributes::ServerList::TypeInfo::DecodableType &); -typedef void (*CHIPDescriptorClusterClientListAttributeCallbackType)( - void *, const chip::app::Clusters::Descriptor::Attributes::ClientList::TypeInfo::DecodableType &); -typedef void (*CHIPDescriptorClusterPartsListAttributeCallbackType)( - void *, const chip::app::Clusters::Descriptor::Attributes::PartsList::TypeInfo::DecodableType &); -typedef void (*CHIPDescriptorClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Descriptor::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPDescriptorClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Descriptor::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPDescriptorClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::Descriptor::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPDescriptorClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::Descriptor::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPDescriptorClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::Descriptor::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPDescriptorClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::Descriptor::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPBindingClusterBindingAttributeCallbackType)( - void *, const chip::app::Clusters::Binding::Attributes::Binding::TypeInfo::DecodableType &); -typedef void (*CHIPBindingClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Binding::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPBindingClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Binding::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPBindingClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::Binding::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPBindingClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::Binding::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPBindingClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::Binding::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPBindingClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::Binding::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPAccessControlClusterAclAttributeCallbackType)( - void *, const chip::app::Clusters::AccessControl::Attributes::Acl::TypeInfo::DecodableType &); -typedef void (*CHIPAccessControlClusterExtensionAttributeCallbackType)( - void *, const chip::app::Clusters::AccessControl::Attributes::Extension::TypeInfo::DecodableType &); -typedef void (*CHIPAccessControlClusterSubjectsPerAccessControlEntryAttributeCallbackType)( - void *, chip::app::Clusters::AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo::DecodableArgType); -typedef void (*CHIPAccessControlClusterTargetsPerAccessControlEntryAttributeCallbackType)( - void *, chip::app::Clusters::AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo::DecodableArgType); -typedef void (*CHIPAccessControlClusterAccessControlEntriesPerFabricAttributeCallbackType)( - void *, chip::app::Clusters::AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo::DecodableArgType); -typedef void (*CHIPAccessControlClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::AccessControl::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPAccessControlClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::AccessControl::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPAccessControlClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::AccessControl::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPAccessControlClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::AccessControl::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPAccessControlClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::AccessControl::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPAccessControlClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::AccessControl::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPActionsClusterActionListAttributeCallbackType)( - void *, const chip::app::Clusters::Actions::Attributes::ActionList::TypeInfo::DecodableType &); -typedef void (*CHIPActionsClusterEndpointListsAttributeCallbackType)( - void *, const chip::app::Clusters::Actions::Attributes::EndpointLists::TypeInfo::DecodableType &); -typedef void (*CHIPActionsClusterSetupURLAttributeCallbackType)( - void *, chip::app::Clusters::Actions::Attributes::SetupURL::TypeInfo::DecodableArgType); -typedef void (*CHIPActionsClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Actions::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPActionsClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Actions::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPActionsClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::Actions::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPActionsClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::Actions::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPActionsClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::Actions::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPActionsClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::Actions::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPBasicInformationClusterDataModelRevisionAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::DataModelRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterVendorNameAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::VendorName::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterVendorIDAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::VendorID::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterProductNameAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::ProductName::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterProductIDAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::ProductID::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterNodeLabelAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::NodeLabel::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterLocationAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::Location::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterHardwareVersionAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::HardwareVersion::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterHardwareVersionStringAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::HardwareVersionString::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterSoftwareVersionAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::SoftwareVersion::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterSoftwareVersionStringAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::SoftwareVersionString::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterManufacturingDateAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::ManufacturingDate::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterPartNumberAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::PartNumber::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterProductURLAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::ProductURL::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterProductLabelAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::ProductLabel::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterSerialNumberAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::SerialNumber::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterLocalConfigDisabledAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::LocalConfigDisabled::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterReachableAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::Reachable::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterUniqueIDAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::UniqueID::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterCapabilityMinimaAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::CapabilityMinima::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::BasicInformation::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPBasicInformationClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::BasicInformation::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPBasicInformationClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::BasicInformation::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPBasicInformationClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::BasicInformation::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPBasicInformationClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPBasicInformationClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::BasicInformation::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallbackType)( - void *, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType &); -typedef void (*CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackType)( - void *, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType &); - -typedef void (*CHIPOtaSoftwareUpdateProviderClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPOtaSoftwareUpdateProviderClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPOtaSoftwareUpdateProviderClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPOtaSoftwareUpdateProviderClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPOtaSoftwareUpdateProviderClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPOtaSoftwareUpdateProviderClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPOtaSoftwareUpdateRequestorClusterDefaultOTAProvidersAttributeCallbackType)( - void *, const chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo::DecodableType &); -typedef void (*CHIPOtaSoftwareUpdateRequestorClusterUpdatePossibleAttributeCallbackType)( - void *, chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo::DecodableArgType); -typedef void (*CHIPOtaSoftwareUpdateRequestorClusterUpdateStateAttributeCallbackType)( - void *, chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo::DecodableArgType); -typedef void (*CHIPOtaSoftwareUpdateRequestorClusterUpdateStateProgressAttributeCallbackType)( - void *, chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo::DecodableArgType); -typedef void (*CHIPOtaSoftwareUpdateRequestorClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPOtaSoftwareUpdateRequestorClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPOtaSoftwareUpdateRequestorClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPOtaSoftwareUpdateRequestorClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPOtaSoftwareUpdateRequestorClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPOtaSoftwareUpdateRequestorClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPLocalizationConfigurationClusterActiveLocaleAttributeCallbackType)( - void *, chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo::DecodableArgType); -typedef void (*CHIPLocalizationConfigurationClusterSupportedLocalesAttributeCallbackType)( - void *, const chip::app::Clusters::LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo::DecodableType &); -typedef void (*CHIPLocalizationConfigurationClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPLocalizationConfigurationClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPLocalizationConfigurationClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::LocalizationConfiguration::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPLocalizationConfigurationClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::LocalizationConfiguration::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPLocalizationConfigurationClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::LocalizationConfiguration::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPLocalizationConfigurationClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPTimeFormatLocalizationClusterHourFormatAttributeCallbackType)( - void *, chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::TypeInfo::DecodableArgType); -typedef void (*CHIPTimeFormatLocalizationClusterActiveCalendarTypeAttributeCallbackType)( - void *, chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo::DecodableArgType); -typedef void (*CHIPTimeFormatLocalizationClusterSupportedCalendarTypesAttributeCallbackType)( - void *, const chip::app::Clusters::TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo::DecodableType &); -typedef void (*CHIPTimeFormatLocalizationClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPTimeFormatLocalizationClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPTimeFormatLocalizationClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::TimeFormatLocalization::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPTimeFormatLocalizationClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::TimeFormatLocalization::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPTimeFormatLocalizationClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::TimeFormatLocalization::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPTimeFormatLocalizationClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPUnitLocalizationClusterTemperatureUnitAttributeCallbackType)( - void *, chip::app::Clusters::UnitLocalization::Attributes::TemperatureUnit::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitLocalizationClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::UnitLocalization::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPUnitLocalizationClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::UnitLocalization::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPUnitLocalizationClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::UnitLocalization::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPUnitLocalizationClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::UnitLocalization::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPUnitLocalizationClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::UnitLocalization::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitLocalizationClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::UnitLocalization::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPPowerSourceConfigurationClusterSourcesAttributeCallbackType)( - void *, const chip::app::Clusters::PowerSourceConfiguration::Attributes::Sources::TypeInfo::DecodableType &); -typedef void (*CHIPPowerSourceConfigurationClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPPowerSourceConfigurationClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPPowerSourceConfigurationClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::PowerSourceConfiguration::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPPowerSourceConfigurationClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::PowerSourceConfiguration::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPPowerSourceConfigurationClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceConfigurationClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPPowerSourceClusterStatusAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::Status::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterOrderAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::Order::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterDescriptionAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::Description::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterWiredAssessedInputVoltageAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterWiredAssessedInputFrequencyAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterWiredCurrentTypeAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::WiredCurrentType::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterWiredAssessedCurrentAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::WiredAssessedCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterWiredNominalVoltageAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::WiredNominalVoltage::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterWiredMaximumCurrentAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::WiredMaximumCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterWiredPresentAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::WiredPresent::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterActiveWiredFaultsAttributeCallbackType)( - void *, const chip::app::Clusters::PowerSource::Attributes::ActiveWiredFaults::TypeInfo::DecodableType &); -typedef void (*CHIPPowerSourceClusterBatVoltageAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatVoltage::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterBatPercentRemainingAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatPercentRemaining::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterBatTimeRemainingAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatTimeRemaining::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterBatChargeLevelAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatChargeLevel::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterBatReplacementNeededAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatReplacementNeeded::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterBatReplaceabilityAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatReplaceability::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterBatPresentAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatPresent::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterActiveBatFaultsAttributeCallbackType)( - void *, const chip::app::Clusters::PowerSource::Attributes::ActiveBatFaults::TypeInfo::DecodableType &); -typedef void (*CHIPPowerSourceClusterBatReplacementDescriptionAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatReplacementDescription::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterBatCommonDesignationAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatCommonDesignation::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterBatANSIDesignationAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatANSIDesignation::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterBatIECDesignationAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatIECDesignation::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterBatApprovedChemistryAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatApprovedChemistry::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterBatCapacityAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatCapacity::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterBatQuantityAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatQuantity::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterBatChargeStateAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatChargeState::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterBatTimeToFullChargeAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatTimeToFullCharge::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterBatFunctionalWhileChargingAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterBatChargingCurrentAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::BatChargingCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterActiveBatChargeFaultsAttributeCallbackType)( - void *, const chip::app::Clusters::PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo::DecodableType &); -typedef void (*CHIPPowerSourceClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::PowerSource::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPPowerSourceClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::PowerSource::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPPowerSourceClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::PowerSource::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPPowerSourceClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::PowerSource::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPPowerSourceClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPPowerSourceClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::PowerSource::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPGeneralCommissioningClusterArmFailSafeResponseCallbackType)( - void *, const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType &); -typedef void (*CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackType)( - void *, const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType &); -typedef void (*CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallbackType)( - void *, const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType &); - -typedef void (*CHIPGeneralCommissioningClusterBreadcrumbAttributeCallbackType)( - void *, chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::TypeInfo::DecodableArgType); -typedef void (*CHIPGeneralCommissioningClusterBasicCommissioningInfoAttributeCallbackType)( - void *, chip::app::Clusters::GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo::DecodableArgType); -typedef void (*CHIPGeneralCommissioningClusterRegulatoryConfigAttributeCallbackType)( - void *, chip::app::Clusters::GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo::DecodableArgType); -typedef void (*CHIPGeneralCommissioningClusterLocationCapabilityAttributeCallbackType)( - void *, chip::app::Clusters::GeneralCommissioning::Attributes::LocationCapability::TypeInfo::DecodableArgType); -typedef void (*CHIPGeneralCommissioningClusterSupportsConcurrentConnectionAttributeCallbackType)( - void *, chip::app::Clusters::GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo::DecodableArgType); -typedef void (*CHIPGeneralCommissioningClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPGeneralCommissioningClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPGeneralCommissioningClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::GeneralCommissioning::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPGeneralCommissioningClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::GeneralCommissioning::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPGeneralCommissioningClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::GeneralCommissioning::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPGeneralCommissioningClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::GeneralCommissioning::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPNetworkCommissioningClusterScanNetworksResponseCallbackType)( - void *, const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType &); -typedef void (*CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackType)( - void *, const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType &); -typedef void (*CHIPNetworkCommissioningClusterConnectNetworkResponseCallbackType)( - void *, const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType &); - -typedef void (*CHIPNetworkCommissioningClusterMaxNetworksAttributeCallbackType)( - void *, chip::app::Clusters::NetworkCommissioning::Attributes::MaxNetworks::TypeInfo::DecodableArgType); -typedef void (*CHIPNetworkCommissioningClusterNetworksAttributeCallbackType)( - void *, const chip::app::Clusters::NetworkCommissioning::Attributes::Networks::TypeInfo::DecodableType &); -typedef void (*CHIPNetworkCommissioningClusterScanMaxTimeSecondsAttributeCallbackType)( - void *, chip::app::Clusters::NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo::DecodableArgType); -typedef void (*CHIPNetworkCommissioningClusterConnectMaxTimeSecondsAttributeCallbackType)( - void *, chip::app::Clusters::NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo::DecodableArgType); -typedef void (*CHIPNetworkCommissioningClusterInterfaceEnabledAttributeCallbackType)( - void *, chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo::DecodableArgType); -typedef void (*CHIPNetworkCommissioningClusterLastNetworkingStatusAttributeCallbackType)( - void *, chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo::DecodableArgType); -typedef void (*CHIPNetworkCommissioningClusterLastNetworkIDAttributeCallbackType)( - void *, chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkID::TypeInfo::DecodableArgType); -typedef void (*CHIPNetworkCommissioningClusterLastConnectErrorValueAttributeCallbackType)( - void *, chip::app::Clusters::NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo::DecodableArgType); -typedef void (*CHIPNetworkCommissioningClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPNetworkCommissioningClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPNetworkCommissioningClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::NetworkCommissioning::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPNetworkCommissioningClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::NetworkCommissioning::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPNetworkCommissioningClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::NetworkCommissioning::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPNetworkCommissioningClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::NetworkCommissioning::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPDiagnosticLogsClusterRetrieveLogsResponseCallbackType)( - void *, const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType &); - -typedef void (*CHIPDiagnosticLogsClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPDiagnosticLogsClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPDiagnosticLogsClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::DiagnosticLogs::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPDiagnosticLogsClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::DiagnosticLogs::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPDiagnosticLogsClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::DiagnosticLogs::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPDiagnosticLogsClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::DiagnosticLogs::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPGeneralDiagnosticsClusterNetworkInterfacesAttributeCallbackType)( - void *, const chip::app::Clusters::GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo::DecodableType &); -typedef void (*CHIPGeneralDiagnosticsClusterRebootCountAttributeCallbackType)( - void *, chip::app::Clusters::GeneralDiagnostics::Attributes::RebootCount::TypeInfo::DecodableArgType); -typedef void (*CHIPGeneralDiagnosticsClusterUpTimeAttributeCallbackType)( - void *, chip::app::Clusters::GeneralDiagnostics::Attributes::UpTime::TypeInfo::DecodableArgType); -typedef void (*CHIPGeneralDiagnosticsClusterTotalOperationalHoursAttributeCallbackType)( - void *, chip::app::Clusters::GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo::DecodableArgType); -typedef void (*CHIPGeneralDiagnosticsClusterBootReasonAttributeCallbackType)( - void *, chip::app::Clusters::GeneralDiagnostics::Attributes::BootReason::TypeInfo::DecodableArgType); -typedef void (*CHIPGeneralDiagnosticsClusterActiveHardwareFaultsAttributeCallbackType)( - void *, const chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo::DecodableType &); -typedef void (*CHIPGeneralDiagnosticsClusterActiveRadioFaultsAttributeCallbackType)( - void *, const chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo::DecodableType &); -typedef void (*CHIPGeneralDiagnosticsClusterActiveNetworkFaultsAttributeCallbackType)( - void *, const chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo::DecodableType &); -typedef void (*CHIPGeneralDiagnosticsClusterTestEventTriggersEnabledAttributeCallbackType)( - void *, chip::app::Clusters::GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo::DecodableArgType); -typedef void (*CHIPGeneralDiagnosticsClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPGeneralDiagnosticsClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPGeneralDiagnosticsClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::GeneralDiagnostics::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPGeneralDiagnosticsClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::GeneralDiagnostics::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPGeneralDiagnosticsClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::GeneralDiagnostics::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPGeneralDiagnosticsClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPSoftwareDiagnosticsClusterThreadMetricsAttributeCallbackType)( - void *, const chip::app::Clusters::SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo::DecodableType &); -typedef void (*CHIPSoftwareDiagnosticsClusterCurrentHeapFreeAttributeCallbackType)( - void *, chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo::DecodableArgType); -typedef void (*CHIPSoftwareDiagnosticsClusterCurrentHeapUsedAttributeCallbackType)( - void *, chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo::DecodableArgType); -typedef void (*CHIPSoftwareDiagnosticsClusterCurrentHeapHighWatermarkAttributeCallbackType)( - void *, chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo::DecodableArgType); -typedef void (*CHIPSoftwareDiagnosticsClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPSoftwareDiagnosticsClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPSoftwareDiagnosticsClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::SoftwareDiagnostics::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPSoftwareDiagnosticsClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::SoftwareDiagnostics::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPSoftwareDiagnosticsClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPSoftwareDiagnosticsClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPThreadNetworkDiagnosticsClusterChannelAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterNetworkNameAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterPanIdAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterExtendedPanIdAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterMeshLocalPrefixAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterOverrunCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterNeighborTableAttributeCallbackType)( - void *, const chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo::DecodableType &); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRouteTableAttributeCallbackType)( - void *, const chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo::DecodableType &); -typedef void (*CHIPThreadNetworkDiagnosticsClusterPartitionIdAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterWeightingAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterDataVersionAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterStableDataVersionAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterLeaderRouterIdAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterDetachedRoleCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterChildRoleCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRouterRoleCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterLeaderRoleCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterAttachAttemptCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterPartitionIdChangeCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterBetterPartitionAttachAttemptCountAttributeCallbackType)( - void *, - chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterParentChangeCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterTxTotalCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterTxUnicastCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterTxBroadcastCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterTxAckRequestedCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterTxAckedCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterTxNoAckRequestedCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterTxDataCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterTxDataPollCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterTxBeaconCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterTxBeaconRequestCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterTxOtherCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterTxRetryCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterTxDirectMaxRetryExpiryCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterTxIndirectMaxRetryExpiryCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterTxErrCcaCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterTxErrAbortCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterTxErrBusyChannelCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRxTotalCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRxUnicastCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRxBroadcastCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRxDataCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRxDataPollCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRxBeaconCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRxBeaconRequestCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRxOtherCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRxAddressFilteredCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRxDestAddrFilteredCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRxDuplicatedCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRxErrNoFrameCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRxErrUnknownNeighborCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRxErrInvalidSrcAddrCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRxErrSecCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRxErrFcsCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterRxErrOtherCountAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterActiveTimestampAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterPendingTimestampAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterDelayAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterSecurityPolicyAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterChannelPage0MaskAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterOperationalDatasetComponentsAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterActiveNetworkFaultsListAttributeCallbackType)( - void *, const chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo::DecodableType &); -typedef void (*CHIPThreadNetworkDiagnosticsClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPThreadNetworkDiagnosticsClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPThreadNetworkDiagnosticsClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPThreadNetworkDiagnosticsClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPThreadNetworkDiagnosticsClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPThreadNetworkDiagnosticsClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPWiFiNetworkDiagnosticsClusterBssidAttributeCallbackType)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo::DecodableArgType); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackType)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo::DecodableArgType); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterWiFiVersionAttributeCallbackType)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo::DecodableArgType); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterChannelNumberAttributeCallbackType)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo::DecodableArgType); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterRssiAttributeCallbackType)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo::DecodableArgType); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterBeaconLostCountAttributeCallbackType)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo::DecodableArgType); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterBeaconRxCountAttributeCallbackType)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo::DecodableArgType); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterPacketMulticastRxCountAttributeCallbackType)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo::DecodableArgType); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterPacketMulticastTxCountAttributeCallbackType)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo::DecodableArgType); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterPacketUnicastRxCountAttributeCallbackType)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo::DecodableArgType); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterPacketUnicastTxCountAttributeCallbackType)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo::DecodableArgType); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterCurrentMaxRateAttributeCallbackType)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo::DecodableArgType); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterOverrunCountAttributeCallbackType)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo::DecodableArgType); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPWiFiNetworkDiagnosticsClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPEthernetNetworkDiagnosticsClusterPHYRateAttributeCallbackType)( - void *, chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo::DecodableArgType); -typedef void (*CHIPEthernetNetworkDiagnosticsClusterFullDuplexAttributeCallbackType)( - void *, chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo::DecodableArgType); -typedef void (*CHIPEthernetNetworkDiagnosticsClusterPacketRxCountAttributeCallbackType)( - void *, chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo::DecodableArgType); -typedef void (*CHIPEthernetNetworkDiagnosticsClusterPacketTxCountAttributeCallbackType)( - void *, chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo::DecodableArgType); -typedef void (*CHIPEthernetNetworkDiagnosticsClusterTxErrCountAttributeCallbackType)( - void *, chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo::DecodableArgType); -typedef void (*CHIPEthernetNetworkDiagnosticsClusterCollisionCountAttributeCallbackType)( - void *, chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo::DecodableArgType); -typedef void (*CHIPEthernetNetworkDiagnosticsClusterOverrunCountAttributeCallbackType)( - void *, chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo::DecodableArgType); -typedef void (*CHIPEthernetNetworkDiagnosticsClusterCarrierDetectAttributeCallbackType)( - void *, chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo::DecodableArgType); -typedef void (*CHIPEthernetNetworkDiagnosticsClusterTimeSinceResetAttributeCallbackType)( - void *, chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo::DecodableArgType); -typedef void (*CHIPEthernetNetworkDiagnosticsClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPEthernetNetworkDiagnosticsClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPEthernetNetworkDiagnosticsClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPEthernetNetworkDiagnosticsClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPEthernetNetworkDiagnosticsClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPEthernetNetworkDiagnosticsClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPBridgedDeviceBasicInformationClusterVendorNameAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicInformationClusterVendorIDAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicInformationClusterProductNameAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicInformationClusterNodeLabelAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicInformationClusterHardwareVersionAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicInformationClusterHardwareVersionStringAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicInformationClusterSoftwareVersionAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicInformationClusterSoftwareVersionStringAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicInformationClusterManufacturingDateAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicInformationClusterPartNumberAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicInformationClusterProductURLAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicInformationClusterProductLabelAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicInformationClusterSerialNumberAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicInformationClusterReachableAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicInformationClusterUniqueIDAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicInformationClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPBridgedDeviceBasicInformationClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPBridgedDeviceBasicInformationClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPBridgedDeviceBasicInformationClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPBridgedDeviceBasicInformationClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPBridgedDeviceBasicInformationClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPSwitchClusterNumberOfPositionsAttributeCallbackType)( - void *, chip::app::Clusters::Switch::Attributes::NumberOfPositions::TypeInfo::DecodableArgType); -typedef void (*CHIPSwitchClusterCurrentPositionAttributeCallbackType)( - void *, chip::app::Clusters::Switch::Attributes::CurrentPosition::TypeInfo::DecodableArgType); -typedef void (*CHIPSwitchClusterMultiPressMaxAttributeCallbackType)( - void *, chip::app::Clusters::Switch::Attributes::MultiPressMax::TypeInfo::DecodableArgType); -typedef void (*CHIPSwitchClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Switch::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPSwitchClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Switch::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPSwitchClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::Switch::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPSwitchClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::Switch::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPSwitchClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::Switch::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPSwitchClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::Switch::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPAdministratorCommissioningClusterWindowStatusAttributeCallbackType)( - void *, chip::app::Clusters::AdministratorCommissioning::Attributes::WindowStatus::TypeInfo::DecodableArgType); -typedef void (*CHIPAdministratorCommissioningClusterAdminFabricIndexAttributeCallbackType)( - void *, chip::app::Clusters::AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo::DecodableArgType); -typedef void (*CHIPAdministratorCommissioningClusterAdminVendorIdAttributeCallbackType)( - void *, chip::app::Clusters::AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo::DecodableArgType); -typedef void (*CHIPAdministratorCommissioningClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPAdministratorCommissioningClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPAdministratorCommissioningClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::AdministratorCommissioning::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPAdministratorCommissioningClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::AdministratorCommissioning::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPAdministratorCommissioningClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::AdministratorCommissioning::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPAdministratorCommissioningClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPOperationalCredentialsClusterAttestationResponseCallbackType)( - void *, const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType &); -typedef void (*CHIPOperationalCredentialsClusterCertificateChainResponseCallbackType)( - void *, const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType &); -typedef void (*CHIPOperationalCredentialsClusterCSRResponseCallbackType)( - void *, const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType &); -typedef void (*CHIPOperationalCredentialsClusterNOCResponseCallbackType)( - void *, const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType &); - -typedef void (*CHIPOperationalCredentialsClusterNOCsAttributeCallbackType)( - void *, const chip::app::Clusters::OperationalCredentials::Attributes::NOCs::TypeInfo::DecodableType &); -typedef void (*CHIPOperationalCredentialsClusterFabricsAttributeCallbackType)( - void *, const chip::app::Clusters::OperationalCredentials::Attributes::Fabrics::TypeInfo::DecodableType &); -typedef void (*CHIPOperationalCredentialsClusterSupportedFabricsAttributeCallbackType)( - void *, chip::app::Clusters::OperationalCredentials::Attributes::SupportedFabrics::TypeInfo::DecodableArgType); -typedef void (*CHIPOperationalCredentialsClusterCommissionedFabricsAttributeCallbackType)( - void *, chip::app::Clusters::OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo::DecodableArgType); -typedef void (*CHIPOperationalCredentialsClusterTrustedRootCertificatesAttributeCallbackType)( - void *, const chip::app::Clusters::OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo::DecodableType &); -typedef void (*CHIPOperationalCredentialsClusterCurrentFabricIndexAttributeCallbackType)( - void *, chip::app::Clusters::OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo::DecodableArgType); -typedef void (*CHIPOperationalCredentialsClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPOperationalCredentialsClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPOperationalCredentialsClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::OperationalCredentials::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPOperationalCredentialsClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::OperationalCredentials::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPOperationalCredentialsClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::OperationalCredentials::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPOperationalCredentialsClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::OperationalCredentials::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPGroupKeyManagementClusterKeySetReadResponseCallbackType)( - void *, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType &); -typedef void (*CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackType)( - void *, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType &); - -typedef void (*CHIPGroupKeyManagementClusterGroupKeyMapAttributeCallbackType)( - void *, const chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo::DecodableType &); -typedef void (*CHIPGroupKeyManagementClusterGroupTableAttributeCallbackType)( - void *, const chip::app::Clusters::GroupKeyManagement::Attributes::GroupTable::TypeInfo::DecodableType &); -typedef void (*CHIPGroupKeyManagementClusterMaxGroupsPerFabricAttributeCallbackType)( - void *, chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo::DecodableArgType); -typedef void (*CHIPGroupKeyManagementClusterMaxGroupKeysPerFabricAttributeCallbackType)( - void *, chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo::DecodableArgType); -typedef void (*CHIPGroupKeyManagementClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPGroupKeyManagementClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPGroupKeyManagementClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::GroupKeyManagement::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPGroupKeyManagementClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::GroupKeyManagement::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPGroupKeyManagementClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::GroupKeyManagement::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPGroupKeyManagementClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::GroupKeyManagement::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPFixedLabelClusterLabelListAttributeCallbackType)( - void *, const chip::app::Clusters::FixedLabel::Attributes::LabelList::TypeInfo::DecodableType &); -typedef void (*CHIPFixedLabelClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::FixedLabel::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPFixedLabelClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::FixedLabel::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPFixedLabelClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::FixedLabel::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPFixedLabelClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::FixedLabel::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPFixedLabelClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::FixedLabel::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPFixedLabelClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::FixedLabel::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPUserLabelClusterLabelListAttributeCallbackType)( - void *, const chip::app::Clusters::UserLabel::Attributes::LabelList::TypeInfo::DecodableType &); -typedef void (*CHIPUserLabelClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::UserLabel::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPUserLabelClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::UserLabel::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPUserLabelClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::UserLabel::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPUserLabelClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::UserLabel::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPUserLabelClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::UserLabel::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPUserLabelClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::UserLabel::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPBooleanStateClusterStateValueAttributeCallbackType)( - void *, chip::app::Clusters::BooleanState::Attributes::StateValue::TypeInfo::DecodableArgType); -typedef void (*CHIPBooleanStateClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::BooleanState::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPBooleanStateClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::BooleanState::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPBooleanStateClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::BooleanState::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPBooleanStateClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::BooleanState::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPBooleanStateClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::BooleanState::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPBooleanStateClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::BooleanState::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPModeSelectClusterDescriptionAttributeCallbackType)( - void *, chip::app::Clusters::ModeSelect::Attributes::Description::TypeInfo::DecodableArgType); -typedef void (*CHIPModeSelectClusterStandardNamespaceAttributeCallbackType)( - void *, chip::app::Clusters::ModeSelect::Attributes::StandardNamespace::TypeInfo::DecodableArgType); -typedef void (*CHIPModeSelectClusterSupportedModesAttributeCallbackType)( - void *, const chip::app::Clusters::ModeSelect::Attributes::SupportedModes::TypeInfo::DecodableType &); -typedef void (*CHIPModeSelectClusterCurrentModeAttributeCallbackType)( - void *, chip::app::Clusters::ModeSelect::Attributes::CurrentMode::TypeInfo::DecodableArgType); -typedef void (*CHIPModeSelectClusterStartUpModeAttributeCallbackType)( - void *, chip::app::Clusters::ModeSelect::Attributes::StartUpMode::TypeInfo::DecodableArgType); -typedef void (*CHIPModeSelectClusterOnModeAttributeCallbackType)( - void *, chip::app::Clusters::ModeSelect::Attributes::OnMode::TypeInfo::DecodableArgType); -typedef void (*CHIPModeSelectClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::ModeSelect::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPModeSelectClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::ModeSelect::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPModeSelectClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::ModeSelect::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPModeSelectClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::ModeSelect::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPModeSelectClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::ModeSelect::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPModeSelectClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::ModeSelect::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterGetWeekDayScheduleResponseCallbackType)( - void *, const chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType &); -typedef void (*CHIPDoorLockClusterGetYearDayScheduleResponseCallbackType)( - void *, const chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType &); -typedef void (*CHIPDoorLockClusterGetHolidayScheduleResponseCallbackType)( - void *, const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType &); -typedef void (*CHIPDoorLockClusterGetUserResponseCallbackType)( - void *, const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType &); -typedef void (*CHIPDoorLockClusterSetCredentialResponseCallbackType)( - void *, const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType &); -typedef void (*CHIPDoorLockClusterGetCredentialStatusResponseCallbackType)( - void *, const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType &); - -typedef void (*CHIPDoorLockClusterLockStateAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::LockState::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterLockTypeAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::LockType::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterActuatorEnabledAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::ActuatorEnabled::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterDoorStateAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::DoorState::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterDoorOpenEventsAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::DoorOpenEvents::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterDoorClosedEventsAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::DoorClosedEvents::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterOpenPeriodAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::OpenPeriod::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterNumberOfTotalUsersSupportedAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterNumberOfPINUsersSupportedAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterNumberOfRFIDUsersSupportedAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterNumberOfWeekDaySchedulesSupportedPerUserAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterNumberOfYearDaySchedulesSupportedPerUserAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterNumberOfHolidaySchedulesSupportedAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterMaxPINCodeLengthAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::MaxPINCodeLength::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterMinPINCodeLengthAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::MinPINCodeLength::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterMaxRFIDCodeLengthAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterMinRFIDCodeLengthAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::MinRFIDCodeLength::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterCredentialRulesSupportAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::CredentialRulesSupport::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterNumberOfCredentialsSupportedPerUserAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterLanguageAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::Language::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterLEDSettingsAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::LEDSettings::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterAutoRelockTimeAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterSoundVolumeAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::SoundVolume::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterOperatingModeAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::OperatingMode::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterSupportedOperatingModesAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::SupportedOperatingModes::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterDefaultConfigurationRegisterAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterEnableLocalProgrammingAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::EnableLocalProgramming::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterEnableOneTouchLockingAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterEnableInsideStatusLEDAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::EnableInsideStatusLED::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterEnablePrivacyModeButtonAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterLocalProgrammingFeaturesAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterWrongCodeEntryLimitAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterUserCodeTemporaryDisableTimeAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterSendPINOverTheAirAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::SendPINOverTheAir::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterRequirePINforRemoteOperationAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterExpiringUserTimeoutAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::ExpiringUserTimeout::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::DoorLock::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPDoorLockClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::DoorLock::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPDoorLockClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::DoorLock::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPDoorLockClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::DoorLock::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPDoorLockClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPDoorLockClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::DoorLock::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPWindowCoveringClusterTypeAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::Type::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterPhysicalClosedLimitLiftAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterPhysicalClosedLimitTiltAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterCurrentPositionLiftAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLift::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterCurrentPositionTiltAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTilt::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterNumberOfActuationsLiftAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterNumberOfActuationsTiltAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterConfigStatusAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::ConfigStatus::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterCurrentPositionLiftPercentageAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterCurrentPositionTiltPercentageAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterOperationalStatusAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::OperationalStatus::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterTargetPositionLiftPercent100thsAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterTargetPositionTiltPercent100thsAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterEndProductTypeAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::EndProductType::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterCurrentPositionLiftPercent100thsAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterCurrentPositionTiltPercent100thsAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterInstalledOpenLimitLiftAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterInstalledClosedLimitLiftAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterInstalledOpenLimitTiltAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterInstalledClosedLimitTiltAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterModeAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::Mode::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterSafetyStatusAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::SafetyStatus::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::WindowCovering::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPWindowCoveringClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::WindowCovering::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPWindowCoveringClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::WindowCovering::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPWindowCoveringClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::WindowCovering::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPWindowCoveringClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPWindowCoveringClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::WindowCovering::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPBarrierControlClusterBarrierMovingStateAttributeCallbackType)( - void *, chip::app::Clusters::BarrierControl::Attributes::BarrierMovingState::TypeInfo::DecodableArgType); -typedef void (*CHIPBarrierControlClusterBarrierSafetyStatusAttributeCallbackType)( - void *, chip::app::Clusters::BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo::DecodableArgType); -typedef void (*CHIPBarrierControlClusterBarrierCapabilitiesAttributeCallbackType)( - void *, chip::app::Clusters::BarrierControl::Attributes::BarrierCapabilities::TypeInfo::DecodableArgType); -typedef void (*CHIPBarrierControlClusterBarrierOpenEventsAttributeCallbackType)( - void *, chip::app::Clusters::BarrierControl::Attributes::BarrierOpenEvents::TypeInfo::DecodableArgType); -typedef void (*CHIPBarrierControlClusterBarrierCloseEventsAttributeCallbackType)( - void *, chip::app::Clusters::BarrierControl::Attributes::BarrierCloseEvents::TypeInfo::DecodableArgType); -typedef void (*CHIPBarrierControlClusterBarrierCommandOpenEventsAttributeCallbackType)( - void *, chip::app::Clusters::BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo::DecodableArgType); -typedef void (*CHIPBarrierControlClusterBarrierCommandCloseEventsAttributeCallbackType)( - void *, chip::app::Clusters::BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo::DecodableArgType); -typedef void (*CHIPBarrierControlClusterBarrierOpenPeriodAttributeCallbackType)( - void *, chip::app::Clusters::BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo::DecodableArgType); -typedef void (*CHIPBarrierControlClusterBarrierClosePeriodAttributeCallbackType)( - void *, chip::app::Clusters::BarrierControl::Attributes::BarrierClosePeriod::TypeInfo::DecodableArgType); -typedef void (*CHIPBarrierControlClusterBarrierPositionAttributeCallbackType)( - void *, chip::app::Clusters::BarrierControl::Attributes::BarrierPosition::TypeInfo::DecodableArgType); -typedef void (*CHIPBarrierControlClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::BarrierControl::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPBarrierControlClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::BarrierControl::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPBarrierControlClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::BarrierControl::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPBarrierControlClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::BarrierControl::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPBarrierControlClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::BarrierControl::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPBarrierControlClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::BarrierControl::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPPumpConfigurationAndControlClusterMaxPressureAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterMaxSpeedAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterMaxFlowAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterMinConstPressureAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterMaxConstPressureAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterMinCompPressureAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterMaxCompPressureAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterMinConstSpeedAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterMaxConstSpeedAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterMinConstFlowAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterMaxConstFlowAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterMinConstTempAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterMaxConstTempAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterPumpStatusAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterEffectiveOperationModeAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterEffectiveControlModeAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterCapacityAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::Capacity::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterSpeedAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::Speed::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterLifetimeRunningHoursAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterPowerAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterLifetimeEnergyConsumedAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterOperationModeAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterControlModeAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPPumpConfigurationAndControlClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPPumpConfigurationAndControlClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::PumpConfigurationAndControl::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPPumpConfigurationAndControlClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPPumpConfigurationAndControlClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPPumpConfigurationAndControlClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterGetWeeklyScheduleResponseCallbackType)( - void *, const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType &); - -typedef void (*CHIPThermostatClusterLocalTemperatureAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::LocalTemperature::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterOutdoorTemperatureAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::OutdoorTemperature::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterOccupancyAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::Occupancy::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterAbsMinHeatSetpointLimitAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterAbsMaxHeatSetpointLimitAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterAbsMinCoolSetpointLimitAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterAbsMaxCoolSetpointLimitAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterPICoolingDemandAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::PICoolingDemand::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterPIHeatingDemandAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::PIHeatingDemand::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterHVACSystemTypeConfigurationAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterLocalTemperatureCalibrationAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterOccupiedCoolingSetpointAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterOccupiedHeatingSetpointAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterUnoccupiedCoolingSetpointAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterUnoccupiedHeatingSetpointAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterMinHeatSetpointLimitAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterMaxHeatSetpointLimitAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterMinCoolSetpointLimitAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterMaxCoolSetpointLimitAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterMinSetpointDeadBandAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterRemoteSensingAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::RemoteSensing::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterControlSequenceOfOperationAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterSystemModeAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::SystemMode::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterThermostatRunningModeAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::ThermostatRunningMode::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterStartOfWeekAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::StartOfWeek::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterNumberOfWeeklyTransitionsAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterNumberOfDailyTransitionsAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterTemperatureSetpointHoldAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterTemperatureSetpointHoldDurationAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterThermostatProgrammingOperationModeAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterThermostatRunningStateAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::ThermostatRunningState::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterSetpointChangeSourceAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::SetpointChangeSource::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterSetpointChangeAmountAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::SetpointChangeAmount::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterSetpointChangeSourceTimestampAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterOccupiedSetbackAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterOccupiedSetbackMinAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMin::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterOccupiedSetbackMaxAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMax::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterUnoccupiedSetbackAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterUnoccupiedSetbackMinAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterUnoccupiedSetbackMaxAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterEmergencyHeatDeltaAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterACTypeAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::ACType::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterACCapacityAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::ACCapacity::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterACRefrigerantTypeAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterACCompressorTypeAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::ACCompressorType::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterACErrorCodeAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::ACErrorCode::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterACLouverPositionAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterACCoilTemperatureAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::ACCoilTemperature::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterACCapacityformatAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Thermostat::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPThermostatClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Thermostat::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPThermostatClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::Thermostat::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPThermostatClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::Thermostat::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPThermostatClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::Thermostat::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPFanControlClusterFanModeAttributeCallbackType)( - void *, chip::app::Clusters::FanControl::Attributes::FanMode::TypeInfo::DecodableArgType); -typedef void (*CHIPFanControlClusterFanModeSequenceAttributeCallbackType)( - void *, chip::app::Clusters::FanControl::Attributes::FanModeSequence::TypeInfo::DecodableArgType); -typedef void (*CHIPFanControlClusterPercentSettingAttributeCallbackType)( - void *, chip::app::Clusters::FanControl::Attributes::PercentSetting::TypeInfo::DecodableArgType); -typedef void (*CHIPFanControlClusterPercentCurrentAttributeCallbackType)( - void *, chip::app::Clusters::FanControl::Attributes::PercentCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPFanControlClusterSpeedMaxAttributeCallbackType)( - void *, chip::app::Clusters::FanControl::Attributes::SpeedMax::TypeInfo::DecodableArgType); -typedef void (*CHIPFanControlClusterSpeedSettingAttributeCallbackType)( - void *, chip::app::Clusters::FanControl::Attributes::SpeedSetting::TypeInfo::DecodableArgType); -typedef void (*CHIPFanControlClusterSpeedCurrentAttributeCallbackType)( - void *, chip::app::Clusters::FanControl::Attributes::SpeedCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPFanControlClusterRockSupportAttributeCallbackType)( - void *, chip::app::Clusters::FanControl::Attributes::RockSupport::TypeInfo::DecodableArgType); -typedef void (*CHIPFanControlClusterRockSettingAttributeCallbackType)( - void *, chip::app::Clusters::FanControl::Attributes::RockSetting::TypeInfo::DecodableArgType); -typedef void (*CHIPFanControlClusterWindSupportAttributeCallbackType)( - void *, chip::app::Clusters::FanControl::Attributes::WindSupport::TypeInfo::DecodableArgType); -typedef void (*CHIPFanControlClusterWindSettingAttributeCallbackType)( - void *, chip::app::Clusters::FanControl::Attributes::WindSetting::TypeInfo::DecodableArgType); -typedef void (*CHIPFanControlClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::FanControl::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPFanControlClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::FanControl::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPFanControlClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::FanControl::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPFanControlClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::FanControl::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPFanControlClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::FanControl::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPFanControlClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::FanControl::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPThermostatUserInterfaceConfigurationClusterTemperatureDisplayModeAttributeCallbackType)( - void *, - chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatUserInterfaceConfigurationClusterKeypadLockoutAttributeCallbackType)( - void *, chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatUserInterfaceConfigurationClusterScheduleProgrammingVisibilityAttributeCallbackType)( - void *, - chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo:: - DecodableArgType); -typedef void (*CHIPThermostatUserInterfaceConfigurationClusterGeneratedCommandListAttributeCallbackType)( - void *, - const chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPThermostatUserInterfaceConfigurationClusterAcceptedCommandListAttributeCallbackType)( - void *, - const chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPThermostatUserInterfaceConfigurationClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPThermostatUserInterfaceConfigurationClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPThermostatUserInterfaceConfigurationClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPThermostatUserInterfaceConfigurationClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPColorControlClusterCurrentHueAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::CurrentHue::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterCurrentSaturationAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::CurrentSaturation::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterRemainingTimeAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::RemainingTime::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterCurrentXAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::CurrentX::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterCurrentYAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::CurrentY::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterDriftCompensationAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::DriftCompensation::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterCompensationTextAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::CompensationText::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorTemperatureMiredsAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorTemperatureMireds::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorModeAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorMode::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterOptionsAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Options::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterNumberOfPrimariesAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::NumberOfPrimaries::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary1XAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary1X::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary1YAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary1Y::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary1IntensityAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary1Intensity::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary2XAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary2X::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary2YAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary2Y::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary2IntensityAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary2Intensity::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary3XAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary3X::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary3YAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary3Y::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary3IntensityAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary3Intensity::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary4XAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary4X::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary4YAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary4Y::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary4IntensityAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary4Intensity::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary5XAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary5X::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary5YAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary5Y::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary5IntensityAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary5Intensity::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary6XAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary6X::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary6YAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary6Y::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterPrimary6IntensityAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::Primary6Intensity::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterWhitePointXAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::WhitePointX::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterWhitePointYAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::WhitePointY::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorPointRXAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorPointRX::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorPointRYAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorPointRY::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorPointRIntensityAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorPointGXAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorPointGX::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorPointGYAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorPointGY::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorPointGIntensityAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorPointBXAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorPointBX::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorPointBYAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorPointBY::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorPointBIntensityAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterEnhancedCurrentHueAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::EnhancedCurrentHue::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterEnhancedColorModeAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::EnhancedColorMode::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorLoopActiveAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorLoopActive::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorLoopDirectionAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorLoopDirection::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorLoopTimeAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorLoopTime::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorLoopStartEnhancedHueAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorLoopStoredEnhancedHueAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorCapabilitiesAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorCapabilities::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorTempPhysicalMinMiredsAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterColorTempPhysicalMaxMiredsAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterCoupleColorTempToLevelMinMiredsAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterStartUpColorTemperatureMiredsAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::ColorControl::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPColorControlClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::ColorControl::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPColorControlClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::ColorControl::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPColorControlClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::ColorControl::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPColorControlClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPColorControlClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::ColorControl::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPBallastConfigurationClusterPhysicalMinLevelAttributeCallbackType)( - void *, chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo::DecodableArgType); -typedef void (*CHIPBallastConfigurationClusterPhysicalMaxLevelAttributeCallbackType)( - void *, chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo::DecodableArgType); -typedef void (*CHIPBallastConfigurationClusterBallastStatusAttributeCallbackType)( - void *, chip::app::Clusters::BallastConfiguration::Attributes::BallastStatus::TypeInfo::DecodableArgType); -typedef void (*CHIPBallastConfigurationClusterMinLevelAttributeCallbackType)( - void *, chip::app::Clusters::BallastConfiguration::Attributes::MinLevel::TypeInfo::DecodableArgType); -typedef void (*CHIPBallastConfigurationClusterMaxLevelAttributeCallbackType)( - void *, chip::app::Clusters::BallastConfiguration::Attributes::MaxLevel::TypeInfo::DecodableArgType); -typedef void (*CHIPBallastConfigurationClusterIntrinsicBallastFactorAttributeCallbackType)( - void *, chip::app::Clusters::BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo::DecodableArgType); -typedef void (*CHIPBallastConfigurationClusterBallastFactorAdjustmentAttributeCallbackType)( - void *, chip::app::Clusters::BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo::DecodableArgType); -typedef void (*CHIPBallastConfigurationClusterLampQuantityAttributeCallbackType)( - void *, chip::app::Clusters::BallastConfiguration::Attributes::LampQuantity::TypeInfo::DecodableArgType); -typedef void (*CHIPBallastConfigurationClusterLampTypeAttributeCallbackType)( - void *, chip::app::Clusters::BallastConfiguration::Attributes::LampType::TypeInfo::DecodableArgType); -typedef void (*CHIPBallastConfigurationClusterLampManufacturerAttributeCallbackType)( - void *, chip::app::Clusters::BallastConfiguration::Attributes::LampManufacturer::TypeInfo::DecodableArgType); -typedef void (*CHIPBallastConfigurationClusterLampRatedHoursAttributeCallbackType)( - void *, chip::app::Clusters::BallastConfiguration::Attributes::LampRatedHours::TypeInfo::DecodableArgType); -typedef void (*CHIPBallastConfigurationClusterLampBurnHoursAttributeCallbackType)( - void *, chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHours::TypeInfo::DecodableArgType); -typedef void (*CHIPBallastConfigurationClusterLampAlarmModeAttributeCallbackType)( - void *, chip::app::Clusters::BallastConfiguration::Attributes::LampAlarmMode::TypeInfo::DecodableArgType); -typedef void (*CHIPBallastConfigurationClusterLampBurnHoursTripPointAttributeCallbackType)( - void *, chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo::DecodableArgType); -typedef void (*CHIPBallastConfigurationClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPBallastConfigurationClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPBallastConfigurationClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::BallastConfiguration::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPBallastConfigurationClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::BallastConfiguration::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPBallastConfigurationClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::BallastConfiguration::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPBallastConfigurationClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::BallastConfiguration::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPIlluminanceMeasurementClusterMeasuredValueAttributeCallbackType)( - void *, chip::app::Clusters::IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo::DecodableArgType); -typedef void (*CHIPIlluminanceMeasurementClusterMinMeasuredValueAttributeCallbackType)( - void *, chip::app::Clusters::IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo::DecodableArgType); -typedef void (*CHIPIlluminanceMeasurementClusterMaxMeasuredValueAttributeCallbackType)( - void *, chip::app::Clusters::IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo::DecodableArgType); -typedef void (*CHIPIlluminanceMeasurementClusterToleranceAttributeCallbackType)( - void *, chip::app::Clusters::IlluminanceMeasurement::Attributes::Tolerance::TypeInfo::DecodableArgType); -typedef void (*CHIPIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackType)( - void *, chip::app::Clusters::IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo::DecodableArgType); -typedef void (*CHIPIlluminanceMeasurementClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPIlluminanceMeasurementClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPIlluminanceMeasurementClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::IlluminanceMeasurement::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPIlluminanceMeasurementClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::IlluminanceMeasurement::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPIlluminanceMeasurementClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPIlluminanceMeasurementClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPTemperatureMeasurementClusterMeasuredValueAttributeCallbackType)( - void *, chip::app::Clusters::TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo::DecodableArgType); -typedef void (*CHIPTemperatureMeasurementClusterMinMeasuredValueAttributeCallbackType)( - void *, chip::app::Clusters::TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo::DecodableArgType); -typedef void (*CHIPTemperatureMeasurementClusterMaxMeasuredValueAttributeCallbackType)( - void *, chip::app::Clusters::TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo::DecodableArgType); -typedef void (*CHIPTemperatureMeasurementClusterToleranceAttributeCallbackType)( - void *, chip::app::Clusters::TemperatureMeasurement::Attributes::Tolerance::TypeInfo::DecodableArgType); -typedef void (*CHIPTemperatureMeasurementClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPTemperatureMeasurementClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPTemperatureMeasurementClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::TemperatureMeasurement::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPTemperatureMeasurementClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::TemperatureMeasurement::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPTemperatureMeasurementClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::TemperatureMeasurement::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPTemperatureMeasurementClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPPressureMeasurementClusterMeasuredValueAttributeCallbackType)( - void *, chip::app::Clusters::PressureMeasurement::Attributes::MeasuredValue::TypeInfo::DecodableArgType); -typedef void (*CHIPPressureMeasurementClusterMinMeasuredValueAttributeCallbackType)( - void *, chip::app::Clusters::PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo::DecodableArgType); -typedef void (*CHIPPressureMeasurementClusterMaxMeasuredValueAttributeCallbackType)( - void *, chip::app::Clusters::PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo::DecodableArgType); -typedef void (*CHIPPressureMeasurementClusterToleranceAttributeCallbackType)( - void *, chip::app::Clusters::PressureMeasurement::Attributes::Tolerance::TypeInfo::DecodableArgType); -typedef void (*CHIPPressureMeasurementClusterScaledValueAttributeCallbackType)( - void *, chip::app::Clusters::PressureMeasurement::Attributes::ScaledValue::TypeInfo::DecodableArgType); -typedef void (*CHIPPressureMeasurementClusterMinScaledValueAttributeCallbackType)( - void *, chip::app::Clusters::PressureMeasurement::Attributes::MinScaledValue::TypeInfo::DecodableArgType); -typedef void (*CHIPPressureMeasurementClusterMaxScaledValueAttributeCallbackType)( - void *, chip::app::Clusters::PressureMeasurement::Attributes::MaxScaledValue::TypeInfo::DecodableArgType); -typedef void (*CHIPPressureMeasurementClusterScaledToleranceAttributeCallbackType)( - void *, chip::app::Clusters::PressureMeasurement::Attributes::ScaledTolerance::TypeInfo::DecodableArgType); -typedef void (*CHIPPressureMeasurementClusterScaleAttributeCallbackType)( - void *, chip::app::Clusters::PressureMeasurement::Attributes::Scale::TypeInfo::DecodableArgType); -typedef void (*CHIPPressureMeasurementClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPPressureMeasurementClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPPressureMeasurementClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::PressureMeasurement::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPPressureMeasurementClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::PressureMeasurement::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPPressureMeasurementClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::PressureMeasurement::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPPressureMeasurementClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::PressureMeasurement::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPFlowMeasurementClusterMeasuredValueAttributeCallbackType)( - void *, chip::app::Clusters::FlowMeasurement::Attributes::MeasuredValue::TypeInfo::DecodableArgType); -typedef void (*CHIPFlowMeasurementClusterMinMeasuredValueAttributeCallbackType)( - void *, chip::app::Clusters::FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo::DecodableArgType); -typedef void (*CHIPFlowMeasurementClusterMaxMeasuredValueAttributeCallbackType)( - void *, chip::app::Clusters::FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo::DecodableArgType); -typedef void (*CHIPFlowMeasurementClusterToleranceAttributeCallbackType)( - void *, chip::app::Clusters::FlowMeasurement::Attributes::Tolerance::TypeInfo::DecodableArgType); -typedef void (*CHIPFlowMeasurementClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPFlowMeasurementClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPFlowMeasurementClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::FlowMeasurement::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPFlowMeasurementClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::FlowMeasurement::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPFlowMeasurementClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::FlowMeasurement::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPFlowMeasurementClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::FlowMeasurement::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPRelativeHumidityMeasurementClusterMeasuredValueAttributeCallbackType)( - void *, chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo::DecodableArgType); -typedef void (*CHIPRelativeHumidityMeasurementClusterMinMeasuredValueAttributeCallbackType)( - void *, chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo::DecodableArgType); -typedef void (*CHIPRelativeHumidityMeasurementClusterMaxMeasuredValueAttributeCallbackType)( - void *, chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo::DecodableArgType); -typedef void (*CHIPRelativeHumidityMeasurementClusterToleranceAttributeCallbackType)( - void *, chip::app::Clusters::RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo::DecodableArgType); -typedef void (*CHIPRelativeHumidityMeasurementClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPRelativeHumidityMeasurementClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPRelativeHumidityMeasurementClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::RelativeHumidityMeasurement::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPRelativeHumidityMeasurementClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPRelativeHumidityMeasurementClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPRelativeHumidityMeasurementClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPOccupancySensingClusterOccupancyAttributeCallbackType)( - void *, chip::app::Clusters::OccupancySensing::Attributes::Occupancy::TypeInfo::DecodableArgType); -typedef void (*CHIPOccupancySensingClusterOccupancySensorTypeAttributeCallbackType)( - void *, chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorType::TypeInfo::DecodableArgType); -typedef void (*CHIPOccupancySensingClusterOccupancySensorTypeBitmapAttributeCallbackType)( - void *, chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo::DecodableArgType); -typedef void (*CHIPOccupancySensingClusterPIROccupiedToUnoccupiedDelayAttributeCallbackType)( - void *, chip::app::Clusters::OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo::DecodableArgType); -typedef void (*CHIPOccupancySensingClusterPIRUnoccupiedToOccupiedDelayAttributeCallbackType)( - void *, chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo::DecodableArgType); -typedef void (*CHIPOccupancySensingClusterPIRUnoccupiedToOccupiedThresholdAttributeCallbackType)( - void *, chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo::DecodableArgType); -typedef void (*CHIPOccupancySensingClusterUltrasonicOccupiedToUnoccupiedDelayAttributeCallbackType)( - void *, chip::app::Clusters::OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo::DecodableArgType); -typedef void (*CHIPOccupancySensingClusterUltrasonicUnoccupiedToOccupiedDelayAttributeCallbackType)( - void *, chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo::DecodableArgType); -typedef void (*CHIPOccupancySensingClusterUltrasonicUnoccupiedToOccupiedThresholdAttributeCallbackType)( - void *, chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo::DecodableArgType); -typedef void (*CHIPOccupancySensingClusterPhysicalContactOccupiedToUnoccupiedDelayAttributeCallbackType)( - void *, - chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo::DecodableArgType); -typedef void (*CHIPOccupancySensingClusterPhysicalContactUnoccupiedToOccupiedDelayAttributeCallbackType)( - void *, - chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo::DecodableArgType); -typedef void (*CHIPOccupancySensingClusterPhysicalContactUnoccupiedToOccupiedThresholdAttributeCallbackType)( - void *, - chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo::DecodableArgType); -typedef void (*CHIPOccupancySensingClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::OccupancySensing::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPOccupancySensingClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::OccupancySensing::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPOccupancySensingClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::OccupancySensing::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPOccupancySensingClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::OccupancySensing::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPOccupancySensingClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::OccupancySensing::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPOccupancySensingClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::OccupancySensing::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPWakeOnLanClusterMACAddressAttributeCallbackType)( - void *, chip::app::Clusters::WakeOnLan::Attributes::MACAddress::TypeInfo::DecodableArgType); -typedef void (*CHIPWakeOnLanClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::WakeOnLan::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPWakeOnLanClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::WakeOnLan::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPWakeOnLanClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::WakeOnLan::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPWakeOnLanClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::WakeOnLan::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPWakeOnLanClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::WakeOnLan::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPWakeOnLanClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::WakeOnLan::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPChannelClusterChangeChannelResponseCallbackType)( - void *, const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType &); - -typedef void (*CHIPChannelClusterChannelListAttributeCallbackType)( - void *, const chip::app::Clusters::Channel::Attributes::ChannelList::TypeInfo::DecodableType &); -typedef void (*CHIPChannelClusterLineupAttributeCallbackType)( - void *, chip::app::Clusters::Channel::Attributes::Lineup::TypeInfo::DecodableArgType); -typedef void (*CHIPChannelClusterCurrentChannelAttributeCallbackType)( - void *, chip::app::Clusters::Channel::Attributes::CurrentChannel::TypeInfo::DecodableArgType); -typedef void (*CHIPChannelClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Channel::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPChannelClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::Channel::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPChannelClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::Channel::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPChannelClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::Channel::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPChannelClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::Channel::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPChannelClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::Channel::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPTargetNavigatorClusterNavigateTargetResponseCallbackType)( - void *, const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType &); - -typedef void (*CHIPTargetNavigatorClusterTargetListAttributeCallbackType)( - void *, const chip::app::Clusters::TargetNavigator::Attributes::TargetList::TypeInfo::DecodableType &); -typedef void (*CHIPTargetNavigatorClusterCurrentTargetAttributeCallbackType)( - void *, chip::app::Clusters::TargetNavigator::Attributes::CurrentTarget::TypeInfo::DecodableArgType); -typedef void (*CHIPTargetNavigatorClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::TargetNavigator::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPTargetNavigatorClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::TargetNavigator::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPTargetNavigatorClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::TargetNavigator::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPTargetNavigatorClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::TargetNavigator::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPTargetNavigatorClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::TargetNavigator::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPTargetNavigatorClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::TargetNavigator::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPMediaPlaybackClusterPlaybackResponseCallbackType)( - void *, const chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType &); - -typedef void (*CHIPMediaPlaybackClusterCurrentStateAttributeCallbackType)( - void *, chip::app::Clusters::MediaPlayback::Attributes::CurrentState::TypeInfo::DecodableArgType); -typedef void (*CHIPMediaPlaybackClusterStartTimeAttributeCallbackType)( - void *, chip::app::Clusters::MediaPlayback::Attributes::StartTime::TypeInfo::DecodableArgType); -typedef void (*CHIPMediaPlaybackClusterDurationAttributeCallbackType)( - void *, chip::app::Clusters::MediaPlayback::Attributes::Duration::TypeInfo::DecodableArgType); -typedef void (*CHIPMediaPlaybackClusterSampledPositionAttributeCallbackType)( - void *, chip::app::Clusters::MediaPlayback::Attributes::SampledPosition::TypeInfo::DecodableArgType); -typedef void (*CHIPMediaPlaybackClusterPlaybackSpeedAttributeCallbackType)( - void *, chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::TypeInfo::DecodableArgType); -typedef void (*CHIPMediaPlaybackClusterSeekRangeEndAttributeCallbackType)( - void *, chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::TypeInfo::DecodableArgType); -typedef void (*CHIPMediaPlaybackClusterSeekRangeStartAttributeCallbackType)( - void *, chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::TypeInfo::DecodableArgType); -typedef void (*CHIPMediaPlaybackClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::MediaPlayback::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPMediaPlaybackClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::MediaPlayback::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPMediaPlaybackClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::MediaPlayback::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPMediaPlaybackClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::MediaPlayback::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPMediaPlaybackClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::MediaPlayback::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPMediaPlaybackClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::MediaPlayback::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPMediaInputClusterInputListAttributeCallbackType)( - void *, const chip::app::Clusters::MediaInput::Attributes::InputList::TypeInfo::DecodableType &); -typedef void (*CHIPMediaInputClusterCurrentInputAttributeCallbackType)( - void *, chip::app::Clusters::MediaInput::Attributes::CurrentInput::TypeInfo::DecodableArgType); -typedef void (*CHIPMediaInputClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::MediaInput::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPMediaInputClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::MediaInput::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPMediaInputClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::MediaInput::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPMediaInputClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::MediaInput::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPMediaInputClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::MediaInput::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPMediaInputClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::MediaInput::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPLowPowerClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::LowPower::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPLowPowerClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::LowPower::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPLowPowerClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::LowPower::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPLowPowerClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::LowPower::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPLowPowerClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::LowPower::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPLowPowerClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::LowPower::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPKeypadInputClusterSendKeyResponseCallbackType)( - void *, const chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType &); - -typedef void (*CHIPKeypadInputClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::KeypadInput::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPKeypadInputClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::KeypadInput::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPKeypadInputClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::KeypadInput::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPKeypadInputClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::KeypadInput::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPKeypadInputClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::KeypadInput::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPKeypadInputClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::KeypadInput::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPContentLauncherClusterLauncherResponseCallbackType)( - void *, const chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType &); - -typedef void (*CHIPContentLauncherClusterAcceptHeaderAttributeCallbackType)( - void *, const chip::app::Clusters::ContentLauncher::Attributes::AcceptHeader::TypeInfo::DecodableType &); -typedef void (*CHIPContentLauncherClusterSupportedStreamingProtocolsAttributeCallbackType)( - void *, chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo::DecodableArgType); -typedef void (*CHIPContentLauncherClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::ContentLauncher::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPContentLauncherClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::ContentLauncher::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPContentLauncherClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::ContentLauncher::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPContentLauncherClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::ContentLauncher::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPContentLauncherClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::ContentLauncher::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPContentLauncherClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::ContentLauncher::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPAudioOutputClusterOutputListAttributeCallbackType)( - void *, const chip::app::Clusters::AudioOutput::Attributes::OutputList::TypeInfo::DecodableType &); -typedef void (*CHIPAudioOutputClusterCurrentOutputAttributeCallbackType)( - void *, chip::app::Clusters::AudioOutput::Attributes::CurrentOutput::TypeInfo::DecodableArgType); -typedef void (*CHIPAudioOutputClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::AudioOutput::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPAudioOutputClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::AudioOutput::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPAudioOutputClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::AudioOutput::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPAudioOutputClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::AudioOutput::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPAudioOutputClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::AudioOutput::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPAudioOutputClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::AudioOutput::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPApplicationLauncherClusterLauncherResponseCallbackType)( - void *, const chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType &); - -typedef void (*CHIPApplicationLauncherClusterCatalogListAttributeCallbackType)( - void *, const chip::app::Clusters::ApplicationLauncher::Attributes::CatalogList::TypeInfo::DecodableType &); -typedef void (*CHIPApplicationLauncherClusterCurrentAppAttributeCallbackType)( - void *, chip::app::Clusters::ApplicationLauncher::Attributes::CurrentApp::TypeInfo::DecodableArgType); -typedef void (*CHIPApplicationLauncherClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPApplicationLauncherClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPApplicationLauncherClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::ApplicationLauncher::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPApplicationLauncherClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPApplicationLauncherClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::ApplicationLauncher::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPApplicationLauncherClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::ApplicationLauncher::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPApplicationBasicClusterVendorNameAttributeCallbackType)( - void *, chip::app::Clusters::ApplicationBasic::Attributes::VendorName::TypeInfo::DecodableArgType); -typedef void (*CHIPApplicationBasicClusterVendorIDAttributeCallbackType)( - void *, chip::app::Clusters::ApplicationBasic::Attributes::VendorID::TypeInfo::DecodableArgType); -typedef void (*CHIPApplicationBasicClusterApplicationNameAttributeCallbackType)( - void *, chip::app::Clusters::ApplicationBasic::Attributes::ApplicationName::TypeInfo::DecodableArgType); -typedef void (*CHIPApplicationBasicClusterProductIDAttributeCallbackType)( - void *, chip::app::Clusters::ApplicationBasic::Attributes::ProductID::TypeInfo::DecodableArgType); -typedef void (*CHIPApplicationBasicClusterApplicationAttributeCallbackType)( - void *, chip::app::Clusters::ApplicationBasic::Attributes::Application::TypeInfo::DecodableArgType); -typedef void (*CHIPApplicationBasicClusterStatusAttributeCallbackType)( - void *, chip::app::Clusters::ApplicationBasic::Attributes::Status::TypeInfo::DecodableArgType); -typedef void (*CHIPApplicationBasicClusterApplicationVersionAttributeCallbackType)( - void *, chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::TypeInfo::DecodableArgType); -typedef void (*CHIPApplicationBasicClusterAllowedVendorListAttributeCallbackType)( - void *, const chip::app::Clusters::ApplicationBasic::Attributes::AllowedVendorList::TypeInfo::DecodableType &); -typedef void (*CHIPApplicationBasicClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPApplicationBasicClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPApplicationBasicClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::ApplicationBasic::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPApplicationBasicClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPApplicationBasicClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::ApplicationBasic::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPApplicationBasicClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::ApplicationBasic::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPAccountLoginClusterGetSetupPINResponseCallbackType)( - void *, const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType &); - -typedef void (*CHIPAccountLoginClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::AccountLogin::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPAccountLoginClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::AccountLogin::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPAccountLoginClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::AccountLogin::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPAccountLoginClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::AccountLogin::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPAccountLoginClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::AccountLogin::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPAccountLoginClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::AccountLogin::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPElectricalMeasurementClusterMeasurementTypeAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::MeasurementType::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterDcVoltageAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltage::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterDcVoltageMinAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterDcVoltageMaxAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterDcCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterDcCurrentMinAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterDcCurrentMaxAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterDcPowerAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::DcPower::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterDcPowerMinAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterDcPowerMaxAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterDcVoltageMultiplierAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterDcVoltageDivisorAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterDcCurrentMultiplierAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterDcCurrentDivisorAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterDcPowerMultiplierAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterDcPowerDivisorAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAcFrequencyAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequency::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAcFrequencyMinAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAcFrequencyMaxAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterNeutralCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterTotalActivePowerAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterTotalReactivePowerAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterTotalApparentPowerAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterMeasured1stHarmonicCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterMeasured3rdHarmonicCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterMeasured5thHarmonicCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterMeasured7thHarmonicCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterMeasured9thHarmonicCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterMeasured11thHarmonicCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterMeasuredPhase1stHarmonicCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterMeasuredPhase3rdHarmonicCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterMeasuredPhase5thHarmonicCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterMeasuredPhase7thHarmonicCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterMeasuredPhase9thHarmonicCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterMeasuredPhase11thHarmonicCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAcFrequencyMultiplierAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAcFrequencyDivisorAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterPowerMultiplierAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterPowerDivisorAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterHarmonicCurrentMultiplierAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterPhaseHarmonicCurrentMultiplierAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterInstantaneousVoltageAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterInstantaneousLineCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterInstantaneousActiveCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterInstantaneousReactiveCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterInstantaneousPowerAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsVoltageAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsVoltageMinAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsVoltageMaxAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsCurrentAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsCurrentMinAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsCurrentMaxAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterActivePowerAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePower::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterActivePowerMinAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterActivePowerMaxAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterReactivePowerAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePower::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterApparentPowerAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPower::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterPowerFactorAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactor::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAverageRmsVoltageMeasurementPeriodAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAverageRmsUnderVoltageCounterAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsExtremeOverVoltagePeriodAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsExtremeUnderVoltagePeriodAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsVoltageSagPeriodAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsVoltageSwellPeriodAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAcVoltageMultiplierAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAcVoltageDivisorAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAcCurrentMultiplierAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAcCurrentDivisorAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAcPowerMultiplierAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAcPowerDivisorAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterOverloadAlarmsMaskAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterVoltageOverloadAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterCurrentOverloadAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAcOverloadAlarmsMaskAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAcVoltageOverloadAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAcCurrentOverloadAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAcActivePowerOverloadAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAcReactivePowerOverloadAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAverageRmsOverVoltageAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAverageRmsUnderVoltageAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsExtremeOverVoltageAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsExtremeUnderVoltageAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsVoltageSagAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsVoltageSwellAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterLineCurrentPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterActiveCurrentPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterReactiveCurrentPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsVoltagePhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsVoltageMinPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsVoltageMaxPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsCurrentPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsCurrentMinPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsCurrentMaxPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterActivePowerPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterActivePowerMinPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterActivePowerMaxPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterReactivePowerPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterApparentPowerPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterPowerFactorPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAverageRmsVoltageMeasurementPeriodPhaseBAttributeCallbackType)( - void *, - chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAverageRmsOverVoltageCounterPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAverageRmsUnderVoltageCounterPhaseBAttributeCallbackType)( - void *, - chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsExtremeOverVoltagePeriodPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsExtremeUnderVoltagePeriodPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsVoltageSagPeriodPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsVoltageSwellPeriodPhaseBAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterLineCurrentPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterActiveCurrentPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterReactiveCurrentPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsVoltagePhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsVoltageMinPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsVoltageMaxPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsCurrentPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsCurrentMinPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsCurrentMaxPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterActivePowerPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterActivePowerMinPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterActivePowerMaxPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterReactivePowerPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterApparentPowerPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterPowerFactorPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAverageRmsVoltageMeasurementPeriodPhaseCAttributeCallbackType)( - void *, - chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAverageRmsOverVoltageCounterPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterAverageRmsUnderVoltageCounterPhaseCAttributeCallbackType)( - void *, - chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsExtremeOverVoltagePeriodPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsExtremeUnderVoltagePeriodPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsVoltageSagPeriodPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterRmsVoltageSwellPeriodPhaseCAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPElectricalMeasurementClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPElectricalMeasurementClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::ElectricalMeasurement::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPElectricalMeasurementClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::ElectricalMeasurement::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPElectricalMeasurementClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPElectricalMeasurementClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo::DecodableArgType); - -typedef void (*CHIPClientMonitoringClusterIdleModeIntervalAttributeCallbackType)( - void *, chip::app::Clusters::ClientMonitoring::Attributes::IdleModeInterval::TypeInfo::DecodableArgType); -typedef void (*CHIPClientMonitoringClusterActiveModeIntervalAttributeCallbackType)( - void *, chip::app::Clusters::ClientMonitoring::Attributes::ActiveModeInterval::TypeInfo::DecodableArgType); -typedef void (*CHIPClientMonitoringClusterActiveModeThresholdAttributeCallbackType)( - void *, chip::app::Clusters::ClientMonitoring::Attributes::ActiveModeThreshold::TypeInfo::DecodableArgType); -typedef void (*CHIPClientMonitoringClusterExpectedClientsAttributeCallbackType)( - void *, const chip::app::Clusters::ClientMonitoring::Attributes::ExpectedClients::TypeInfo::DecodableType &); -typedef void (*CHIPClientMonitoringClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::ClientMonitoring::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPClientMonitoringClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::ClientMonitoring::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPClientMonitoringClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::ClientMonitoring::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPClientMonitoringClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::ClientMonitoring::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPClientMonitoringClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::ClientMonitoring::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPClientMonitoringClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::ClientMonitoring::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterTestSpecificResponseCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType &); -typedef void (*CHIPUnitTestingClusterTestAddArgumentsResponseCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType &); -typedef void (*CHIPUnitTestingClusterTestListInt8UReverseResponseCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType &); -typedef void (*CHIPUnitTestingClusterTestEnumsResponseCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType &); -typedef void (*CHIPUnitTestingClusterTestNullableOptionalResponseCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType &); -typedef void (*CHIPUnitTestingClusterBooleanResponseCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType &); -typedef void (*CHIPUnitTestingClusterSimpleStructResponseCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType &); -typedef void (*CHIPUnitTestingClusterTestEmitTestEventResponseCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType &); - -typedef void (*CHIPUnitTestingClusterBooleanAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Boolean::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterBitmap8AttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Bitmap8::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterBitmap16AttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Bitmap16::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterBitmap32AttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Bitmap32::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterBitmap64AttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Bitmap64::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterInt8uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Int8u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterInt16uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Int16u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterInt24uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Int24u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterInt32uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Int32u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterInt40uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Int40u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterInt48uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Int48u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterInt56uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Int56u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterInt64uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Int64u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterInt8sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Int8s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterInt16sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Int16s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterInt24sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Int24s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterInt32sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Int32s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterInt40sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Int40s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterInt48sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Int48s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterInt56sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Int56s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterInt64sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Int64s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterEnum8AttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Enum8::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterEnum16AttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Enum16::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterFloatSingleAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::FloatSingle::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterFloatDoubleAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::FloatDouble::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterOctetStringAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::OctetString::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterListInt8uAttributeCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Attributes::ListInt8u::TypeInfo::DecodableType &); -typedef void (*CHIPUnitTestingClusterListOctetStringAttributeCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Attributes::ListOctetString::TypeInfo::DecodableType &); -typedef void (*CHIPUnitTestingClusterListStructOctetStringAttributeCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Attributes::ListStructOctetString::TypeInfo::DecodableType &); -typedef void (*CHIPUnitTestingClusterLongOctetStringAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::LongOctetString::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterCharStringAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::CharString::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterLongCharStringAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::LongCharString::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterEpochUsAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::EpochUs::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterEpochSAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::EpochS::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterVendorIdAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::VendorId::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterListNullablesAndOptionalsStructAttributeCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo::DecodableType &); -typedef void (*CHIPUnitTestingClusterEnumAttrAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::EnumAttr::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterStructAttrAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::StructAttr::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterRangeRestrictedInt8uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterRangeRestrictedInt8sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterRangeRestrictedInt16uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterRangeRestrictedInt16sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterListLongOctetStringAttributeCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Attributes::ListLongOctetString::TypeInfo::DecodableType &); -typedef void (*CHIPUnitTestingClusterListFabricScopedAttributeCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Attributes::ListFabricScoped::TypeInfo::DecodableType &); -typedef void (*CHIPUnitTestingClusterTimedWriteBooleanAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::TimedWriteBoolean::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterGeneralErrorBooleanAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterClusterErrorBooleanAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterUnsupportedAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::Unsupported::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableBooleanAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableBoolean::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableBitmap8AttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableBitmap8::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableBitmap16AttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableBitmap16::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableBitmap32AttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableBitmap32::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableBitmap64AttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableBitmap64::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableInt8uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt8u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableInt16uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt16u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableInt24uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt24u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableInt32uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt32u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableInt40uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt40u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableInt48uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt48u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableInt56uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt56u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableInt64uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt64u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableInt8sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt8s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableInt16sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt16s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableInt24sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt24s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableInt32sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt32s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableInt40sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt40s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableInt48sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt48s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableInt56sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt56s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableInt64sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableInt64s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableEnum8AttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableEnum8::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableEnum16AttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableEnum16::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableFloatSingleAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableFloatSingle::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableFloatDoubleAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableFloatDouble::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableOctetStringAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableOctetString::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableCharStringAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableCharString::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableEnumAttrAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableEnumAttr::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableStructAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableStruct::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableRangeRestrictedInt8uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableRangeRestrictedInt8sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableRangeRestrictedInt16uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterNullableRangeRestrictedInt16sAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterWriteOnlyInt8uAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::WriteOnlyInt8u::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterGeneratedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPUnitTestingClusterAcceptedCommandListAttributeCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Attributes::AcceptedCommandList::TypeInfo::DecodableType &); -typedef void (*CHIPUnitTestingClusterEventListAttributeCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Attributes::EventList::TypeInfo::DecodableType &); -typedef void (*CHIPUnitTestingClusterAttributeListAttributeCallbackType)( - void *, const chip::app::Clusters::UnitTesting::Attributes::AttributeList::TypeInfo::DecodableType &); -typedef void (*CHIPUnitTestingClusterFeatureMapAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::FeatureMap::TypeInfo::DecodableArgType); -typedef void (*CHIPUnitTestingClusterClusterRevisionAttributeCallbackType)( - void *, chip::app::Clusters::UnitTesting::Attributes::ClusterRevision::TypeInfo::DecodableArgType); diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index 620daa671207c7..9abeb686fd8a21 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -16,9 +16,9 @@ */ // THIS FILE IS GENERATED BY ZAP -#include "CHIPCallbackTypes.h" #include "CHIPInvokeCallbacks.h" #include "CHIPReadCallbacks.h" +#include #include #include diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index a5a30ce1c62a99..88afa7fa20233d 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -17,7 +17,7 @@ // THIS FILE IS GENERATED BY ZAP #include "CHIPInvokeCallbacks.h" -#include "CHIPCallbackTypes.h" +#include #include #include diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h index c2afb210443d7b..fb3446a16f3935 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h @@ -16,7 +16,7 @@ */ // THIS FILE IS GENERATED BY ZAP -#include "CHIPCallbackTypes.h" +#include #include #include diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index ff0eee8cb48e6c..c40a87808e2847 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -16,7 +16,7 @@ */ // THIS FILE IS GENERATED BY ZAP -#include "CHIPCallbackTypes.h" +#include #include #include From a6a8f83f274b691478defefe052bb255930f9f70 Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Tue, 28 Mar 2023 08:43:26 -0400 Subject: [PATCH 009/158] [Silabs] SLC Lighting-app integration (#25717) * Silabs Lighting-app SLC integration * fix ci * fix non-generated build * Apply comments * Fix CI * fix CI --- .github/workflows/examples-efr32.yaml | 6 +- examples/lighting-app/silabs/efr32/BUILD.gn | 14 +++ .../platform/silabs/gatt_configuration.btconf | 99 +++++++++++++++++++ examples/platform/silabs/matter-platform.slcp | 90 +++++++++++++++++ scripts/examples/gn_efr32_example.sh | 46 +++++++-- third_party/silabs/efr32_sdk.gni | 54 +++++++--- .../silabs/slc_gen/buildgn_template.txt | 27 +++++ third_party/silabs/slc_gen/run_slc.py | 78 +++++++++++++++ 8 files changed, 393 insertions(+), 21 deletions(-) create mode 100644 examples/platform/silabs/gatt_configuration.btconf create mode 100644 examples/platform/silabs/matter-platform.slcp create mode 100644 third_party/silabs/slc_gen/buildgn_template.txt create mode 100644 third_party/silabs/slc_gen/run_slc.py diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 084226e14510a0..a80505fcfd8ab3 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -82,7 +82,11 @@ jobs: path: | .environment/gn_out/.ninja_log .environment/pigweed-venv/*.log - + - name: Test SLC gen + timeout-minutes: 30 + run: | + scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/efr32 ./out/light-app BRD4187C --slc_generate --docker + rm -rf ./out/ - name: Build some BRD4187C variants timeout-minutes: 90 run: | diff --git a/examples/lighting-app/silabs/efr32/BUILD.gn b/examples/lighting-app/silabs/efr32/BUILD.gn index c47228b35dc589..5656bbf53db9ab 100644 --- a/examples/lighting-app/silabs/efr32/BUILD.gn +++ b/examples/lighting-app/silabs/efr32/BUILD.gn @@ -46,6 +46,20 @@ declare_args() { chip_print_memory_usage = false } +if (slc_generate) { + # Generate Project Specific config (Board, hardware used etc..) + print(exec_script("${chip_root}/third_party/silabs/slc_gen/run_slc.py", + [ + rebase_path(chip_root), + "${silabs_board}", + "${disable_lcd}", + "${use_wstk_buttons}", + "${use_wstk_leds}", + "${use_external_flash}", + ], + "list lines")) +} + efr32_sdk("sdk") { sources = [ "${efr32_project_dir}/include/CHIPProjectConfig.h", diff --git a/examples/platform/silabs/gatt_configuration.btconf b/examples/platform/silabs/gatt_configuration.btconf new file mode 100644 index 00000000000000..4d1efd972514d5 --- /dev/null +++ b/examples/platform/silabs/gatt_configuration.btconf @@ -0,0 +1,99 @@ + + + + + + + Abstract: The generic_access service contains generic information about the device. All available Characteristics are readonly. + + + + + Empty Example + + + + + + + + + Abstract: The external appearance of this device. The values are composed of a category (10-bits) and sub-categories (6-bits). + 0000 + + + + + + + + + Abstract: The Device Information Service exposes manufacturer and/or vendor information about a device. Summary: This service exposes manufacturer information about a device. The Device Information Service is instantiated as a Primary Service. Only one instance of the Device Information Service is exposed on a device. + + + + Abstract: The value of this characteristic is a UTF-8 string representing the name of the manufacturer of the device. + Silicon Labs + + + + + + + + Abstract: The value of this characteristic is a UTF-8 string representing the model number assigned by the device vendor. + Blue Gecko + + + + + + + + Abstract: The SYSTEM ID characteristic consists of a structure with two fields. The first field are the LSOs and the second field contains the MSOs. This is a 64-bit structure which consists of a 40-bit manufacturer-defined identifier concatenated with a 24 bit unique Organizationally Unique Identifier (OUI). The OUI is issued by the IEEE Registration Authority (http://standards.ieee.org/regauth/index.html) and is required to be used in accordance with IEEE Standard 802-2001.6 while the least significant 40 bits are manufacturer defined. If System ID generated based on a Bluetooth Device Address, it is required to be done as follows. System ID and the Bluetooth Device Address have a very similar structure: a Bluetooth Device Address is 48 bits in length and consists of a 24 bit Company Assigned Identifier (manufacturer defined identifier) concatenated with a 24 bit Company Identifier (OUI). In order to encapsulate a Bluetooth Device Address as System ID, the Company Identifier is concatenated with 0xFFFE followed by the Company Assigned Identifier of the Bluetooth Address. For more guidelines related to EUI-64, refer to http://standards.ieee.org/develop/regauth/tut/eui64.pdf. Examples: If the system ID is based of a Bluetooth Device Address with a Company Identifier (OUI) is 0x123456 and the Company Assigned Identifier is 0x9ABCDE, then the System Identifier is required to be 0x123456FFFE9ABCDE. + 000102030405 + + + + + + + + + Custom service + + + + Custom characteristic + 00 + + + + + + + + + Custom characteristic + 00 + + + + + + + + + + Custom characteristic + 00 + + + + + + + + + + diff --git a/examples/platform/silabs/matter-platform.slcp b/examples/platform/silabs/matter-platform.slcp new file mode 100644 index 00000000000000..0eee476075016c --- /dev/null +++ b/examples/platform/silabs/matter-platform.slcp @@ -0,0 +1,90 @@ +# Silicon Labs Project Configuration Tools: slcp, v0, Component selection file. +project_name: matter-platform +label: matter-platform +description: | + This project contains the minimal requirements to generate the dependencies needed by all Matter examples +category: Matter Examples +filter: +- name: Capability + value: [Multiprotocol] +- name: Device Type + value: [SoC] +- name: Project Difficulty + value: [Advanced] +- name: Wireless Technology + value: [Bluetooth, Thread] +package: OpenThread +quality: production +readme: +- {path: README.md} +source: +- {path: main.c} +- {path: app.c} +- {path: bluetooth_event_callback.c} +tag: [prebuilt_demo] +include: +- path: '' + file_list: + - {path: app.h} + - {path: reset_util.h} +sdk: {id: gecko_sdk, version: 4.2.0} +toolchain_settings: [] + +component: +- {id: bluetooth_feature_nvm} +- {id: bluetooth_feature_gatt_server} +- {id: nvm3_lib} +- {id: bluetooth_feature_sm} +- {id: bluetooth_feature_gap} +- {id: bluetooth_feature_legacy_advertiser} +- {id: gatt_configuration} +- {id: freertos} +- {id: bluetooth_stack} +- {id: brd4002a} +- {id: rail_util_pti} +- {id: bluetooth_feature_gatt} +- {id: bluetooth_feature_connection} +- {id: psa_crypto} +- {id: rail_lib_multiprotocol} +- {id: bluetooth_feature_system} +- {id: bluetooth_feature_scanner} +- instance: [vcom] + id: uartdrv_usart +- instance: [vcom] + id: uartdrv_eusart + + +config_file: + - override: + component: gatt_configuration + file_id: gatt_configuration_file_id + path: gatt_configuration.btconf + directory: btconf + +configuration: +- {name: SL_BOARD_ENABLE_VCOM, value: '1'} +- {name: SL_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED, value: '1'} +- {name: SL_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED, value: '1'} +- condition: [uartdrv_usart] + name: UARTDRV_RESTRICT_ENERGY_MODE_TO_ALLOW_RECEPTION + value: '0' +- condition: [iostream_usart] + name: SL_IOSTREAM_USART_VCOM_RESTRICT_ENERGY_MODE_TO_ALLOW_RECEPTION + value: '0' +- condition: [iostream_usart] + name: SL_IOSTREAM_USART_VCOM_RX_BUFFER_SIZE + value: '128' +- {name: SL_HEAP_SIZE, value: '16384'} +- {name: SL_STACK_SIZE, value: '4608'} + +requires: +- condition: [device_series_1] + name: uartdrv_usart +- condition: [device_series_2] + name: uartdrv_eusart +- condition: [device_series_2] + name: device_init_dpll + +ui_hints: + highlight: + - {path: ./README.md, focus: true} diff --git a/scripts/examples/gn_efr32_example.sh b/scripts/examples/gn_efr32_example.sh index f02b39b3a405ca..2bf76edb93a3ea 100755 --- a/scripts/examples/gn_efr32_example.sh +++ b/scripts/examples/gn_efr32_example.sh @@ -28,13 +28,14 @@ else CHIP_ROOT="$MATTER_ROOT" fi -source "$CHIP_ROOT/scripts/activate.sh" - set -x env USE_WIFI=false USE_DOCKER=false USE_GIT_SHA_FOR_VERSION=true +USE_SLC=false +GN_PATH=gn +GN_PATH_PROVIDED=false SILABS_THREAD_TARGET=\""../silabs:ot-efr32-cert"\" USAGE="./scripts/examples/gn_efr32_example.sh []" @@ -125,6 +126,10 @@ if [ "$#" == "0" ]; then Change GSDK root for docker builds --uart_log Forward Logs to Uart instead of RTT + --slc_generate + Generate files with SLC for current board and options Requires an SLC-CLI installation or running in Docker. + --slc_reuse_files + Use generated files without running slc again. " elif [ "$#" -lt "2" ]; then @@ -214,12 +219,32 @@ else shift ;; + --slc_generate) + optArgs+="slc_generate=true " + USE_SLC=true + shift + ;; + --slc_reuse_files) + optArgs+="slc_reuse_files=true " + USE_SLC=true + shift + ;; + --gn_path) + if [ -z "$2" ]; then + echo "--gn_path requires a path to GN" + exit 1 + else + GN_PATH="$2" + fi + GN_PATH_PROVIDED=true + shift + shift + ;; *"sl_matter_version_str="*) optArgs+="$1 " USE_GIT_SHA_FOR_VERSION=false shift ;; - *) if [ "$1" =~ *"use_rs9116=true"* ] || [ "$1" =~ *"use_SiWx917=true"* ] || [ "$1" =~ *"use_wf200=true"* ]; then USE_WIFI=true @@ -243,6 +268,10 @@ else } &>/dev/null fi + if [ "$USE_SLC" == true ] && [ "$GN_PATH_PROVIDED" == false ]; then + GN_PATH=./.environment/cipd/packages/pigweed/gn + fi + BUILD_DIR=$OUTDIR/$SILABS_BOARD echo BUILD_DIR="$BUILD_DIR" @@ -254,7 +283,7 @@ else # wifi build # NCP mode EFR32 + wifi module optArgs+="$ipArgs" - gn gen --check --fail-on-unused-args --export-compile-commands --root="$ROOT" --dotfile="$ROOT"/build_for_wifi_gnfile.gn --args="silabs_board=\"$SILABS_BOARD\" $optArgs" "$BUILD_DIR" + "$GN_PATH" gen --check --fail-on-unused-args --export-compile-commands --root="$ROOT" --dotfile="$ROOT"/build_for_wifi_gnfile.gn --args="silabs_board=\"$SILABS_BOARD\" $optArgs" "$BUILD_DIR" else # OpenThread/SoC build # @@ -263,11 +292,16 @@ else fi if [ -z "$optArgs" ]; then - gn gen --check --fail-on-unused-args --export-compile-commands --root="$ROOT" --args="silabs_board=\"$SILABS_BOARD\"" "$BUILD_DIR" + "$GN_PATH" gen --check --script-executable="/usr/bin/python3" --root="$ROOT" --args="silabs_board=\"$SILABS_BOARD\"" "$BUILD_DIR" else - gn gen --check --fail-on-unused-args --export-compile-commands --root="$ROOT" --args="silabs_board=\"$SILABS_BOARD\" $optArgs" "$BUILD_DIR" + "$GN_PATH" gen --check --script-executable="/usr/bin/python3" --root="$ROOT" --args="silabs_board=\"$SILABS_BOARD\" $optArgs" "$BUILD_DIR" fi fi + + # Activation needs to be after SLC generation which is done in gn gen. + # Zap generation requires activation and is done in the build phase + source "$CHIP_ROOT/scripts/activate.sh" + ninja -v -C "$BUILD_DIR"/ #print stats arm-none-eabi-size -A "$BUILD_DIR"/*.out diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index 5ba8df783142da..8803d087df4558 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -55,6 +55,13 @@ declare_args() { # Argument to enable IPv4 for wifi # aligning to match chip_inet_config_enable_ipv4 default configuration chip_enable_wifi_ipv4 = false + silabs_gen_folder = "" + + # Calls SLC-CLI at run time + slc_generate = false + + # Use SLC generated files + slc_reuse_files = false } assert(efr32_sdk_root != "", "efr32_sdk_root must be specified") @@ -66,6 +73,14 @@ declare_args() { sl_openthread_root = "${efr32_sdk_root}/util/third_party/openthread" } +if (slc_generate || slc_reuse_files) { + silabs_gen_folder = "${chip_root}/third_party/silabs/slc_gen/${silabs_board}/" +} else { + print("Using pre-generate files") + silabs_gen_folder = + "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/" +} + # Defines an efr32 SDK build target. # # Parameters: @@ -156,10 +171,16 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/", "${efr32_sdk_root}/util/third_party/freertos/cmsis/Include", "${efr32_sdk_root}/util/third_party/freertos/kernel/include", - "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/config", - "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen", + "${efr32_sdk_root}/platform/driver/debug/inc", + "${silabs_gen_folder}/config", + "${silabs_gen_folder}/autogen", ] + if (slc_generate || slc_reuse_files) { + _include_dirs += + [ "${efr32_sdk_root}/hardware/driver/configuration_over_swo/inc/" ] + } + if (silabs_family != "mgm24") { _include_dirs += [ "${efr32_sdk_root}/platform/radio/rail_lib/hal", @@ -296,7 +317,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/radio/rail_lib/plugin/fem_util/", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rssi/", "${efr32_sdk_root}/platform/driver/debug/inc/", - "${efr32_sdk_root}/hardware/driver/configuration_over_swo/inc/", ] } @@ -672,11 +692,11 @@ template("efr32_sdk") { "${efr32_sdk_root}/util/third_party/mbedtls/library/x509_csr.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/x509write_crt.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/x509write_csr.c", - "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/gatt_db.c", - "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_bluetooth.c", - "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_board_default_init.c", - "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_device_init_clocks.c", - "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_event_handler.c", + "${silabs_gen_folder}/autogen/gatt_db.c", + "${silabs_gen_folder}/autogen/sl_bluetooth.c", + "${silabs_gen_folder}/autogen/sl_board_default_init.c", + "${silabs_gen_folder}/autogen/sl_device_init_clocks.c", + "${silabs_gen_folder}/autogen/sl_event_handler.c", ] if (enable_dic) { sources += [ @@ -684,6 +704,14 @@ template("efr32_sdk") { "${efr32_sdk_root}/util/third_party/mbedtls/library/rsa_alt_helpers.c", ] } + + if (slc_generate || slc_reuse_files) { + sources += [ + "${efr32_sdk_root}/hardware/driver/configuration_over_swo/src/sl_cos.c", + "${efr32_sdk_root}/platform/driver/debug/src/sl_debug_swo.c", + ] + } + if (silabs_family != "mgm24") { sources += [ "${efr32_sdk_root}/platform/radio/rail_lib/hal/efr32/hal_efr.c" ] @@ -693,7 +721,7 @@ template("efr32_sdk") { sources += [ "${efr32_sdk_root}/platform/driver/button/src/sl_button.c", "${efr32_sdk_root}/platform/driver/button/src/sl_simple_button.c", - "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_simple_button_instances.c", + "${silabs_gen_folder}/autogen/sl_simple_button_instances.c", ] } @@ -728,7 +756,7 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/driver/leddrv/src/sl_pwm_led.c", "${efr32_sdk_root}/platform/driver/leddrv/src/sl_simple_led.c", "${efr32_sdk_root}/platform/driver/leddrv/src/sl_simple_rgb_pwm_led.c", - "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_simple_led_instances.c", + "${silabs_gen_folder}/autogen/sl_simple_led_instances.c", ] } @@ -736,7 +764,7 @@ template("efr32_sdk") { if (defined(invoker.chip_enable_wifi) && invoker.chip_enable_wifi) { sources += [ "${efr32_sdk_root}/platform/emdrv/spidrv/src/spidrv.c", - "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_spidrv_init.c", + "${silabs_gen_folder}/autogen/sl_spidrv_init.c", ] } @@ -761,7 +789,7 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/emlib/src/em_eusart.c", "${efr32_sdk_root}/platform/emlib/src/em_leuart.c", "${efr32_sdk_root}/platform/emlib/src/em_usart.c", - "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_uartdrv_init.c", + "${silabs_gen_folder}/autogen/sl_uartdrv_init.c", ] if (use_external_flash) { @@ -933,8 +961,6 @@ template("efr32_sdk") { if (silabs_board == "BRD2704A" || silabs_board == "BRD4318A") { sources += [ - "${efr32_sdk_root}/hardware/driver/configuration_over_swo/src/sl_cos.c", - "${efr32_sdk_root}/platform/driver/debug/src/sl_debug_swo.c", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/fem_util/sl_fem_util.c", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rssi/sl_rail_util_rssi.c", ] diff --git a/third_party/silabs/slc_gen/buildgn_template.txt b/third_party/silabs/slc_gen/buildgn_template.txt new file mode 100644 index 00000000000000..b68e497f6522fe --- /dev/null +++ b/third_party/silabs/slc_gen/buildgn_template.txt @@ -0,0 +1,27 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") + +source_set("board_setup") { + include_dirs = [ + "autogen/", + "config/" + ] + + sources = [ + //REPLACE_ME + ] + +} diff --git a/third_party/silabs/slc_gen/run_slc.py b/third_party/silabs/slc_gen/run_slc.py new file mode 100644 index 00000000000000..5083948e3e7eb1 --- /dev/null +++ b/third_party/silabs/slc_gen/run_slc.py @@ -0,0 +1,78 @@ +# Importing required module +import glob +import os +import subprocess +import sys + +if len(sys.argv) != 7: + print("wrong number of arguments") + sys.exit(1) + + +def asBoolean(valueToTest): + return ("true" == valueToTest) + + +root_path = sys.argv[1] +silabs_board = str(sys.argv[2]).lower() +disable_lcd = asBoolean(sys.argv[3]) +use_wstk_buttons = asBoolean(sys.argv[4]) +use_wstk_leds = asBoolean(sys.argv[5]) +use_external_flash = asBoolean(sys.argv[6]) + +slcp_file_path = os.path.join(root_path, "examples/platform/silabs/matter-platform.slcp") +template_path = os.path.join(root_path, "third_party/silabs/slc_gen/") +output_path = template_path + sys.argv[2] + '/' + +slc_arguments = "" + +# Translate GN arguments in SLC arguments +if not disable_lcd: + slc_arguments += "memlcd_usart,dmd_memlcd," +if use_wstk_buttons: + slc_arguments += "simple_button:btn0:btn1," +if use_wstk_leds: + # Sparkfun board + if silabs_board == "brd2704a": + slc_arguments += "simple_led:led0," + else: + slc_arguments += "simple_led:led0:led1," +if use_external_flash: + slc_arguments += "mx25_flash_shutdown_usart," + +slc_arguments += silabs_board + +print(slc_arguments) + +subprocess.run(["slc", "generate", slcp_file_path, "-d", output_path, "--with", slc_arguments], check=True) + +# cleanup of unwanted files +fileList = glob.glob(os.path.join(output_path, "matter-platform.*")) +for filePath in fileList: + try: + os.remove(filePath) + except OSError: + print("failed to remove file: {}".format(filePath)) + +try: + os.remove(os.path.join(output_path, "vscode.conf")) +except OSError: + print("failed to remove file: {}".format(filePath)) + + +# Create a Build.gn files with all of the sources +source_file_path = " \"autogen/{fileName}\",\r\n" + +template = open(os.path.join(template_path, "buildgn_template.txt"), "r") +final = open(os.path.join(output_path, "BUILD.gn"), "w") +for line in template: + if "//REPLACE_ME" in line: + for file in os.listdir(os.path.join(output_path, 'autogen/')): + if file.endswith(".c"): + # print path name of selected files + final.write(source_file_path.format(fileName=file)) + else: + final.write(line) + +template.close() +final.close() From 2bcac10787cc88400474d2fab9a9b249295e09ea Mon Sep 17 00:00:00 2001 From: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com> Date: Tue, 28 Mar 2023 08:50:59 -0400 Subject: [PATCH 010/158] Rework rs9116 spi communication to use spidrv and clean up semaphore logic (#25834) --- .../silabs/efr32/rs911x/hal/efx_spi.c | 239 +++++------------- 1 file changed, 69 insertions(+), 170 deletions(-) diff --git a/examples/platform/silabs/efr32/rs911x/hal/efx_spi.c b/examples/platform/silabs/efr32/rs911x/hal/efx_spi.c index 193604a72e1929..7dfe39963733ce 100644 --- a/examples/platform/silabs/efr32/rs911x/hal/efx_spi.c +++ b/examples/platform/silabs/efr32/rs911x/hal/efx_spi.c @@ -57,22 +57,21 @@ #endif StaticSemaphore_t xEfxSpiIntfSemaBuffer; -static SemaphoreHandle_t spi_sem; +static SemaphoreHandle_t spiTransferLock; +static TaskHandle_t spiInitiatorTaskHandle = NULL; #if defined(EFR32MG12) #include "sl_spidrv_exp_config.h" extern SPIDRV_Handle_t sl_spidrv_exp_handle; -#endif - -#if defined(EFR32MG24) +#define SPI_HANDLE sl_spidrv_exp_handle +#elif defined(EFR32MG24) #include "sl_spidrv_eusart_exp_config.h" extern SPIDRV_Handle_t sl_spidrv_eusart_exp_handle; +#define SPI_HANDLE sl_spidrv_eusart_exp_handle +#else +#error "Unknown platform" #endif -static unsigned int tx_dma_channel; -static unsigned int rx_dma_channel; - -static uint32_t dummy_data; /* Used for DMA - when results don't matter */ extern void rsi_gpio_irq_cb(uint8_t irqnum); //#define RS911X_USE_LDMA @@ -137,20 +136,8 @@ void sl_wfx_host_reset_chip(void) ****************************************************************/ void rsi_hal_board_init(void) { - spi_sem = xSemaphoreCreateBinaryStatic(&xEfxSpiIntfSemaBuffer); - xSemaphoreGive(spi_sem); - - /* Assign DMA channel from Handle*/ -#if defined(EFR32MG12) - /* MG12 + rs9116 combination uses USART driver */ - tx_dma_channel = sl_spidrv_exp_handle->txDMACh; - rx_dma_channel = sl_spidrv_exp_handle->rxDMACh; - -#elif defined(EFR32MG24) - /* MG24 + rs9116 combination uses EUSART driver */ - tx_dma_channel = sl_spidrv_eusart_exp_handle->txDMACh; - rx_dma_channel = sl_spidrv_eusart_exp_handle->rxDMACh; -#endif + spiTransferLock = xSemaphoreCreateBinaryStatic(&xEfxSpiIntfSemaBuffer); + xSemaphoreGive(spiTransferLock); /* GPIO INIT of MG12 & MG24 : Reset, Wakeup, Interrupt */ WFX_RSI_LOG("RSI_HAL: init GPIO"); @@ -163,115 +150,24 @@ void rsi_hal_board_init(void) } /***************************************************************************** - *@fn static bool dma_complete_cb(unsigned int channel, unsigned int sequenceNo, void *userParam) - * *@brief - * DMA transfer completion callback. Called by the DMA interrupt handler. - * This is being set in the tx/rx of the DMA - * - * @param[in] channel: - * @param[in] sequenceNO: sequence number - * @param[in] userParam :user parameter + * Spi dma transfer is complete Callback + * Notify the task that initiated the SPI transfer that it is completed. + * The callback needs is a SPIDRV_Callback_t function pointer type + * @param[in] pxHandle: spidrv instance handle + * @param[in] transferStatus: Error code linked to the completed spi transfer. As master, the return code is irrelevant + * @param[in] lCount: number of bytes transferred. * * @return * None ******************************************************************************/ -static bool dma_complete_cb(unsigned int channel, unsigned int sequenceNo, void * userParam) +static void spi_dmaTransfertComplete(SPIDRV_HandleData_t * pxHandle, Ecode_t transferStatus, int itemsTransferred) { + configASSERT(spiInitiatorTaskHandle != NULL); BaseType_t xHigherPriorityTaskWoken = pdFALSE; - // uint8_t *buf = (void *)userParam; - - (void) channel; - (void) sequenceNo; - (void) userParam; - - // WFX_RSI_LOG ("SPI: DMA done [%x,%x,%x,%x]", buf [0], buf [1], buf [2], buf [3]); - xSemaphoreGiveFromISR(spi_sem, &xHigherPriorityTaskWoken); + vTaskNotifyGiveFromISR(spiInitiatorTaskHandle, &xHigherPriorityTaskWoken); + spiInitiatorTaskHandle = NULL; portYIELD_FROM_ISR(xHigherPriorityTaskWoken); - -#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) - sl_power_manager_remove_em_requirement(SL_POWER_MANAGER_EM1); -#endif - - return true; -} - -/************************************************************* - * @fn static void receiveDMA(uint8_t *rx_buf, uint16_t xlen) - * @brief - * RX buf was specified - * TX buf was not specified by caller - so we - * transmit dummy data (typically 0) - * @param[in] rx_buf: - * @param[in] xlen: - * @return - * None - *******************************************************************/ -static void receiveDMA(uint8_t * rx_buf, uint16_t xlen) -{ - /* - * The caller wants to receive data - - * The xmit can be dummy data (no src increment for tx) - */ - dummy_data = 0; -#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) - sl_power_manager_add_em_requirement(SL_POWER_MANAGER_EM1); -#endif - - // Start receive DMA - DMADRV_PeripheralMemory(rx_dma_channel, MY_USART_RX_SIGNAL, (void *) rx_buf, (void *) &(MY_USART->RXDATA), true, xlen, - dmadrvDataSize1, dma_complete_cb, NULL); - - // Start transmit DMA. - DMADRV_MemoryPeripheral(tx_dma_channel, MY_USART_TX_SIGNAL, (void *) &(MY_USART->TXDATA), (void *) &(dummy_data), false, xlen, - dmadrvDataSize1, NULL, NULL); -} - -/***************************************************************************** - *@fn static void transmitDMA(void *rx_buf, void *tx_buf, uint8_t xlen) - *@brief - * we have a tx_buf. There are some instances where - * a rx_buf is not specifed. If one is specified then - * the caller wants results (auto increment src) - * @param[in] rx_buf: - * @param[in] tx_buf: - * @param[in] xlen: - * @return - * None - ******************************************************************************/ -static void transmitDMA(uint8_t * rx_buf, uint8_t * tx_buf, uint16_t xlen) -{ - void * buf; - bool srcinc; - /* - * we have a tx_buf. There are some instances where - * a rx_buf is not specifed. If one is specified then - * the caller wants results (auto increment src) - * TODO - the caller specified 8/32 bit - we should use this - * instead of dmadrvDataSize1 always - */ - if (rx_buf == NULL) - { - buf = &dummy_data; - srcinc = false; - } - else - { - buf = rx_buf; - srcinc = true; - /* DEBUG */ rx_buf[0] = 0xAA; - rx_buf[1] = 0x55; - } -#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) - sl_power_manager_add_em_requirement(SL_POWER_MANAGER_EM1); -#endif - - // Start receive DMA - DMADRV_PeripheralMemory(rx_dma_channel, MY_USART_RX_SIGNAL, buf, (void *) &(MY_USART->RXDATA), srcinc, xlen, dmadrvDataSize1, - dma_complete_cb, buf); - // Start transmit DMA. - DMADRV_MemoryPeripheral(tx_dma_channel, MY_USART_TX_SIGNAL, (void *) &(MY_USART->TXDATA), (void *) tx_buf, true, xlen, - dmadrvDataSize1, NULL, NULL); } /********************************************************************* @@ -287,57 +183,60 @@ static void transmitDMA(uint8_t * rx_buf, uint8_t * tx_buf, uint16_t xlen) **************************************************************************/ int16_t rsi_spi_transfer(uint8_t * tx_buf, uint8_t * rx_buf, uint16_t xlen, uint8_t mode) { - // WFX_RSI_LOG ("SPI: Xfer: tx=%x,rx=%x,len=%d",(uint32_t)tx_buf, (uint32_t)rx_buf, xlen); - if (xlen > MIN_XLEN) + if (xlen <= MIN_XLEN || (tx_buf == NULL && rx_buf == NULL)) // at least one buffer needs to be provided { - MY_USART->CMD = USART_CMD_CLEARRX | USART_CMD_CLEARTX; - if (xSemaphoreTake(spi_sem, portMAX_DELAY) != pdTRUE) - { - return RSI_FALSE; - } - if (tx_buf == NULL) - { - receiveDMA(rx_buf, xlen); - } - else - { - transmitDMA(rx_buf, tx_buf, xlen); - } + return RSI_ERROR_INVALID_PARAM; + } - /* - * receiveDMA() and transmitDMA() are asynchronous - * Our application design assumes that this function is synchronous - * To make it synchronous, we wait to re-acquire the semaphore before exiting this function - * dma_complete_cb() gives back the semaphore when the SPI transfer is done - */ - if (xSemaphoreTake(spi_sem, pdMS_TO_TICKS(RSI_SEM_BLOCK_MIN_TIMER_VALUE_MS)) == pdTRUE) - { - // Transfer complete - // Give back the semaphore before exiting, so that it may be re-acquired - // in this function, just before the next transfer - xSemaphoreGive(spi_sem); - } - // Temporary patch - // Sometimes the xSemaphoreTake() above is getting stuck indefinitely - // As a workaround, if the transfer is not done within RSI_SEM_BLOCK_MIN_TIMER_VALUE_MS - // stop and start it again - // No need to re-acquire the semaphore since this is the function that acquired it - // TODO: Remove this after a permanent solution is found to the problem of the transfer getting stuck - else + (void) mode; // currently not used; + rsi_error_t rsiError = RSI_ERROR_NONE; + + if (xSemaphoreTake(spiTransferLock, portMAX_DELAY) != pdTRUE) + { + return RSI_ERROR_SPI_BUSY; + } + + configASSERT(spiInitiatorTaskHandle == NULL); // No other task should currently be waiting for the dma completion + spiInitiatorTaskHandle = xTaskGetCurrentTaskHandle(); + + Ecode_t spiError; + if (tx_buf == NULL) // Rx operation only + { + spiError = SPIDRV_MReceive(SPI_HANDLE, rx_buf, xlen, spi_dmaTransfertComplete); + } + else if (rx_buf == NULL) // Tx operation only + { + spiError = SPIDRV_MTransmit(SPI_HANDLE, tx_buf, xlen, spi_dmaTransfertComplete); + } + else // Tx and Rx operation + { + spiError = SPIDRV_MTransfer(SPI_HANDLE, tx_buf, rx_buf, xlen, spi_dmaTransfertComplete); + } + + if (spiError == ECODE_EMDRV_SPIDRV_OK) + { + // rsi implementation expect a synchronous operation + // wait for the notification that the dma completed in a block state. + // it does not consume any CPU time. + if (ulTaskNotifyTake(pdTRUE, RSI_SEM_BLOCK_MIN_TIMER_VALUE_MS) != pdPASS) { - uint32_t ldma_flags = 0; - uint32_t rem_len = 0; - rem_len = LDMA_TransferRemainingCount(RSI_LDMA_TRANSFER_CHANNEL_NUM); - LDMA_StopTransfer(RSI_LDMA_TRANSFER_CHANNEL_NUM); - ldma_flags = LDMA_IntGet(); - LDMA_IntClear(ldma_flags); - receiveDMA(rx_buf, rem_len); - if (xSemaphoreTake(spi_sem, portMAX_DELAY) == pdTRUE) - { - xSemaphoreGive(spi_sem); - } + int itemsTransferred = 0; + int itemsRemaining = 0; + SPIDRV_GetTransferStatus(SPI_HANDLE, &itemsTransferred, &itemsRemaining); + WFX_RSI_LOG("SPI transfert timed out %d/%d (rx%x rx%x)", itemsTransferred, itemsRemaining, (uint32_t) tx_buf, + (uint32_t) rx_buf); + + SPIDRV_AbortTransfer(SPI_HANDLE); + rsiError = RSI_ERROR_SPI_TIMEOUT; } } + else + { + WFX_RSI_LOG("SPI transfert failed with err:%x (tx%x rx%x)", spiError, (uint32_t) tx_buf, (uint32_t) rx_buf); + rsiError = RSI_ERROR_SPI_FAIL; + spiInitiatorTaskHandle = NULL; // SPI operation failed. No notification to received. + } - return RSI_ERROR_NONE; + xSemaphoreGive(spiTransferLock); + return rsiError; } From 1f7e4a1278110898b9a8ecc23e605c9defa066fa Mon Sep 17 00:00:00 2001 From: Jerry-ESP <107675966+Jerry-ESP@users.noreply.github.com> Date: Tue, 28 Mar 2023 22:34:40 +0800 Subject: [PATCH 011/158] fix compile error for -Wconversion added from PR #25373 (#25822) --- src/platform/ESP32/ESP32DeviceInfoProvider.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/platform/ESP32/ESP32DeviceInfoProvider.cpp b/src/platform/ESP32/ESP32DeviceInfoProvider.cpp index 783568b24d38a6..74f588f8e274ca 100644 --- a/src/platform/ESP32/ESP32DeviceInfoProvider.cpp +++ b/src/platform/ESP32/ESP32DeviceInfoProvider.cpp @@ -71,13 +71,15 @@ bool ESP32DeviceInfoProvider::FixedLabelIteratorImpl::Next(FixedLabelType & outp memset(mFixedLabelNameBuf, 0, sizeof(mFixedLabelNameBuf)); memset(mFixedLabelValueBuf, 0, sizeof(mFixedLabelValueBuf)); - VerifyOrReturnValue(ESP32Config::KeyAllocator::FixedLabelKey(keyBuf, sizeof(keyBuf), mEndpoint, mIndex) == CHIP_NO_ERROR, - false); + VerifyOrReturnValue( + ESP32Config::KeyAllocator::FixedLabelKey(keyBuf, sizeof(keyBuf), mEndpoint, static_cast(mIndex)) == CHIP_NO_ERROR, + false); ESP32Config::Key keyKey(ESP32Config::kConfigNamespace_ChipFactory, keyBuf); VerifyOrReturnValue( ESP32Config::ReadConfigValueStr(keyKey, mFixedLabelNameBuf, sizeof(mFixedLabelNameBuf), keyOutLen) == CHIP_NO_ERROR, false); - VerifyOrReturnValue(ESP32Config::KeyAllocator::FixedLabelValue(keyBuf, sizeof(keyBuf), mEndpoint, mIndex) == CHIP_NO_ERROR, + VerifyOrReturnValue(ESP32Config::KeyAllocator::FixedLabelValue(keyBuf, sizeof(keyBuf), mEndpoint, + static_cast(mIndex)) == CHIP_NO_ERROR, false); ESP32Config::Key valueKey(ESP32Config::kConfigNamespace_ChipFactory, keyBuf); VerifyOrReturnValue(ESP32Config::ReadConfigValueStr(valueKey, mFixedLabelValueBuf, sizeof(mFixedLabelValueBuf), valueOutLen) == @@ -210,7 +212,8 @@ bool ESP32DeviceInfoProvider::SupportedLocalesIteratorImpl::Next(CharSpan & outp size_t keyOutLen = 0; memset(mLocaleBuf, 0, sizeof(mLocaleBuf)); - VerifyOrReturnValue(ESP32Config::KeyAllocator::Locale(keyBuf, sizeof(keyBuf), mIndex) == CHIP_NO_ERROR, false); + VerifyOrReturnValue(ESP32Config::KeyAllocator::Locale(keyBuf, sizeof(keyBuf), static_cast(mIndex)) == CHIP_NO_ERROR, + false); ESP32Config::Key keyKey(ESP32Config::kConfigNamespace_ChipFactory, keyBuf); VerifyOrReturnValue(ESP32Config::ReadConfigValueStr(keyKey, mLocaleBuf, sizeof(mLocaleBuf), keyOutLen) == CHIP_NO_ERROR, false); From a5e9259decb4b31ae0ef4c8c742192e25476030d Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 28 Mar 2023 11:32:08 -0400 Subject: [PATCH 012/158] Add CI for darwin-framework-tool acting as OTA provider. (#25851) --- .github/workflows/darwin-tests.yaml | 13 ++ .../interactive/InteractiveCommands.h | 8 +- .../interactive/InteractiveCommands.mm | 9 +- .../pairing/GetCommissionerNodeIdCommand.mm | 2 +- scripts/tests/chiptest/accessories.py | 4 +- scripts/tests/chiptest/runner.py | 6 +- .../tests/run_darwin_framework_ota_test.py | 188 ++++++++++++++++++ 7 files changed, 221 insertions(+), 9 deletions(-) create mode 100755 scripts/tests/run_darwin_framework_ota_test.py diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml index a0c8642d557d04..cdf8b5a4364572 100644 --- a/.github/workflows/darwin-tests.yaml +++ b/.github/workflows/darwin-tests.yaml @@ -121,6 +121,19 @@ jobs: --tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ --bridge-app ./out/darwin-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ " + - name: Run OTA Test + timeout-minutes: 5 + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/tests/run_darwin_framework_ota_test.py \ + run \ + --darwin-framework-tool ./out/darwin-x64-darwin-framework-tool-${BUILD_VARIANT}/darwin-framework-tool \ + --ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ + --ota-data-file /tmp/rawImage \ + --ota-image-file /tmp/otaImage \ + --ota-destination-file /tmp/downloadedImage \ + --ota-candidate-file /tmp/otaCandidateJSON \ + " - name: Uploading core files uses: actions/upload-artifact@v3 if: ${{ failure() && !env.ACT }} diff --git a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.h b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.h index c6e8c5d85e45f1..cff524a1c0650e 100644 --- a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.h +++ b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.h @@ -30,7 +30,12 @@ class Commands; class InteractiveStartCommand : public CHIPCommandBridge { public: - InteractiveStartCommand(Commands * commandsHandler) : CHIPCommandBridge("start"), mHandler(commandsHandler) {} + InteractiveStartCommand(Commands * commandsHandler) : CHIPCommandBridge("start"), mHandler(commandsHandler) + { + AddArgument( + "additional-prompt", &mAdditionalPrompt, + "Force printing of an additional prompt that can then be detected by something trying to script interactive mode"); + } CHIP_ERROR RunCommand() override; @@ -39,4 +44,5 @@ class InteractiveStartCommand : public CHIPCommandBridge private: bool ParseCommand(char * command); Commands * mHandler = nullptr; + chip::Optional mAdditionalPrompt; }; diff --git a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm index 4188da365574c5..d0c900c3271ddd 100644 --- a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm +++ b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm @@ -73,13 +73,18 @@ void ENFORCE_FORMAT(3, 0) LoggingCallback(const char * module, uint8_t category, } } // namespace -char * GetCommand(char * command) +char * GetCommand(const chip::Optional & mAdditionalPrompt, char * command) { if (command != nullptr) { free(command); command = nullptr; } + if (mAdditionalPrompt.HasValue()) { + ClearLine(); + printf("%s\n", mAdditionalPrompt.Value()); + ClearLine(); + } command = readline(kInteractiveModePrompt); // Do not save empty lines @@ -118,7 +123,7 @@ el_status_t StopFunction() char * command = nullptr; while (YES) { - command = GetCommand(command); + command = GetCommand(mAdditionalPrompt, command); if (command != nullptr && !ParseCommand(command)) { break; } diff --git a/examples/darwin-framework-tool/commands/pairing/GetCommissionerNodeIdCommand.mm b/examples/darwin-framework-tool/commands/pairing/GetCommissionerNodeIdCommand.mm index 48502f84641b58..115f7b0821c048 100644 --- a/examples/darwin-framework-tool/commands/pairing/GetCommissionerNodeIdCommand.mm +++ b/examples/darwin-framework-tool/commands/pairing/GetCommissionerNodeIdCommand.mm @@ -26,7 +26,7 @@ VerifyOrReturnError(nil != controller, CHIP_ERROR_INCORRECT_STATE); auto id = [controller.controllerNodeId unsignedLongLongValue]; - ChipLogProgress(chipTool, "Commissioner Node Id 0x:" ChipLogFormatX64, ChipLogValueX64(id)); + ChipLogProgress(chipTool, "Commissioner Node Id 0x" ChipLogFormatX64, ChipLogValueX64(id)); SetCommandExitStatus(CHIP_NO_ERROR); return CHIP_NO_ERROR; diff --git a/scripts/tests/chiptest/accessories.py b/scripts/tests/chiptest/accessories.py index c3641d641171fa..d8ca1c02945cc9 100644 --- a/scripts/tests/chiptest/accessories.py +++ b/scripts/tests/chiptest/accessories.py @@ -106,14 +106,14 @@ def waitForMessage(self, name, message): return accessory.waitForMessage(' '.join(message)) return False - def createOtaImage(self, otaImageFilePath, rawImageFilePath, rawImageContent): + def createOtaImage(self, otaImageFilePath, rawImageFilePath, rawImageContent, vid='0xDEAD', pid='0xBEEF'): # Write the raw image content with open(rawImageFilePath, 'w') as rawFile: rawFile.write(rawImageContent) # Add an OTA header to the raw file otaImageTool = _DEFAULT_CHIP_ROOT + '/src/app/ota_image_tool.py' - cmd = [otaImageTool, 'create', '-v', '0xDEAD', '-p', '0xBEEF', '-vn', '2', + cmd = [otaImageTool, 'create', '-v', vid, '-p', pid, '-vn', '2', '-vs', "2.0", '-da', 'sha256', rawImageFilePath, otaImageFilePath] s = subprocess.Popen(cmd) s.wait() diff --git a/scripts/tests/chiptest/runner.py b/scripts/tests/chiptest/runner.py index d2f3d96503210e..fdba938224d45e 100644 --- a/scripts/tests/chiptest/runner.py +++ b/scripts/tests/chiptest/runner.py @@ -123,7 +123,7 @@ class Runner: def __init__(self, capture_delegate=None): self.capture_delegate = capture_delegate - def RunSubprocess(self, cmd, name, wait=True, dependencies=[], timeout_seconds: typing.Optional[int] = None): + def RunSubprocess(self, cmd, name, wait=True, dependencies=[], timeout_seconds: typing.Optional[int] = None, stdin=None): outpipe = LogPipe( logging.DEBUG, capture_delegate=self.capture_delegate, name=name + ' OUT') @@ -133,12 +133,12 @@ def RunSubprocess(self, cmd, name, wait=True, dependencies=[], timeout_seconds: if sys.platform == 'darwin': # Try harder to avoid any stdout buffering in our tests - cmd = ['stdbuf', '-o0'] + cmd + cmd = ['stdbuf', '-o0', '-i0'] + cmd if self.capture_delegate: self.capture_delegate.Log(name, 'EXECUTING %r' % cmd) - s = subprocess.Popen(cmd, stdout=outpipe, stderr=errpipe) + s = subprocess.Popen(cmd, stdin=stdin, stdout=outpipe, stderr=errpipe) outpipe.close() errpipe.close() diff --git a/scripts/tests/run_darwin_framework_ota_test.py b/scripts/tests/run_darwin_framework_ota_test.py new file mode 100755 index 00000000000000..672b26369d3c3e --- /dev/null +++ b/scripts/tests/run_darwin_framework_ota_test.py @@ -0,0 +1,188 @@ +#! /usr/bin/env -S python3 -B + +import io +import json +import logging +import time +from subprocess import PIPE + +import click +from chiptest.accessories import AppsRegister +from chiptest.runner import Runner +from chiptest.test_definition import App, ExecutionCapture +from yaml.paths_finder import PathsFinder + +TEST_NODE_ID = '0x12344321' +TEST_VID = '0xFFF1' +TEST_PID = '0x8001' + + +class DarwinToolRunner: + def __init__(self, runner, command): + self.process = None + self.outpipe = None + self.runner = runner + self.lastLogIndex = 0 + self.command = command + self.stdin = None + + def start(self): + self.process, self.outpipe, errpipe = self.runner.RunSubprocess(self.command, + name='DARWIN-TOOL', + wait=False, + stdin=PIPE) + self.stdin = io.TextIOWrapper(self.process.stdin, line_buffering=True) + + def stop(self): + if self.process: + self.process.kill() + + def waitForMessage(self, message): + logging.debug('Waiting for %s' % message) + + start_time = time.monotonic() + ready, self.lastLogIndex = self.outpipe.CapturedLogContains( + message, self.lastLogIndex) + while not ready: + if self.process.poll() is not None: + died_str = ('Process died while waiting for %s, returncode %d' % + (message, self.process.returncode)) + logging.error(died_str) + raise Exception(died_str) + if time.monotonic() - start_time > 10: + raise Exception('Timeout while waiting for %s' % message) + time.sleep(0.1) + ready, self.lastLogIndex = self.outpipe.CapturedLogContains( + message, self.lastLogIndex) + + logging.debug('Success waiting for: %s' % message) + + +class InteractiveDarwinTool(DarwinToolRunner): + def __init__(self, runner, binary_path): + self.prompt = "WAITING FOR COMMANDS NOW" + super().__init__(runner, [binary_path, "interactive", "start", "--additional-prompt", self.prompt]) + + def waitForPrompt(self): + self.waitForMessage(self.prompt) + + def sendCommand(self, command): + logging.debug('Sending command %s' % command) + print(command, file=self.stdin) + self.waitForPrompt() + + +@click.group(chain=True) +@click.pass_context +def main(context): + pass + + +@main.command( + 'run', help='Execute the test') +@click.option( + '--darwin-framework-tool', + help="what darwin-framework-tool to use") +@click.option( + '--ota-requestor-app', + help='what ota requestor app to use') +@click.option( + '--ota-data-file', + required=True, + help='The file to use to store our OTA data. This file does not need to exist.') +@click.option( + '--ota-image-file', + required=True, + help='The file to use to store the OTA image we plan to send. This file does not need to exist.') +@click.option( + '--ota-destination-file', + required=True, + help='The destination file to use for the requestor\'s download. This file does not need to exist.') +@click.option( + '--ota-candidate-file', + required=True, + help='The file to use for our OTA candidate JSON. This file does not need to exist.') +@click.pass_context +def cmd_run(context, darwin_framework_tool, ota_requestor_app, ota_data_file, ota_image_file, ota_destination_file, ota_candidate_file): + paths_finder = PathsFinder() + + if darwin_framework_tool is None: + darwin_framework_tool = paths_finder.get('darwin-framework-tool') + if ota_requestor_app is None: + ota_requestor_app = paths_finder.get('chip-ota-requestor-app') + + runner = Runner() + runner.capture_delegate = ExecutionCapture() + + apps_register = AppsRegister() + apps_register.init() + + darwin_tool = None + + try: + apps_register.createOtaImage(ota_image_file, ota_data_file, "This is some test OTA data", vid=TEST_VID, pid=TEST_PID) + json_data = { + "deviceSoftwareVersionModel": [{ + "vendorId": int(TEST_VID, 16), + "productId": int(TEST_PID, 16), + "softwareVersion": 2, + "softwareVersionString": "2.0", + "cDVersionNumber": 18, + "softwareVersionValid": True, + "minApplicableSoftwareVersion": 0, + "maxApplicableSoftwareVersion": 100, + "otaURL": ota_image_file + }] + } + with open(ota_candidate_file, "w") as f: + json.dump(json_data, f) + + requestor_app = App(runner, [ota_requestor_app, '--otaDownloadPath', ota_destination_file]) + apps_register.add('default', requestor_app) + + requestor_app.start() + + pairing_cmd = [darwin_framework_tool, 'pairing', 'code', TEST_NODE_ID, requestor_app.setupCode] + runner.RunSubprocess(pairing_cmd, name='PAIR', dependencies=[apps_register]) + + # pairing get-commissioner-node-id does not seem to work right in interactive mode for some reason + darwin_tool = DarwinToolRunner(runner, [darwin_framework_tool, 'pairing', 'get-commissioner-node-id']) + darwin_tool.start() + darwin_tool.waitForMessage(": Commissioner Node Id") + nodeIdLine = darwin_tool.outpipe.FindLastMatchingLine('.*: Commissioner Node Id (0x[0-9A-F]+)') + if not nodeIdLine: + raise Exception("Unable to find commissioner node id") + commissionerNodeId = nodeIdLine.group(1) + darwin_tool.stop() + + darwin_tool = InteractiveDarwinTool(runner, darwin_framework_tool) + darwin_tool.start() + + darwin_tool.waitForPrompt() + + darwin_tool.sendCommand("otasoftwareupdateapp candidate-file-path %s" % ota_candidate_file) + darwin_tool.sendCommand("otasoftwareupdateapp set-reply-params --status 0") + darwin_tool.sendCommand("otasoftwareupdaterequestor announce-otaprovider %s 0 0 0 %s 0" % + (commissionerNodeId, TEST_NODE_ID)) + + # Now wait for the OTA download to finish. + requestor_app.waitForMessage("OTA image downloaded to %s" % ota_destination_file) + + # Make sure the right thing was downloaded. + apps_register.compareFiles(ota_data_file, ota_destination_file) + + except Exception: + logging.error("!!!!!!!!!!!!!!!!!!!! ERROR !!!!!!!!!!!!!!!!!!!!!!") + runner.capture_delegate.LogContents() + raise + finally: + if darwin_tool is not None: + darwin_tool.stop() + apps_register.killAll() + apps_register.factoryResetAll() + apps_register.removeAll() + apps_register.uninit() + + +if __name__ == '__main__': + main(auto_envvar_prefix='CHIP') From 298d9ebb39afea95532dc9f1ae6c514033e2a9ba Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 28 Mar 2023 13:55:58 -0400 Subject: [PATCH 013/158] Stop disabling warnings in some public configs. (#25854) Disabling warnings in a public config will disable those warnings for anything that depends on the thing using the config. This led to a bunch of warnings being disabled incorrectly for consumers of third-party libraries. --- .../example/ExampleCredentialIssuerCommands.h | 2 +- .../chip-tool/commands/pairing/PairingCommand.h | 1 + examples/common/websocket-server/BUILD.gn | 7 +++++++ .../commands/common/MTRError.mm | 1 + .../commands/tests/TestCommandBridge.h | 2 -- src/lib/support/CodeUtils.h | 2 ++ third_party/boringssl/repo/BUILD.gn | 16 ++++++++++++---- third_party/editline/BUILD.gn | 4 ++++ third_party/jsoncpp/BUILD.gn | 4 ++++ third_party/libwebsockets/BUILD.gn | 7 +++++-- third_party/nlunit-test/BUILD.gn | 3 +++ 11 files changed, 40 insertions(+), 9 deletions(-) diff --git a/examples/chip-tool/commands/example/ExampleCredentialIssuerCommands.h b/examples/chip-tool/commands/example/ExampleCredentialIssuerCommands.h index a8694f02ff894e..a23b45eae10627 100644 --- a/examples/chip-tool/commands/example/ExampleCredentialIssuerCommands.h +++ b/examples/chip-tool/commands/example/ExampleCredentialIssuerCommands.h @@ -81,7 +81,7 @@ class ExampleCredentialIssuerCommands : public CredentialIssuerCommands { mDacVerifier->EnableCdTestKeySupport(isEnabled); } - + break; default: break; } diff --git a/examples/chip-tool/commands/pairing/PairingCommand.h b/examples/chip-tool/commands/pairing/PairingCommand.h index f12353e010a40c..5c2a356d6aec73 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.h +++ b/examples/chip-tool/commands/pairing/PairingCommand.h @@ -85,6 +85,7 @@ class PairingCommand : public CHIPCommand, break; case PairingMode::Code: AddArgument("skip-commissioning-complete", 0, 1, &mSkipCommissioningComplete); + FALLTHROUGH; case PairingMode::CodePaseOnly: AddArgument("payload", &mOnboardingPayload); AddArgument("discover-once", 0, 1, &mDiscoverOnce); diff --git a/examples/common/websocket-server/BUILD.gn b/examples/common/websocket-server/BUILD.gn index fdd17300cecd06..d3f2aa35ff8ac9 100644 --- a/examples/common/websocket-server/BUILD.gn +++ b/examples/common/websocket-server/BUILD.gn @@ -15,6 +15,11 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") +config("websocket_server_config_disable_warnings") { + # Unfortunately, some of the libwebsockets headers include -Wshadow failures. + cflags = [ "-Wno-shadow" ] +} + static_library("websocket-server") { output_name = "libWebSocketServer" @@ -28,4 +33,6 @@ static_library("websocket-server") { "${chip_root}/src/lib/support", "${chip_root}/third_party/libwebsockets", ] + + configs += [ ":websocket_server_config_disable_warnings" ] } diff --git a/examples/darwin-framework-tool/commands/common/MTRError.mm b/examples/darwin-framework-tool/commands/common/MTRError.mm index 5d348c83c7fdf3..770c947e05d94b 100644 --- a/examples/darwin-framework-tool/commands/common/MTRError.mm +++ b/examples/darwin-framework-tool/commands/common/MTRError.mm @@ -87,6 +87,7 @@ CHIP_ERROR MTRErrorToCHIPErrorCode(NSError * error) break; } // Weird error we did not create. Fall through. + FALLTHROUGH; default: code = CHIP_ERROR_INTERNAL.AsInteger(); break; diff --git a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h b/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h index 0828e1d1eccac5..b99c5976588b3b 100644 --- a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h +++ b/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h @@ -236,8 +236,6 @@ class TestCommandBridge : public CHIPCommandBridge, MTRBaseDevice * _Nullable GetDevice(const char * _Nullable identity) { - MTRDeviceController * controller = GetCommissioner(identity); - SetIdentity(identity); return mConnectedDevices[identity]; } diff --git a/src/lib/support/CodeUtils.h b/src/lib/support/CodeUtils.h index 3b754e0b9e5e12..4f393dfaad0b8b 100644 --- a/src/lib/support/CodeUtils.h +++ b/src/lib/support/CodeUtils.h @@ -677,6 +677,8 @@ inline void chipDie(void) #if defined(__clang__) #define FALLTHROUGH [[clang::fallthrough]] +#elif defined(__GNUC__) +#define FALLTHROUGH __attribute__((fallthrough)) #else #define FALLTHROUGH (void) 0 #endif diff --git a/third_party/boringssl/repo/BUILD.gn b/third_party/boringssl/repo/BUILD.gn index 634be1687232a8..425f52270d2411 100644 --- a/third_party/boringssl/repo/BUILD.gn +++ b/third_party/boringssl/repo/BUILD.gn @@ -20,6 +20,12 @@ import("BUILD.generated.gni") config("boringssl_config") { include_dirs = [ "src/include" ] + # We want the basic crypto impl with no asm primitives until we hook-up platform-based + # support to the build later. + defines = [ "OPENSSL_NO_ASM=1" ] +} + +config("boringssl_config_disable_warnings") { cflags = [ "-Wno-unused-variable", "-Wno-conversion", @@ -28,11 +34,8 @@ config("boringssl_config") { if (is_clang) { cflags += [ "-Wno-shorten-64-to-32" ] } - - # We want the basic crypto impl with no asm primitives until we hook-up platform-based - # support to the build later. - defines = [ "OPENSSL_NO_ASM=1" ] } + all_sources = crypto_sources all_headers = crypto_headers @@ -45,4 +48,9 @@ static_library("boringssl") { sources = all_sources public_configs = [ ":boringssl_config" ] + + # The disable-warnings config should not be a public config, since + # that would make it apply to compilations of anything that depends + # on boringssl, not just boringssl itself. + configs += [ ":boringssl_config_disable_warnings" ] } diff --git a/third_party/editline/BUILD.gn b/third_party/editline/BUILD.gn index ec2cdd4a2e3bb2..cc48d31ac0d365 100644 --- a/third_party/editline/BUILD.gn +++ b/third_party/editline/BUILD.gn @@ -17,7 +17,9 @@ import("${build_root}/config/compiler/compiler.gni") config("editline_config") { include_dirs = [ "repo/include" ] +} +config("editline_config_disable_warnings") { cflags = [ "-Wno-conversion" ] if (is_clang) { @@ -38,5 +40,7 @@ static_library("editline") { public_configs = [ ":editline_config" ] + configs += [ ":editline_config_disable_warnings" ] + include_dirs = [ "include" ] } diff --git a/third_party/jsoncpp/BUILD.gn b/third_party/jsoncpp/BUILD.gn index aae8f025e2feca..13dcc203cce6e5 100644 --- a/third_party/jsoncpp/BUILD.gn +++ b/third_party/jsoncpp/BUILD.gn @@ -17,7 +17,9 @@ import("//build_overrides/chip.gni") config("jsoncpp_config") { include_dirs = [ "repo/include" ] +} +config("jsoncpp_config_disable_warnings") { cflags = [ "-Wno-implicit-fallthrough" ] } @@ -41,6 +43,8 @@ source_set("jsoncpp") { public_configs = [ ":jsoncpp_config" ] + configs += [ ":jsoncpp_config_disable_warnings" ] + defines = [ "JSON_USE_EXCEPTION=0", "JSON_USE_NULLREF=0", diff --git a/third_party/libwebsockets/BUILD.gn b/third_party/libwebsockets/BUILD.gn index 37d7bf1acbef24..9b96fb734c402d 100644 --- a/third_party/libwebsockets/BUILD.gn +++ b/third_party/libwebsockets/BUILD.gn @@ -18,14 +18,16 @@ config("libwebsockets_config") { "repo/include", ] + defines = [] +} + +config("libwebsockets_config_disable_warnings") { cflags = [ "-Wno-shadow", "-Wno-unreachable-code", "-Wno-format-nonliteral", "-Wno-implicit-fallthrough", ] - - defines = [] } source_set("libwebsockets") { @@ -107,4 +109,5 @@ source_set("libwebsockets") { } public_configs = [ ":libwebsockets_config" ] + configs += [ ":libwebsockets_config_disable_warnings" ] } diff --git a/third_party/nlunit-test/BUILD.gn b/third_party/nlunit-test/BUILD.gn index d6907714acd446..f56d0a5e9d2cb5 100644 --- a/third_party/nlunit-test/BUILD.gn +++ b/third_party/nlunit-test/BUILD.gn @@ -17,7 +17,9 @@ import("${build_root}/config/compiler/compiler.gni") config("nlunit-test_config") { include_dirs = [ "repo/src" ] +} +config("nlunit-test_config_disable_warnings") { cflags = [ "-Wno-conversion" ] if (is_clang) { @@ -36,4 +38,5 @@ static_library("nlunit-test") { ] public_configs = [ ":nlunit-test_config" ] + configs += [ ":nlunit-test_config_disable_warnings" ] } From 745da97ef19a72d160ba428c991c5aa89d86c406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szablowski?= <56074162+doublemis1@users.noreply.github.com> Date: Tue, 28 Mar 2023 19:56:17 +0200 Subject: [PATCH 014/158] Fix RR-1.1 python test case, enable group testing (#25845) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * align the step number logs * enable groups acl beofre groups testing * align ACL targets parameters to values provided in test plan Signed-off-by: Michał Szablowski --- src/python_testing/TC_RR_1_1.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/python_testing/TC_RR_1_1.py b/src/python_testing/TC_RR_1_1.py index 28c3e8f1439998..1028a8b4f27b84 100644 --- a/src/python_testing/TC_RR_1_1.py +++ b/src/python_testing/TC_RR_1_1.py @@ -256,7 +256,7 @@ async def test_TC_RR_1_1(self): asserts.assert_equal(node_label, BEFORE_LABEL, "NodeLabel must match what was written") # Step 3: Add 4 Access Control entries on DUT with a list of 4 Subjects and 3 Targets with the following parameters (...) - self.send_acl(test_step=3, client_by_name=client_by_name, enable_access_to_group_cluster=False, fabric_table=fabric_table) + await self.send_acl(test_step=3, client_by_name=client_by_name, enable_access_to_group_cluster=False, fabric_table=fabric_table) # Step 4 and 5 (the operations cannot be separated): establish all CASE sessions and subscriptions @@ -420,7 +420,7 @@ async def test_TC_RR_1_1(self): logging.info("Step 9: Skipped due to no UserLabel cluster instances") # Step 10: Reconfig ACL to allow test runner access to Groups clusters on all endpoints. logging.info("Step 10: Reconfiguring ACL to allow access to Groups Clusters") - self.send_acl(test_step=10, client_by_name=client_by_name, enable_access_to_group_cluster=False, fabric_table=fabric_table) + await self.send_acl(test_step=10, client_by_name=client_by_name, enable_access_to_group_cluster=True, fabric_table=fabric_table) # Step 11: Count all group cluster instances # and ensure MaxGroupsPerFabric >= 4 * counted_groups_clusters. logging.info("Step 11: Validating groups support minimums") @@ -532,7 +532,7 @@ async def fill_and_validate_group_key_sets(self, for group_key_cluster_idx in range(1, keys_per_fabric): group_key_list_idx: int = group_key_cluster_idx - 1 - logging.info("Step 12: Setting group key on fabric %d at index '%d'" % (client_idx+1, group_key_cluster_idx)) + logging.info("Step 13: Setting group key on fabric %d at index '%d'" % (client_idx+1, group_key_cluster_idx)) group_keys[client_idx].append(self.build_group_key(client_idx, group_key_cluster_idx, keys_per_fabric)) await client.SendCommand(self.dut_node_id, 0, Clusters.GroupKeyManagement.Commands.KeySetWrite( group_keys[client_idx][group_key_list_idx])) @@ -541,7 +541,7 @@ async def fill_and_validate_group_key_sets(self, for client_idx in range(fabrics): client: Any = clients[client_idx] - logging.info("Step 12: Reading back group keys on fabric %d" % (client_idx+1)) + logging.info("Step 13: Reading back group keys on fabric %d" % (client_idx+1)) resp = await client.SendCommand(self.dut_node_id, 0, Clusters.GroupKeyManagement.Commands.KeySetReadAllIndices(), responseType=Clusters.GroupKeyManagement.Commands.KeySetReadAllIndicesResponse) @@ -729,32 +729,32 @@ def build_acl(self, enable_access_to_group_cluster: bool): # - Subjects field: [0xFFFF_FFFD_0001_0001, 0x2000_0000_0000_0001, 0x2000_0000_0000_0002, 0x2000_0000_0000_0003] # - Targets field: [ # {Endpoint: 0}, - # {Cluster: 0xFFF1_FC00, DeviceType: 0xFFF1_FC30}, - # {Cluster: 0xFFF1_FC00, DeviceType: 0xFFF1_FC31} + # {Cluster: 0xFFF1_FC00, DeviceType: 0xFFF1_BC30}, + # {Cluster: 0xFFF1_FC00, DeviceType: 0xFFF1_BC31} # ] # . struct # - Privilege field: Manage (4) # - AuthMode field: CASE (2) # - Subjects field: [0x1000_0000_0000_0001, 0x1000_0000_0000_0002, 0x1000_0000_0000_0003, 0x1000_0000_0000_0004] # - Targets field: [ - # {Cluster: 0xFFF1_FC00, DeviceType: 0xFFF1_FC20}, - # {Cluster: 0xFFF1_FC01, DeviceType: 0xFFF1_FC21}, - # {Cluster: 0xFFF1_FC02, DeviceType: 0xFFF1_FC22} + # {Cluster: 0xFFF1_FC00, DeviceType: 0xFFF1_BC20}, + # {Cluster: 0xFFF1_FC01, DeviceType: 0xFFF1_BC21}, + # {Cluster: 0xFFF1_FC02, DeviceType: 0xFFF1_BC22} # ] # . struct # - Privilege field: Operate (3) # - AuthMode field: CASE (2) # - Subjects field: [0x3000_0000_0000_0001, 0x3000_0000_0000_0002, 0x3000_0000_0000_0003, 0x3000_0000_0000_0004] - # - Targets field: [{Cluster: 0xFFF1_FC40, DeviceType: 0xFFF1_FC20}, - # {Cluster: 0xFFF1_FC41, DeviceType: 0xFFF1_FC21}, - # {Cluster: 0xFFF1_FC02, DeviceType: 0xFFF1_FC42}] + # - Targets field: [{Cluster: 0xFFF1_FC40, DeviceType: 0xFFF1_BC20}, + # {Cluster: 0xFFF1_FC41, DeviceType: 0xFFF1_BC21}, + # {Cluster: 0xFFF1_FC02, DeviceType: 0xFFF1_BC42}] # . struct # - Privilege field: View (1) # - AuthMode field: CASE (2) # - Subjects field: [0x4000_0000_0000_0001, 0x4000_0000_0000_0002, 0x4000_0000_0000_0003, 0x4000_0000_0000_0004] - # - Targets field: [{Cluster: 0xFFF1_FC80, DeviceType: 0xFFF1_FC20}, - # {Cluster: 0xFFF1_FC81, DeviceType: 0xFFF1_FC21}, - # {Cluster: 0xFFF1_FC82, DeviceType: 0xFFF1_FC22}] + # - Targets field: [{Cluster: 0xFFF1_FC80, DeviceType: 0xFFF1_BC20}, + # {Cluster: 0xFFF1_FC81, DeviceType: 0xFFF1_BC21}, + # {Cluster: 0xFFF1_FC82, DeviceType: 0xFFF1_BC22}] # Administer ACL entry admin_subjects = [0xFFFF_FFFD_0001_0001, 0x2000_0000_0000_0001, 0x2000_0000_0000_0002, 0x2000_0000_0000_0003] From 5748b07abe78dcaba3bf3ab8236c221fae947830 Mon Sep 17 00:00:00 2001 From: Matthew Swartwout Date: Tue, 28 Mar 2023 11:43:56 -0700 Subject: [PATCH 015/158] Update Docker containers to Android SDK 26 (#25867) --- .../docker/images/chip-build-android/Dockerfile | 14 +++++++------- integrations/docker/images/chip-build/version | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/integrations/docker/images/chip-build-android/Dockerfile b/integrations/docker/images/chip-build-android/Dockerfile index 84abe630df65a6..4bcb9a84f36d1f 100644 --- a/integrations/docker/images/chip-build-android/Dockerfile +++ b/integrations/docker/images/chip-build-android/Dockerfile @@ -15,14 +15,14 @@ RUN set -x \ # Download and install android SDK RUN set -x \ - && wget -O /tmp/android-21.zip https://dl.google.com/android/repository/android-21_r02.zip \ + && wget -O /tmp/android-26.zip https://dl.google.com/android/repository/platform-26_r02.zip \ && mkdir -p /opt/android/sdk/platforms \ && cd /opt/android/sdk/platforms \ - && unzip /tmp/android-21.zip \ - && mv android-5.0.1 android-21 \ - && rm -f /tmp/android-21.zip \ + && unzip /tmp/android-26.zip \ + && mv android-8.0.0 android-26 \ + && rm -f /tmp/android-26.zip \ && chmod -R a+rX /opt/android/sdk \ - && test -d /opt/android/sdk/platforms/android-21 \ + && test -d /opt/android/sdk/platforms/android-26 \ && : # last line # Download and install android command line tool (for installing `sdkmanager`) @@ -57,9 +57,9 @@ RUN set -x \ && export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH \ && cd /tmp && wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz \ && mkdir -p $OPENSSL_ARMV7 && cd $OPENSSL_ARMV7 && tar xfz /tmp/openssl-1.1.1g.tar.gz \ - && cd $OPENSSL_ARMV7/openssl-1.1.1g && CC=clang ANDROID_API=21 ./Configure android-arm -D__ANDROID_API__=21 && make SHLIB_VERSION_NUMBER= SHLIB_EXT=.so \ + && cd $OPENSSL_ARMV7/openssl-1.1.1g && CC=clang ANDROID_API=26 ./Configure android-arm -D__ANDROID_API__=26 && make SHLIB_VERSION_NUMBER= SHLIB_EXT=.so \ && mkdir -p $OPENSSL_X86 && cd $OPENSSL_X86 && tar xfz /tmp/openssl-1.1.1g.tar.gz \ - && cd $OPENSSL_X86/openssl-1.1.1g && CC=clang ANDROID_API=21 ./Configure android-x86 -D__ANDROID_API__=21 && make SHLIB_VERSION_NUMBER= SHLIB_EXT=.so \ + && cd $OPENSSL_X86/openssl-1.1.1g && CC=clang ANDROID_API=26 ./Configure android-x86 -D__ANDROID_API__=26 && make SHLIB_VERSION_NUMBER= SHLIB_EXT=.so \ && rm -rf /tmp/OpenSSL_1_1_1g.zip \ && : # last line diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index 2a5e0b15cf1b44..e9bee9622b4ac9 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.6.50 Version bump reason: [Silabs] Update Image with GSDK and SLC +0.6.51 Version bump reason: Update to Android SDK 26 From 9697944d61a7897b2722fbe16cf6dc23d9c6ee2c Mon Sep 17 00:00:00 2001 From: chrisdecenzo <61757564+chrisdecenzo@users.noreply.github.com> Date: Tue, 28 Mar 2023 12:40:05 -0700 Subject: [PATCH 016/158] Fix command line support in linux tv-casting-app (#24215) * Fix command line support in linux tv-casting-app * Address comments --------- Co-authored-by: Christopher DeCenzo --- examples/tv-casting-app/linux/main.cpp | 6 +++++- .../tv-casting-common/src/CastingServer.cpp | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/examples/tv-casting-app/linux/main.cpp b/examples/tv-casting-app/linux/main.cpp index 75584254a6002f..485cf7917e6a29 100644 --- a/examples/tv-casting-app/linux/main.cpp +++ b/examples/tv-casting-app/linux/main.cpp @@ -141,7 +141,11 @@ int main(int argc, char * argv[]) VerifyOrDie(CHIP_NO_ERROR == initParams.InitializeStaticResourcesBeforeServerInit()); VerifyOrDie(CHIP_NO_ERROR == chip::Server::GetInstance().Init(initParams)); - if (ConnectToCachedVideoPlayer() == CHIP_NO_ERROR) + if (argc > 1) + { + ChipLogProgress(AppServer, "Command line parameters detected. Skipping auto-start."); + } + else if (ConnectToCachedVideoPlayer() == CHIP_NO_ERROR) { ChipLogProgress(AppServer, "Skipping commissioner discovery / User directed commissioning flow."); } diff --git a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp index 80654c818bece7..1dd4612b03f1db 100644 --- a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp @@ -211,6 +211,12 @@ CastingServer::GetDiscoveredCommissioner(int index, chip::Optional Date: Tue, 28 Mar 2023 16:23:26 -0400 Subject: [PATCH 017/158] Ensure all commands are generated for client cluster definitions in .matter IDL files (#25853) * Generate all client-side commands and structures. This requires zap updates after https://github.com/project-chip/zap/pull/981 * ZAP regen all * Use zap 2023.03.27 to pick up clusterName and responseName access * Update minimum zap version * Start using zcl_commands_source_client instead of chip_cluster_responses * Update invoke callbacks too to use updated stateless loop methods * Noop update: switch loop method and conditional that is not needed * Switch to source_server instead of source_client --------- Co-authored-by: Andrei Litvin --- .../all-clusters-app.matter | 35 +- .../all-clusters-minimal-app.matter | 21 +- ...p_rootnode_dimmablelight_bCwGYSDpoe.matter | 20 +- ...de_colortemperaturelight_hbUnzYVeyn.matter | 20 +- .../rootnode_contactsensor_lFAGG1bfRO.matter | 20 +- .../rootnode_dimmablelight_bCwGYSDpoe.matter | 20 +- .../rootnode_doorlock_aNKYAreMXE.matter | 20 +- ...tnode_extendedcolorlight_8lcaaYJVAa.matter | 20 +- .../devices/rootnode_fan_7N2TobIlOX.matter | 20 +- .../rootnode_flowsensor_1zVxHedlaV.matter | 70 +- ...tnode_heatingcoolingunit_ncdGai1E5a.matter | 49 +- .../rootnode_humiditysensor_Xyj4gda6Hb.matter | 70 +- .../rootnode_lightsensor_lZQycTFcJK.matter | 70 +- ...rootnode_occupancysensor_iHyVgifZuo.matter | 70 +- .../rootnode_onofflight_bbs1b7IaOV.matter | 20 +- ...ootnode_onofflightswitch_FsPlMr090Q.matter | 34 +- ...rootnode_onoffpluginunit_Wtf8ss5EBY.matter | 20 +- .../rootnode_pressuresensor_s0qC9wLH4k.matter | 70 +- .../rootnode_speaker_RpzeXdimqA.matter | 20 +- ...otnode_temperaturesensor_Qy1zkNW7c3.matter | 70 +- .../rootnode_thermostat_bm3fb8dhYi.matter | 20 +- .../rootnode_windowcovering_RLCxaGi9Yx.matter | 20 +- .../contact-sensor-app.matter | 20 +- .../light-switch-app.matter | 158 +- .../lighting-common/lighting-app.matter | 20 +- .../nxp/zap/lighting-on-off.matter | 20 +- examples/lighting-app/qpg/zap/light.matter | 20 +- .../data_model/lighting-wifi-app.matter | 20 +- .../data_model/lighting-thread-app.matter | 20 +- .../efr32/data_model/lighting-wifi-app.matter | 20 +- examples/lock-app/lock-common/lock-app.matter | 20 +- examples/lock-app/qpg/zap/lock.matter | 20 +- .../log-source-common/log-source-app.matter | 15 + .../ota-requestor-app.matter | 20 +- .../placeholder/linux/apps/app1/config.matter | 35 + .../placeholder/linux/apps/app2/config.matter | 35 + examples/pump-app/pump-common/pump-app.matter | 20 +- .../pump-controller-app.matter | 34 +- .../thermostat-common/thermostat.matter | 26 +- examples/tv-app/tv-common/tv-app.matter | 92 +- .../tv-casting-common/tv-casting-app.matter | 52 + examples/window-app/common/window-app.matter | 20 +- .../docker/images/chip-cert-bins/Dockerfile | 2 +- scripts/setup/zap.json | 2 +- scripts/tools/zap/zap_execution.py | 2 +- .../templates/app/MatterIDL.zapt | 17 +- .../data_model/controller-clusters.matter | 554 ++-- .../templates/CHIPInvokeCallbacks-src.zapt | 18 +- .../java/templates/CHIPInvokeCallbacks.zapt | 18 +- .../java/templates/CHIPReadCallbacks.zapt | 7 +- .../zap-generated/CHIPInvokeCallbacks.cpp | 2382 ++++++++++++++--- .../java/zap-generated/CHIPInvokeCallbacks.h | 137 + 52 files changed, 3608 insertions(+), 1017 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 99acb67bc867a9..15952f97027fef 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 @@ -273,9 +273,23 @@ client cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + OnOffEffectIdentifier effectIdentifier = 0; + int8u effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControl onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; command Toggle(): DefaultSuccess = 2; + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } server cluster OnOff = 6 { @@ -746,14 +760,20 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; + response struct QueryImageResponse = 1 { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING<256> imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING<64> softwareVersionString = 4; + optional OCTET_STRING<32> updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING<512> metadataForRequestor = 7; } - request struct NotifyUpdateAppliedRequest { + request struct ApplyUpdateRequestRequest { OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; + INT32U newVersion = 1; } response struct ApplyUpdateResponse = 3 { @@ -761,6 +781,11 @@ client cluster OtaSoftwareUpdateProvider = 41 { INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; 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 6a8b066ef5148a..1239b9e94b7be8 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 @@ -631,14 +631,20 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; + response struct QueryImageResponse = 1 { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING<256> imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING<64> softwareVersionString = 4; + optional OCTET_STRING<32> updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING<512> metadataForRequestor = 7; } - request struct NotifyUpdateAppliedRequest { + request struct ApplyUpdateRequestRequest { OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; + INT32U newVersion = 1; } response struct ApplyUpdateResponse = 3 { @@ -646,6 +652,11 @@ client cluster OtaSoftwareUpdateProvider = 41 { INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 0138aa3207b6b2..445c03d26ec6f9 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -435,16 +435,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -456,11 +446,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 73f0fad8aa24b5..7e502f5b82b5f9 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -444,16 +444,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -465,11 +455,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index d69ad8d02016c8..a8e012b68e2b8a 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -288,16 +288,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -309,11 +299,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index fa8f85729e31a4..8ebc417d54a189 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -435,16 +435,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -456,11 +446,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 0dda840f15e723..e0605669e54629 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -288,16 +288,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -309,11 +299,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 8e42c417cef86f..1f87452815d8d8 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -435,16 +435,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -456,11 +446,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index af6104234a63ff..c3ec45249a26a4 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -285,16 +285,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -306,11 +296,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 004787645dcf69..2d15955cae04fd 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -52,6 +52,56 @@ client cluster Groups = 4 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } server cluster Groups = 4 { @@ -302,16 +352,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -323,11 +363,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 8bfe255db605df..38d19b3fa41916 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -428,16 +428,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -449,11 +439,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; @@ -1356,6 +1356,35 @@ client cluster Thermostat = 513 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + request struct SetpointRaiseLowerRequest { + SetpointAdjustMode mode = 0; + INT8S amount = 1; + } + + response struct GetWeeklyScheduleResponse = 0 { + INT8U numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct SetWeeklyScheduleRequest { + INT8U numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + ThermostatScheduleTransition transitions[] = 3; + } + + request struct GetWeeklyScheduleRequest { + DayOfWeek daysToReturn = 0; + ModeForSequence modeToReturn = 1; + } + + command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; + command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; + command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; + command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; } server cluster FanControl = 514 { diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 7a45ce19377ed4..590522e2fc585a 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -52,6 +52,56 @@ client cluster Groups = 4 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } server cluster Groups = 4 { @@ -302,16 +352,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -323,11 +363,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index b49f38eb025857..3dcf17d48c7ff0 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -52,6 +52,56 @@ client cluster Groups = 4 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } server cluster Groups = 4 { @@ -302,16 +352,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -323,11 +363,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 4e218927f80eee..065f90ec06ecb0 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -52,6 +52,56 @@ client cluster Groups = 4 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } server cluster Groups = 4 { @@ -302,16 +352,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -323,11 +363,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 5c079a5eafd9e2..6d18c741e0aad5 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -435,16 +435,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -456,11 +446,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index e4ad689f018f34..3c9508c676353e 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -146,9 +146,23 @@ client cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + OnOffEffectIdentifier effectIdentifier = 0; + int8u effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControl onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; command Toggle(): DefaultSuccess = 2; + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } server cluster OnOff = 6 { @@ -378,16 +392,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -399,11 +403,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 2c7d1b9e16bab8..0276bf5ae756a8 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -335,16 +335,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -356,11 +346,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 146e6d58ad75f3..5ed77f2bbce450 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -57,6 +57,56 @@ client cluster Groups = 4 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } server cluster Groups = 4 { @@ -307,16 +357,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -328,11 +368,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 0c1041f3c77441..743bd76be3c33f 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -429,16 +429,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -450,11 +440,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 951abb3781f2b6..457122418c3c17 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -52,6 +52,56 @@ client cluster Groups = 4 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } server cluster Groups = 4 { @@ -302,16 +352,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -323,11 +363,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 03bc1853fbd387..19e12b4c59cd30 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -288,16 +288,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -309,11 +299,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index 7eb2860ebe40b4..0964ab1c480122 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -288,16 +288,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -309,11 +299,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; 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 7b59e70d22e86c..8d5733d7027a5f 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 @@ -290,16 +290,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -311,11 +301,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; 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 8c609e0e857717..0e76a36aae3e85 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 @@ -37,6 +37,18 @@ client cluster Identify = 3 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + request struct TriggerEffectRequest { + IdentifyEffectIdentifier effectIdentifier = 0; + IdentifyEffectVariant effectVariant = 1; + } + + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } server cluster Identify = 3 { @@ -188,25 +200,57 @@ client cluster Scenes = 5 { ExtensionFieldSet extensionFieldSets[] = 4; } + response struct AddSceneResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + } + request struct ViewSceneRequest { group_id groupID = 0; INT8U sceneID = 1; } + response struct ViewSceneResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + optional INT16U transitionTime = 3; + optional CHAR_STRING sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + request struct RemoveSceneRequest { group_id groupID = 0; INT8U sceneID = 1; } + response struct RemoveSceneResponse = 2 { + ENUM8 status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + } + request struct RemoveAllScenesRequest { group_id groupID = 0; } + response struct RemoveAllScenesResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + request struct StoreSceneRequest { group_id groupID = 0; INT8U sceneID = 1; } + response struct StoreSceneResponse = 4 { + ENUM8 status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + } + request struct RecallSceneRequest { group_id groupID = 0; INT8U sceneID = 1; @@ -217,43 +261,53 @@ client cluster Scenes = 5 { group_id groupID = 0; } - response struct AddSceneResponse = 0 { + response struct GetSceneMembershipResponse = 6 { ENUM8 status = 0; - group_id groupID = 1; - INT8U sceneID = 2; + nullable INT8U capacity = 1; + group_id groupID = 2; + optional INT8U sceneList[] = 3; } - response struct ViewSceneResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - INT8U sceneID = 2; - optional INT16U transitionTime = 3; - optional CHAR_STRING sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; + INT16U transitionTime = 2; + CHAR_STRING sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; } - response struct RemoveSceneResponse = 2 { + response struct EnhancedAddSceneResponse = 64 { ENUM8 status = 0; group_id groupID = 1; INT8U sceneID = 2; } - response struct RemoveAllScenesResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; } - response struct StoreSceneResponse = 4 { + response struct EnhancedViewSceneResponse = 65 { ENUM8 status = 0; - group_id groupID = 1; + group_Id groupID = 1; INT8U sceneID = 2; + optional INT16U transitionTime = 3; + optional CHAR_STRING sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; } - response struct GetSceneMembershipResponse = 6 { + request struct CopySceneRequest { + ScenesCopyMode mode = 0; + group_id groupIdentifierFrom = 1; + INT8U sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + INT8U sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { ENUM8 status = 0; - nullable INT8U capacity = 1; - group_id groupID = 2; - optional INT8U sceneList[] = 3; + group_Id groupIdentifierFrom = 1; + INT8U sceneIdentifierFrom = 2; } fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; @@ -263,6 +317,9 @@ client cluster Scenes = 5 { fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; } client cluster OnOff = 6 { @@ -307,9 +364,23 @@ client cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + OnOffEffectIdentifier effectIdentifier = 0; + int8u effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControl onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; command Toggle(): DefaultSuccess = 2; + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } server cluster Descriptor = 29 { @@ -505,16 +576,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -526,11 +587,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; @@ -1847,6 +1918,30 @@ client cluster ColorControl = 768 { BITMAP8 optionsOverride = 6; } + request struct StopMoveStepRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; + } + + request struct MoveColorTemperatureRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + INT16U colorTemperatureMinimumMireds = 2; + INT16U colorTemperatureMaximumMireds = 3; + BITMAP8 optionsMask = 4; + BITMAP8 optionsOverride = 5; + } + + request struct StepColorTemperatureRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + INT16U colorTemperatureMinimumMireds = 3; + INT16U colorTemperatureMaximumMireds = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; command MoveHue(MoveHueRequest): DefaultSuccess = 1; command StepHue(StepHueRequest): DefaultSuccess = 2; @@ -1863,6 +1958,9 @@ client cluster ColorControl = 768 { command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } endpoint 0 { diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 73f3b486a12dbd..1e161ac23a4dd4 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -458,16 +458,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -479,11 +469,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index 0dba423775462d..3500e8495eeea3 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -432,16 +432,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -453,11 +443,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index 27e8f79439d858..9d834376448eef 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -448,16 +448,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -469,11 +459,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter index 0ca16845849b6a..6a42b154aac475 100644 --- a/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter @@ -458,16 +458,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -479,11 +469,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter index 34ecc1a58681f0..4d385620740e39 100644 --- a/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter @@ -458,16 +458,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -479,11 +469,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; 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 0ca16845849b6a..6a42b154aac475 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 @@ -458,16 +458,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -479,11 +469,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 3f175fc88bea6a..3eda18cb740025 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -267,16 +267,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -288,11 +278,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index 163de91d88ab64..4ddc5031fcbd35 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -284,16 +284,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -305,11 +295,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 70fa6cfcede0ac..78d2373c901fff 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -282,6 +282,21 @@ client cluster DiagnosticLogs = 50 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + request struct RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional CHAR_STRING<32> transferFileDesignator = 2; + } + + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + LONG_OCTET_STRING logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } server cluster DiagnosticLogs = 50 { diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index aa541eeaf95d44..7703e5868d8de9 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -351,16 +351,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -372,11 +362,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index e7951c4c0ac5d6..431355947c74b7 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1046,12 +1046,27 @@ client cluster GeneralCommissioning = 48 { INT64U breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationType newRegulatoryConfig = 0; CHAR_STRING countryCode = 1; INT64U breadcrumb = 2; } + response struct SetRegulatoryConfigResponse = 3 { + CommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; @@ -1696,15 +1711,29 @@ client cluster OperationalCredentials = 62 { OCTET_STRING attestationNonce = 0; } + response struct AttestationResponse = 1 { + OCTET_STRING attestationElements = 0; + OCTET_STRING attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + OCTET_STRING certificate = 0; + } + request struct CSRRequestRequest { OCTET_STRING CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + request struct AddNOCRequest { OCTET_STRING NOCValue = 0; optional OCTET_STRING ICACValue = 1; @@ -1718,6 +1747,12 @@ client cluster OperationalCredentials = 62 { optional OCTET_STRING ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional CHAR_STRING debugText = 2; + } + request struct UpdateFabricLabelRequest { CHAR_STRING<32> label = 0; } diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 4027d5b05c70a8..83e613404cf957 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1015,12 +1015,27 @@ client cluster GeneralCommissioning = 48 { INT64U breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationType newRegulatoryConfig = 0; CHAR_STRING countryCode = 1; INT64U breadcrumb = 2; } + response struct SetRegulatoryConfigResponse = 3 { + CommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; @@ -1665,15 +1680,29 @@ client cluster OperationalCredentials = 62 { OCTET_STRING attestationNonce = 0; } + response struct AttestationResponse = 1 { + OCTET_STRING attestationElements = 0; + OCTET_STRING attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + OCTET_STRING certificate = 0; + } + request struct CSRRequestRequest { OCTET_STRING CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + request struct AddNOCRequest { OCTET_STRING NOCValue = 0; optional OCTET_STRING ICACValue = 1; @@ -1687,6 +1716,12 @@ client cluster OperationalCredentials = 62 { optional OCTET_STRING ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional CHAR_STRING debugText = 2; + } + request struct UpdateFabricLabelRequest { CHAR_STRING<32> label = 0; } diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 00ebcb517d0681..373f97b9009088 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -371,16 +371,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -392,11 +382,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index 28c489b5177d1c..b946e34e98496c 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -82,9 +82,23 @@ client cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + OnOffEffectIdentifier effectIdentifier = 0; + int8u effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControl onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; command Toggle(): DefaultSuccess = 2; + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } server cluster Descriptor = 29 { @@ -277,16 +291,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -298,11 +302,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 14a7a104b6c205..22f2349c5bbab4 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -42,7 +42,13 @@ client cluster Identify = 3 { INT16U identifyTime = 0; } + request struct TriggerEffectRequest { + IdentifyEffectIdentifier effectIdentifier = 0; + IdentifyEffectVariant effectVariant = 1; + } + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } server cluster Identify = 3 { @@ -463,16 +469,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -484,11 +480,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 27726bd2435045..7fc27309c83ad8 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -503,17 +503,17 @@ client cluster GeneralCommissioning = 48 { INT64U breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationType newRegulatoryConfig = 0; CHAR_STRING countryCode = 1; INT64U breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningError errorCode = 0; - CHAR_STRING debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningError errorCode = 0; CHAR_STRING debugText = 1; @@ -676,6 +676,13 @@ client cluster NetworkCommissioning = 49 { optional INT64U breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatus networkingStatus = 0; + optional CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { OCTET_STRING<32> ssid = 0; OCTET_STRING<64> credentials = 1; @@ -692,36 +699,29 @@ client cluster NetworkCommissioning = 49 { optional INT64U breadcrumb = 1; } - request struct ConnectNetworkRequest { - OCTET_STRING<32> networkID = 0; - optional INT64U breadcrumb = 1; - } - - request struct ReorderNetworkRequest { - OCTET_STRING<32> networkID = 0; - INT8U networkIndex = 1; - optional INT64U breadcrumb = 2; - } - - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatus networkingStatus = 0; - optional CHAR_STRING debugText = 1; - optional WiFiInterfaceScanResult wiFiScanResults[] = 2; - optional ThreadInterfaceScanResult threadScanResults[] = 3; - } - response struct NetworkConfigResponse = 5 { NetworkCommissioningStatus networkingStatus = 0; optional CHAR_STRING<512> debugText = 1; optional INT8U networkIndex = 2; } + request struct ConnectNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + response struct ConnectNetworkResponse = 7 { NetworkCommissioningStatus networkingStatus = 0; optional CHAR_STRING debugText = 1; nullable INT32S errorValue = 2; } + request struct ReorderNetworkRequest { + OCTET_STRING<32> networkID = 0; + INT8U networkIndex = 1; + optional INT64U breadcrumb = 2; + } + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; @@ -1398,15 +1398,29 @@ client cluster OperationalCredentials = 62 { OCTET_STRING attestationNonce = 0; } + response struct AttestationResponse = 1 { + OCTET_STRING attestationElements = 0; + OCTET_STRING attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + OCTET_STRING certificate = 0; + } + request struct CSRRequestRequest { OCTET_STRING CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + request struct AddNOCRequest { OCTET_STRING NOCValue = 0; optional OCTET_STRING ICACValue = 1; @@ -1415,6 +1429,17 @@ client cluster OperationalCredentials = 62 { VENDOR_ID adminVendorId = 4; } + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional CHAR_STRING debugText = 2; + } + request struct UpdateFabricLabelRequest { CHAR_STRING<32> label = 0; } @@ -1427,30 +1452,11 @@ client cluster OperationalCredentials = 62 { OCTET_STRING rootCACertificate = 0; } - response struct AttestationResponse = 1 { - OCTET_STRING attestationElements = 0; - OCTET_STRING attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - OCTET_STRING certificate = 0; - } - - response struct CSRResponse = 5 { - OCTET_STRING NOCSRElements = 0; - OCTET_STRING attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional CHAR_STRING debugText = 2; - } - command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; 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 5407e91327de6e..6a6265db98c4b4 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 @@ -267,9 +267,23 @@ client cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + OnOffEffectIdentifier effectIdentifier = 0; + int8u effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControl onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; command Toggle(): DefaultSuccess = 2; + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } server cluster OnOff = 6 { @@ -416,6 +430,10 @@ client cluster LevelControl = 8 { LevelControlOptions optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + INT16U frequency = 0; + } + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; command Move(MoveRequest): DefaultSuccess = 1; command Step(StepRequest): DefaultSuccess = 2; @@ -424,6 +442,7 @@ client cluster LevelControl = 8 { command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } server cluster LevelControl = 8 { @@ -1852,6 +1871,11 @@ client cluster Channel = 1284 { CHAR_STRING match = 0; } + response struct ChangeChannelResponse = 1 { + ChannelStatusEnum status = 0; + optional CHAR_STRING data = 1; + } + request struct ChangeChannelByNumberRequest { INT16U majorNumber = 0; INT16U minorNumber = 1; @@ -1892,6 +1916,11 @@ client cluster TargetNavigator = 1285 { optional CHAR_STRING data = 1; } + response struct NavigateTargetResponse = 1 { + TargetNavigatorStatusEnum status = 0; + optional CHAR_STRING data = 1; + } + command NavigateTarget(NavigateTargetRequest): NavigateTargetResponse = 0; } @@ -1944,6 +1973,11 @@ client cluster MediaPlayback = 1286 { INT64U deltaPositionMilliseconds = 0; } + response struct PlaybackResponse = 10 { + MediaPlaybackStatusEnum status = 0; + optional CHAR_STRING data = 1; + } + request struct SeekRequest { INT64U position = 0; } @@ -2125,6 +2159,10 @@ client cluster KeypadInput = 1289 { CecKeyCode keyCode = 0; } + response struct SendKeyResponse = 1 { + KeypadInputStatusEnum status = 0; + } + command SendKey(SendKeyRequest): SendKeyResponse = 0; } @@ -2224,6 +2262,11 @@ client cluster ContentLauncher = 1290 { optional BrandingInformationStruct brandingInformation = 2; } + response struct LauncherResponse = 2 { + ContentLaunchStatusEnum status = 0; + optional CHAR_STRING data = 1; + } + command LaunchContent(LaunchContentRequest): LauncherResponse = 0; command LaunchURL(LaunchURLRequest): LauncherResponse = 1; } @@ -2313,6 +2356,11 @@ client cluster ApplicationLauncher = 1292 { optional ApplicationStruct application = 0; } + response struct LauncherResponse = 3 { + ApplicationLauncherStatusEnum status = 0; + optional OCTET_STRING data = 1; + } + command LaunchApp(LaunchAppRequest): LauncherResponse = 0; command StopApp(StopAppRequest): LauncherResponse = 1; command HideApp(HideAppRequest): LauncherResponse = 2; @@ -2359,6 +2407,10 @@ client cluster AccountLogin = 1294 { CHAR_STRING<100> tempAccountIdentifier = 0; } + response struct GetSetupPINResponse = 1 { + CHAR_STRING setupPIN = 0; + } + request struct LoginRequest { CHAR_STRING<100> tempAccountIdentifier = 0; CHAR_STRING setupPIN = 1; diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 76f47712d12acc..533148aa5ea7f2 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -406,16 +406,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -427,11 +417,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; diff --git a/integrations/docker/images/chip-cert-bins/Dockerfile b/integrations/docker/images/chip-cert-bins/Dockerfile index cef22b4e632eea..94a650d139ae0b 100644 --- a/integrations/docker/images/chip-cert-bins/Dockerfile +++ b/integrations/docker/images/chip-cert-bins/Dockerfile @@ -7,7 +7,7 @@ ARG COMMITHASH=7b99e6399c6069037c613782d78132c69b9dcabb # ZAP Development install, so that it runs on both x64 and arm64 # Generally this should match with the ZAP version that is used for codegen within the # specified SHA -ARG ZAP_VERSION=v2023.03.23-nightly +ARG ZAP_VERSION=v2023.03.27-nightly # Ensure TARGETPLATFORM is set RUN case ${TARGETPLATFORM} in \ diff --git a/scripts/setup/zap.json b/scripts/setup/zap.json index a6a2a4c7d16e95..c27c39a1674dae 100644 --- a/scripts/setup/zap.json +++ b/scripts/setup/zap.json @@ -8,7 +8,7 @@ "mac-arm64", "windows-amd64" ], - "tags": ["version:2@v2023.03.23-nightly.1"] + "tags": ["version:2@v2023.03.27-nightly.1"] } ] } diff --git a/scripts/tools/zap/zap_execution.py b/scripts/tools/zap/zap_execution.py index 0a47b95160cfc3..6e5fbab32fe7e2 100644 --- a/scripts/tools/zap/zap_execution.py +++ b/scripts/tools/zap/zap_execution.py @@ -23,7 +23,7 @@ # Use scripts/tools/zap/version_update.py to manage ZAP versioning as many # files may need updating for versions # -MIN_ZAP_VERSION = '2023.3.23' +MIN_ZAP_VERSION = '2023.3.27' class ZapTool: diff --git a/src/app/zap-templates/templates/app/MatterIDL.zapt b/src/app/zap-templates/templates/app/MatterIDL.zapt index 875b1fb3f562e5..6861166ef75195 100644 --- a/src/app/zap-templates/templates/app/MatterIDL.zapt +++ b/src/app/zap-templates/templates/app/MatterIDL.zapt @@ -82,17 +82,16 @@ {{~!--Close:Generating command request structs for all incoming commands into server side--~}} {{~!--Open:Generating command request structs for all outgoing commands from client side--~}} {{#if (is_client side)}} - {{#all_outgoing_commands_for_cluster name side}} + {{#zcl_commands}} + {{#if (isStrEqual source "client")}} {{~>idl_command_request_struct}} - {{/all_outgoing_commands_for_cluster}} + {{else}} + {{~>idl_command_response_struct}} + {{/if}} + {{/zcl_commands}} {{/if}} {{~!--Close:Generating command request structs for all outgoing commands from client side--~}} {{~!--Open:Generating command response structs for all incoming commands into client side--~}} - {{#if (is_client side)}} - {{#all_incoming_commands_for_cluster name side}} - {{~>idl_command_response_struct}} - {{/all_incoming_commands_for_cluster}} - {{/if}} {{~!--Close:Generating command response structs for all incoming commands into client side--~}} {{~!--Open:Generating command response structs for all outgoing commands from server side--~}} {{#if (is_server side)}} @@ -107,9 +106,9 @@ {{/all_incoming_commands_for_cluster}} {{/if}} {{#if (is_client side)}} - {{#all_outgoing_commands_for_cluster name side}} + {{#zcl_commands_source_client}} {{~>idl_command_request_response}}{{~new_line 1~}} - {{/all_outgoing_commands_for_cluster}} + {{/zcl_commands_source_client}} {{/if}} } diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 0779181c512f58..0e313ecd0b564b 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -74,44 +74,44 @@ client cluster Groups = 4 { CHAR_STRING groupName = 1; } - request struct ViewGroupRequest { - group_id groupID = 0; - } - - request struct GetGroupMembershipRequest { - group_id groupList[] = 0; - } - - request struct RemoveGroupRequest { - group_id groupID = 0; - } - - request struct AddGroupIfIdentifyingRequest { - group_id groupID = 0; - CHAR_STRING groupName = 1; - } - response struct AddGroupResponse = 0 { ENUM8 status = 0; group_id groupID = 1; } + request struct ViewGroupRequest { + group_id groupID = 0; + } + response struct ViewGroupResponse = 1 { ENUM8 status = 0; group_id groupID = 1; CHAR_STRING groupName = 2; } + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + response struct GetGroupMembershipResponse = 2 { nullable INT8U capacity = 0; group_id groupList[] = 1; } + request struct RemoveGroupRequest { + group_id groupID = 0; + } + response struct RemoveGroupResponse = 3 { ENUM8 status = 0; group_id groupID = 1; } + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; @@ -160,25 +160,57 @@ client cluster Scenes = 5 { ExtensionFieldSet extensionFieldSets[] = 4; } + response struct AddSceneResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + } + request struct ViewSceneRequest { group_id groupID = 0; INT8U sceneID = 1; } + response struct ViewSceneResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + optional INT16U transitionTime = 3; + optional CHAR_STRING sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + request struct RemoveSceneRequest { group_id groupID = 0; INT8U sceneID = 1; } + response struct RemoveSceneResponse = 2 { + ENUM8 status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + } + request struct RemoveAllScenesRequest { group_id groupID = 0; } + response struct RemoveAllScenesResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + request struct StoreSceneRequest { group_id groupID = 0; INT8U sceneID = 1; } + response struct StoreSceneResponse = 4 { + ENUM8 status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + } + request struct RecallSceneRequest { group_id groupID = 0; INT8U sceneID = 1; @@ -189,43 +221,53 @@ client cluster Scenes = 5 { group_id groupID = 0; } - response struct AddSceneResponse = 0 { + response struct GetSceneMembershipResponse = 6 { ENUM8 status = 0; - group_id groupID = 1; - INT8U sceneID = 2; + nullable INT8U capacity = 1; + group_id groupID = 2; + optional INT8U sceneList[] = 3; } - response struct ViewSceneResponse = 1 { - ENUM8 status = 0; - group_id groupID = 1; - INT8U sceneID = 2; - optional INT16U transitionTime = 3; - optional CHAR_STRING sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; + INT16U transitionTime = 2; + CHAR_STRING sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; } - response struct RemoveSceneResponse = 2 { + response struct EnhancedAddSceneResponse = 64 { ENUM8 status = 0; group_id groupID = 1; INT8U sceneID = 2; } - response struct RemoveAllScenesResponse = 3 { - ENUM8 status = 0; - group_id groupID = 1; + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; } - response struct StoreSceneResponse = 4 { + response struct EnhancedViewSceneResponse = 65 { ENUM8 status = 0; - group_id groupID = 1; + group_Id groupID = 1; INT8U sceneID = 2; + optional INT16U transitionTime = 3; + optional CHAR_STRING sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; } - response struct GetSceneMembershipResponse = 6 { + request struct CopySceneRequest { + ScenesCopyMode mode = 0; + group_id groupIdentifierFrom = 1; + INT8U sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + INT8U sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { ENUM8 status = 0; - nullable INT8U capacity = 1; - group_id groupID = 2; - optional INT8U sceneList[] = 3; + group_Id groupIdentifierFrom = 1; + INT8U sceneIdentifierFrom = 2; } fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; @@ -235,6 +277,9 @@ client cluster Scenes = 5 { fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; } client cluster OnOff = 6 { @@ -406,6 +451,10 @@ client cluster LevelControl = 8 { LevelControlOptions optionsOverride = 1; } + request struct MoveToClosestFrequencyRequest { + INT16U frequency = 0; + } + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; command Move(MoveRequest): DefaultSuccess = 1; command Step(StepRequest): DefaultSuccess = 2; @@ -414,6 +463,7 @@ client cluster LevelControl = 8 { command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; + command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } client cluster BinaryInputBasic = 15 { @@ -748,6 +798,8 @@ client cluster BasicInformation = 40 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; } client cluster OtaSoftwareUpdateProvider = 41 { @@ -789,16 +841,6 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; - } - - request struct NotifyUpdateAppliedRequest { - OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; - } - response struct QueryImageResponse = 1 { OTAQueryStatus status = 0; optional INT32U delayedActionTime = 1; @@ -810,11 +852,21 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForRequestor = 7; } + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + response struct ApplyUpdateResponse = 3 { OTAApplyUpdateAction action = 0; INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + command QueryImage(QueryImageRequest): QueryImageResponse = 0; command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; @@ -1259,17 +1311,17 @@ client cluster GeneralCommissioning = 48 { INT64U breadcrumb = 1; } + response struct ArmFailSafeResponse = 1 { + CommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + request struct SetRegulatoryConfigRequest { RegulatoryLocationType newRegulatoryConfig = 0; CHAR_STRING countryCode = 1; INT64U breadcrumb = 2; } - response struct ArmFailSafeResponse = 1 { - CommissioningError errorCode = 0; - CHAR_STRING debugText = 1; - } - response struct SetRegulatoryConfigResponse = 3 { CommissioningError errorCode = 0; CHAR_STRING debugText = 1; @@ -1369,6 +1421,13 @@ client cluster NetworkCommissioning = 49 { optional INT64U breadcrumb = 1; } + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatus networkingStatus = 0; + optional CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + request struct AddOrUpdateWiFiNetworkRequest { OCTET_STRING<32> ssid = 0; OCTET_STRING<64> credentials = 1; @@ -1385,36 +1444,29 @@ client cluster NetworkCommissioning = 49 { optional INT64U breadcrumb = 1; } - request struct ConnectNetworkRequest { - OCTET_STRING<32> networkID = 0; - optional INT64U breadcrumb = 1; - } - - request struct ReorderNetworkRequest { - OCTET_STRING<32> networkID = 0; - INT8U networkIndex = 1; - optional INT64U breadcrumb = 2; - } - - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatus networkingStatus = 0; - optional CHAR_STRING debugText = 1; - optional WiFiInterfaceScanResult wiFiScanResults[] = 2; - optional ThreadInterfaceScanResult threadScanResults[] = 3; - } - response struct NetworkConfigResponse = 5 { NetworkCommissioningStatus networkingStatus = 0; optional CHAR_STRING<512> debugText = 1; optional INT8U networkIndex = 2; } + request struct ConnectNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + response struct ConnectNetworkResponse = 7 { NetworkCommissioningStatus networkingStatus = 0; optional CHAR_STRING debugText = 1; nullable INT32S errorValue = 2; } + request struct ReorderNetworkRequest { + OCTET_STRING<32> networkID = 0; + INT8U networkIndex = 1; + optional INT64U breadcrumb = 2; + } + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; @@ -2054,15 +2106,29 @@ client cluster OperationalCredentials = 62 { OCTET_STRING attestationNonce = 0; } + response struct AttestationResponse = 1 { + OCTET_STRING attestationElements = 0; + OCTET_STRING attestationSignature = 1; + } + request struct CertificateChainRequestRequest { CertificateChainTypeEnum certificateType = 0; } + response struct CertificateChainResponse = 3 { + OCTET_STRING certificate = 0; + } + request struct CSRRequestRequest { OCTET_STRING CSRNonce = 0; optional boolean isForUpdateNOC = 1; } + response struct CSRResponse = 5 { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + request struct AddNOCRequest { OCTET_STRING NOCValue = 0; optional OCTET_STRING ICACValue = 1; @@ -2076,6 +2142,12 @@ client cluster OperationalCredentials = 62 { optional OCTET_STRING ICACValue = 1; } + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional CHAR_STRING debugText = 2; + } + request struct UpdateFabricLabelRequest { CHAR_STRING<32> label = 0; } @@ -2088,26 +2160,6 @@ client cluster OperationalCredentials = 62 { OCTET_STRING rootCACertificate = 0; } - response struct AttestationResponse = 1 { - OCTET_STRING attestationElements = 0; - OCTET_STRING attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - OCTET_STRING certificate = 0; - } - - response struct CSRResponse = 5 { - OCTET_STRING NOCSRElements = 0; - OCTET_STRING attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional CHAR_STRING debugText = 2; - } - command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; @@ -2167,6 +2219,10 @@ client cluster GroupKeyManagement = 63 { INT16U groupKeySetID = 0; } + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + request struct KeySetRemoveRequest { INT16U groupKeySetID = 0; } @@ -2175,10 +2231,6 @@ client cluster GroupKeyManagement = 63 { INT16U groupKeySetIDs[] = 0; } - response struct KeySetReadResponse = 2 { - GroupKeySetStruct groupKeySet = 0; - } - response struct KeySetReadAllIndicesResponse = 5 { INT16U groupKeySetIDs[] = 0; } @@ -2714,6 +2766,17 @@ client cluster DoorLock = 257 { INT16U userIndex = 1; } + response struct GetWeekDayScheduleResponse = 12 { + INT8U weekDayIndex = 0; + INT16U userIndex = 1; + DlStatus status = 2; + optional DaysMaskMap daysMask = 3; + optional INT8U startHour = 4; + optional INT8U startMinute = 5; + optional INT8U endHour = 6; + optional INT8U endMinute = 7; + } + request struct ClearWeekDayScheduleRequest { INT8U weekDayIndex = 0; INT16U userIndex = 1; @@ -2731,6 +2794,14 @@ client cluster DoorLock = 257 { INT16U userIndex = 1; } + response struct GetYearDayScheduleResponse = 15 { + INT8U yearDayIndex = 0; + INT16U userIndex = 1; + DlStatus status = 2; + optional epoch_s localStartTime = 3; + optional epoch_s localEndTime = 4; + } + request struct ClearYearDayScheduleRequest { INT8U yearDayIndex = 0; INT16U userIndex = 1; @@ -2747,6 +2818,14 @@ client cluster DoorLock = 257 { INT8U holidayIndex = 0; } + response struct GetHolidayScheduleResponse = 18 { + INT8U holidayIndex = 0; + DlStatus status = 1; + optional epoch_s localStartTime = 2; + optional epoch_s localEndTime = 3; + optional OperatingModeEnum operatingMode = 4; + } + request struct ClearHolidayScheduleRequest { INT8U holidayIndex = 0; } @@ -2765,54 +2844,6 @@ client cluster DoorLock = 257 { INT16U userIndex = 0; } - request struct ClearUserRequest { - INT16U userIndex = 0; - } - - request struct SetCredentialRequest { - DataOperationTypeEnum operationType = 0; - CredentialStruct credential = 1; - LONG_OCTET_STRING credentialData = 2; - nullable INT16U userIndex = 3; - nullable UserStatusEnum userStatus = 4; - nullable UserTypeEnum userType = 5; - } - - request struct GetCredentialStatusRequest { - CredentialStruct credential = 0; - } - - request struct ClearCredentialRequest { - nullable CredentialStruct credential = 0; - } - - response struct GetWeekDayScheduleResponse = 12 { - INT8U weekDayIndex = 0; - INT16U userIndex = 1; - DlStatus status = 2; - optional DaysMaskMap daysMask = 3; - optional INT8U startHour = 4; - optional INT8U startMinute = 5; - optional INT8U endHour = 6; - optional INT8U endMinute = 7; - } - - response struct GetYearDayScheduleResponse = 15 { - INT8U yearDayIndex = 0; - INT16U userIndex = 1; - DlStatus status = 2; - optional epoch_s localStartTime = 3; - optional epoch_s localEndTime = 4; - } - - response struct GetHolidayScheduleResponse = 18 { - INT8U holidayIndex = 0; - DlStatus status = 1; - optional epoch_s localStartTime = 2; - optional epoch_s localEndTime = 3; - optional OperatingModeEnum operatingMode = 4; - } - response struct GetUserResponse = 28 { INT16U userIndex = 0; nullable CHAR_STRING userName = 1; @@ -2826,12 +2857,29 @@ client cluster DoorLock = 257 { nullable INT16U nextUserIndex = 9; } + request struct ClearUserRequest { + INT16U userIndex = 0; + } + + request struct SetCredentialRequest { + DataOperationTypeEnum operationType = 0; + CredentialStruct credential = 1; + LONG_OCTET_STRING credentialData = 2; + nullable INT16U userIndex = 3; + nullable UserStatusEnum userStatus = 4; + nullable UserTypeEnum userType = 5; + } + response struct SetCredentialResponse = 35 { DlStatus status = 0; nullable INT16U userIndex = 1; nullable INT16U nextCredentialIndex = 2; } + request struct GetCredentialStatusRequest { + CredentialStruct credential = 0; + } + response struct GetCredentialStatusResponse = 37 { boolean credentialExists = 0; nullable INT16U userIndex = 1; @@ -2840,6 +2888,10 @@ client cluster DoorLock = 257 { nullable INT16U nextCredentialIndex = 4; } + request struct ClearCredentialRequest { + nullable CredentialStruct credential = 0; + } + timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; timed command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; timed command UnlockWithTimeout(UnlockWithTimeoutRequest): DefaultSuccess = 3; @@ -3276,25 +3328,25 @@ client cluster Thermostat = 513 { INT8S amount = 1; } - request struct SetWeeklyScheduleRequest { + response struct GetWeeklyScheduleResponse = 0 { INT8U numberOfTransitionsForSequence = 0; DayOfWeek dayOfWeekForSequence = 1; ModeForSequence modeForSequence = 2; ThermostatScheduleTransition transitions[] = 3; } - request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; - } - - response struct GetWeeklyScheduleResponse = 0 { + request struct SetWeeklyScheduleRequest { INT8U numberOfTransitionsForSequence = 0; DayOfWeek dayOfWeekForSequence = 1; ModeForSequence modeForSequence = 2; ThermostatScheduleTransition transitions[] = 3; } + request struct GetWeeklyScheduleRequest { + DayOfWeek daysToReturn = 0; + ModeForSequence modeToReturn = 1; + } + command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; @@ -3869,6 +3921,11 @@ client cluster Channel = 1284 { CHAR_STRING match = 0; } + response struct ChangeChannelResponse = 1 { + ChannelStatusEnum status = 0; + optional CHAR_STRING data = 1; + } + request struct ChangeChannelByNumberRequest { INT16U majorNumber = 0; INT16U minorNumber = 1; @@ -3878,11 +3935,6 @@ client cluster Channel = 1284 { INT16U count = 0; } - response struct ChangeChannelResponse = 1 { - ChannelStatusEnum status = 0; - optional CHAR_STRING data = 1; - } - command ChangeChannel(ChangeChannelRequest): ChangeChannelResponse = 0; command ChangeChannelByNumber(ChangeChannelByNumberRequest): DefaultSuccess = 2; command SkipChannel(SkipChannelRequest): DefaultSuccess = 3; @@ -3971,15 +4023,15 @@ client cluster MediaPlayback = 1286 { INT64U deltaPositionMilliseconds = 0; } - request struct SeekRequest { - INT64U position = 0; - } - response struct PlaybackResponse = 10 { MediaPlaybackStatusEnum status = 0; optional CHAR_STRING data = 1; } + request struct SeekRequest { + INT64U position = 0; + } + command Play(): PlaybackResponse = 0; command Pause(): PlaybackResponse = 1; command Stop(): PlaybackResponse = 2; @@ -4416,15 +4468,15 @@ client cluster AccountLogin = 1294 { CHAR_STRING<100> tempAccountIdentifier = 0; } + response struct GetSetupPINResponse = 1 { + CHAR_STRING setupPIN = 0; + } + request struct LoginRequest { CHAR_STRING<100> tempAccountIdentifier = 0; CHAR_STRING setupPIN = 1; } - response struct GetSetupPINResponse = 1 { - CHAR_STRING setupPIN = 0; - } - timed command GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; timed command Login(LoginRequest): DefaultSuccess = 2; timed command Logout(): DefaultSuccess = 3; @@ -4565,6 +4617,31 @@ client cluster ElectricalMeasurement = 2820 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + response struct GetProfileInfoResponseCommand = 0 { + INT8U profileCount = 0; + ENUM8 profileIntervalPeriod = 1; + INT8U maxNumberOfIntervals = 2; + INT16U listOfAttributes[] = 3; + } + + response struct GetMeasurementProfileResponseCommand = 1 { + INT32U startTime = 0; + ENUM8 status = 1; + ENUM8 profileIntervalPeriod = 2; + INT8U numberOfIntervalsDelivered = 3; + INT16U attributeId = 4; + INT8U intervals[] = 5; + } + + request struct GetMeasurementProfileCommandRequest { + INT16U attributeId = 0; + INT32U startTime = 1; + ENUM8 numberOfIntervals = 2; + } + + command GetProfileInfoCommand(): DefaultSuccess = 0; + command GetMeasurementProfileCommand(GetMeasurementProfileCommandRequest): DefaultSuccess = 1; } client cluster ClientMonitoring = 4166 { @@ -4597,6 +4674,7 @@ client cluster ClientMonitoring = 4166 { command access(invoke: manage) RegisterClientMonitoring(RegisterClientMonitoringRequest): DefaultSuccess = 0; command access(invoke: manage) UnregisterClientMonitoring(UnregisterClientMonitoringRequest): DefaultSuccess = 1; + command access(invoke: manage) StayAwakeRequest(): DefaultSuccess = 2; } client cluster UnitTesting = 4294048773 { @@ -4805,31 +4883,128 @@ client cluster UnitTesting = 4294048773 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + response struct TestSpecificResponse = 0 { + INT8U returnValue = 0; + } + + response struct TestAddArgumentsResponse = 1 { + INT8U returnValue = 0; + } + + response struct TestSimpleArgumentResponse = 2 { + BOOLEAN returnValue = 0; + } + + response struct TestStructArrayArgumentResponse = 3 { + NestedStructList arg1[] = 0; + SimpleStruct arg2[] = 1; + SimpleEnum arg3[] = 2; + BOOLEAN arg4[] = 3; + SimpleEnum arg5 = 4; + BOOLEAN arg6 = 5; + } + request struct TestAddArgumentsRequest { INT8U arg1 = 0; INT8U arg2 = 1; } + response struct TestListInt8UReverseResponse = 4 { + INT8U arg1[] = 0; + } + + request struct TestSimpleArgumentRequestRequest { + BOOLEAN arg1 = 0; + } + + response struct TestEnumsResponse = 5 { + vendor_id arg1 = 0; + SimpleEnum arg2 = 1; + } + + request struct TestStructArrayArgumentRequestRequest { + NestedStructList arg1[] = 0; + SimpleStruct arg2[] = 1; + SimpleEnum arg3[] = 2; + BOOLEAN arg4[] = 3; + SimpleEnum arg5 = 4; + BOOLEAN arg6 = 5; + } + + response struct TestNullableOptionalResponse = 6 { + BOOLEAN wasPresent = 0; + optional BOOLEAN wasNull = 1; + optional INT8U value = 2; + optional nullable INT8U originalValue = 3; + } + request struct TestStructArgumentRequestRequest { SimpleStruct arg1 = 0; } + response struct TestComplexNullableOptionalResponse = 7 { + BOOLEAN nullableIntWasNull = 0; + optional INT16U nullableIntValue = 1; + BOOLEAN optionalIntWasPresent = 2; + optional INT16U optionalIntValue = 3; + BOOLEAN nullableOptionalIntWasPresent = 4; + optional BOOLEAN nullableOptionalIntWasNull = 5; + optional INT16U nullableOptionalIntValue = 6; + BOOLEAN nullableStringWasNull = 7; + optional CHAR_STRING nullableStringValue = 8; + BOOLEAN optionalStringWasPresent = 9; + optional CHAR_STRING optionalStringValue = 10; + BOOLEAN nullableOptionalStringWasPresent = 11; + optional BOOLEAN nullableOptionalStringWasNull = 12; + optional CHAR_STRING nullableOptionalStringValue = 13; + BOOLEAN nullableStructWasNull = 14; + optional SimpleStruct nullableStructValue = 15; + BOOLEAN optionalStructWasPresent = 16; + optional SimpleStruct optionalStructValue = 17; + BOOLEAN nullableOptionalStructWasPresent = 18; + optional BOOLEAN nullableOptionalStructWasNull = 19; + optional SimpleStruct nullableOptionalStructValue = 20; + BOOLEAN nullableListWasNull = 21; + optional SimpleEnum nullableListValue[] = 22; + BOOLEAN optionalListWasPresent = 23; + optional SimpleEnum optionalListValue[] = 24; + BOOLEAN nullableOptionalListWasPresent = 25; + optional BOOLEAN nullableOptionalListWasNull = 26; + optional SimpleEnum nullableOptionalListValue[] = 27; + } + request struct TestNestedStructArgumentRequestRequest { NestedStruct arg1 = 0; } + response struct BooleanResponse = 8 { + BOOLEAN value = 0; + } + request struct TestListStructArgumentRequestRequest { SimpleStruct arg1[] = 0; } + response struct SimpleStructResponse = 9 { + SimpleStruct arg1 = 0; + } + request struct TestListInt8UArgumentRequestRequest { INT8U arg1[] = 0; } + response struct TestEmitTestEventResponse = 10 { + INT64U value = 0; + } + request struct TestNestedStructListArgumentRequestRequest { NestedStructList arg1 = 0; } + response struct TestEmitTestFabricScopedEventResponse = 11 { + INT64U value = 0; + } + request struct TestListNestedStructListArgumentRequestRequest { NestedStructList arg1[] = 0; } @@ -4847,6 +5022,21 @@ client cluster UnitTesting = 4294048773 { optional nullable INT8U arg1 = 0; } + request struct TestComplexNullableOptionalRequestRequest { + nullable INT16U nullableInt = 0; + optional INT16U optionalInt = 1; + optional nullable INT16U nullableOptionalInt = 2; + nullable CHAR_STRING nullableString = 3; + optional CHAR_STRING optionalString = 4; + optional nullable CHAR_STRING nullableOptionalString = 5; + nullable SimpleStruct nullableStruct = 6; + optional SimpleStruct optionalStruct = 7; + optional nullable SimpleStruct nullableOptionalStruct = 8; + nullable SimpleEnum nullableList[] = 9; + optional SimpleEnum optionalList[] = 10; + optional nullable SimpleEnum nullableOptionalList[] = 11; + } + request struct SimpleStructEchoRequestRequest { SimpleStruct arg1 = 0; } @@ -4861,40 +5051,8 @@ client cluster UnitTesting = 4294048773 { BOOLEAN arg3 = 2; } - response struct TestSpecificResponse = 0 { - INT8U returnValue = 0; - } - - response struct TestAddArgumentsResponse = 1 { - INT8U returnValue = 0; - } - - response struct TestListInt8UReverseResponse = 4 { - INT8U arg1[] = 0; - } - - response struct TestEnumsResponse = 5 { - vendor_id arg1 = 0; - SimpleEnum arg2 = 1; - } - - response struct TestNullableOptionalResponse = 6 { - BOOLEAN wasPresent = 0; - optional BOOLEAN wasNull = 1; - optional INT8U value = 2; - optional nullable INT8U originalValue = 3; - } - - response struct BooleanResponse = 8 { - BOOLEAN value = 0; - } - - response struct SimpleStructResponse = 9 { - SimpleStruct arg1 = 0; - } - - response struct TestEmitTestEventResponse = 10 { - INT64U value = 0; + request struct TestEmitTestFabricScopedEventRequestRequest { + INT8U arg1 = 0; } command Test(): DefaultSuccess = 0; @@ -4902,6 +5060,8 @@ client cluster UnitTesting = 4294048773 { command TestSpecific(): TestSpecificResponse = 2; command TestUnknownCommand(): DefaultSuccess = 3; command TestAddArguments(TestAddArgumentsRequest): TestAddArgumentsResponse = 4; + command TestSimpleArgumentRequest(TestSimpleArgumentRequestRequest): TestSimpleArgumentResponse = 5; + command TestStructArrayArgumentRequest(TestStructArrayArgumentRequestRequest): TestStructArrayArgumentResponse = 6; command TestStructArgumentRequest(TestStructArgumentRequestRequest): BooleanResponse = 7; command TestNestedStructArgumentRequest(TestNestedStructArgumentRequestRequest): BooleanResponse = 8; command TestListStructArgumentRequest(TestListStructArgumentRequestRequest): BooleanResponse = 9; @@ -4911,10 +5071,12 @@ client cluster UnitTesting = 4294048773 { command TestListInt8UReverseRequest(TestListInt8UReverseRequestRequest): TestListInt8UReverseResponse = 13; command TestEnumsRequest(TestEnumsRequestRequest): TestEnumsResponse = 14; command TestNullableOptionalRequest(TestNullableOptionalRequestRequest): TestNullableOptionalResponse = 15; + command TestComplexNullableOptionalRequest(TestComplexNullableOptionalRequestRequest): TestComplexNullableOptionalResponse = 16; command SimpleStructEchoRequest(SimpleStructEchoRequestRequest): SimpleStructResponse = 17; timed command TimedInvokeRequest(): DefaultSuccess = 18; command TestSimpleOptionalArgumentRequest(TestSimpleOptionalArgumentRequestRequest): DefaultSuccess = 19; command TestEmitTestEventRequest(TestEmitTestEventRequestRequest): TestEmitTestEventResponse = 20; + command TestEmitTestFabricScopedEventRequest(TestEmitTestFabricScopedEventRequestRequest): TestEmitTestFabricScopedEventResponse = 21; } endpoint 1 { diff --git a/src/controller/java/templates/CHIPInvokeCallbacks-src.zapt b/src/controller/java/templates/CHIPInvokeCallbacks-src.zapt index f5f8b8cdf4b288..9f4d999174ce21 100644 --- a/src/controller/java/templates/CHIPInvokeCallbacks-src.zapt +++ b/src/controller/java/templates/CHIPInvokeCallbacks-src.zapt @@ -1,5 +1,4 @@ {{> header}} -{{#if (chip_has_client_clusters)}} #include #include "CHIPInvokeCallbacks.h" @@ -15,8 +14,8 @@ namespace chip { -{{#chip_client_clusters}} -{{#chip_cluster_responses}} +{{#all_user_clusters}} + {{#zcl_commands_source_server}} CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callback::CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callback(jobject javaCallback): Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -61,16 +60,15 @@ void CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callbac // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "({{#chip_cluster_response_arguments}}{{asJniSignature type null parent.parent.name true}}{{/chip_cluster_response_arguments}})V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "({{#zcl_command_arguments}}{{asJniSignature type null parent.parent.name true}}{{/zcl_command_arguments}})V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - {{#chip_cluster_response_arguments}} + {{#zcl_command_arguments}} {{>decode_value source=(concat "dataResponse." (asLowerCamelCase name)) target=(asSymbol label) cluster=(asUpperCamelCase parent.parent.name) depth=0}} - {{/chip_cluster_response_arguments}} + {{/zcl_command_arguments}} - env->CallVoidMethod(javaCallbackRef, javaMethod{{#chip_cluster_response_arguments}}, {{asSymbol label}}{{/chip_cluster_response_arguments}}); + env->CallVoidMethod(javaCallbackRef, javaMethod{{#zcl_command_arguments}}, {{asSymbol label}}{{/zcl_command_arguments}}); } -{{/chip_cluster_responses}} -{{/chip_client_clusters}} + {{/zcl_commands_source_server}} +{{/all_user_clusters}} } // namespace chip -{{/if}} diff --git a/src/controller/java/templates/CHIPInvokeCallbacks.zapt b/src/controller/java/templates/CHIPInvokeCallbacks.zapt index d0058b4435a506..81fe85ffc713f0 100644 --- a/src/controller/java/templates/CHIPInvokeCallbacks.zapt +++ b/src/controller/java/templates/CHIPInvokeCallbacks.zapt @@ -8,22 +8,22 @@ namespace chip { -{{#chip_client_clusters}} -{{#chip_cluster_responses}} -class CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callback : public Callback::Callback +{{#all_user_clusters}} + {{#zcl_commands_source_server}} +class CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase commandName}}Callback : public Callback::Callback { public: - CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callback(jobject javaCallback); + CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase commandName}}Callback(jobject javaCallback); - ~CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callback(); + ~CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase commandName}}Callback(); + + static void CallbackFn(void * context, const chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase commandName}}::DecodableType & data); - static void CallbackFn(void * context, const chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::DecodableType & data); - private: jobject javaCallbackRef; }; -{{/chip_cluster_responses}} -{{/chip_client_clusters}} + {{/zcl_commands_source_server}} +{{/all_user_clusters}} } // namespace chip {{/if}} diff --git a/src/controller/java/templates/CHIPReadCallbacks.zapt b/src/controller/java/templates/CHIPReadCallbacks.zapt index 44df0869f95515..f15b4ec9e0f1bf 100644 --- a/src/controller/java/templates/CHIPReadCallbacks.zapt +++ b/src/controller/java/templates/CHIPReadCallbacks.zapt @@ -1,5 +1,4 @@ {{> header}} -{{#if (chip_has_client_clusters)}} #include #include @@ -36,7 +35,7 @@ private: {{/unless}} {{/chip_server_global_responses}} -{{#chip_client_clusters}} +{{#all_user_clusters}} {{#zcl_attributes_server removeKeys='isOptional'}} {{#if_unsupported_attribute_callback type isArray ../id}} {{else}} @@ -70,6 +69,4 @@ private: {{/if_unsupported_attribute_callback}} {{/zcl_attributes_server}} -{{/chip_client_clusters}} - -{{/if}} +{{/all_user_clusters}} diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 88afa7fa20233d..f2527732efb160 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -888,6 +888,353 @@ void CHIPScenesClusterGetSceneMembershipResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Capacity, GroupID, SceneList); } +CHIPScenesClusterEnhancedAddSceneResponseCallback::CHIPScenesClusterEnhancedAddSceneResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPScenesClusterEnhancedAddSceneResponseCallback::~CHIPScenesClusterEnhancedAddSceneResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPScenesClusterEnhancedAddSceneResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), + dataResponse.status, Status); + jobject GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), + dataResponse.groupID, GroupID); + jobject SceneID; + std::string SceneIDClassName = "java/lang/Integer"; + std::string SceneIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), + dataResponse.sceneID, SceneID); + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); +} +CHIPScenesClusterEnhancedViewSceneResponseCallback::CHIPScenesClusterEnhancedViewSceneResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPScenesClusterEnhancedViewSceneResponseCallback::~CHIPScenesClusterEnhancedViewSceneResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPScenesClusterEnhancedViewSceneResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), + dataResponse.status, Status); + jobject GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), + dataResponse.groupID, GroupID); + jobject SceneID; + std::string SceneIDClassName = "java/lang/Integer"; + std::string SceneIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), + dataResponse.sceneID, SceneID); + jobject TransitionTime; + if (!dataResponse.transitionTime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, TransitionTime); + } + else + { + jobject TransitionTimeInsideOptional; + std::string TransitionTimeInsideOptionalClassName = "java/lang/Integer"; + std::string TransitionTimeInsideOptionalCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + TransitionTimeInsideOptionalClassName.c_str(), TransitionTimeInsideOptionalCtorSignature.c_str(), + dataResponse.transitionTime.Value(), TransitionTimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(TransitionTimeInsideOptional, TransitionTime); + } + jobject SceneName; + if (!dataResponse.sceneName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, SceneName); + } + else + { + jobject SceneNameInsideOptional; + SceneNameInsideOptional = + env->NewStringUTF(std::string(dataResponse.sceneName.Value().data(), dataResponse.sceneName.Value().size()).c_str()); + chip::JniReferences::GetInstance().CreateOptional(SceneNameInsideOptional, SceneName); + } + jobject ExtensionFieldSets; + if (!dataResponse.extensionFieldSets.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, ExtensionFieldSets); + } + else + { + jobject ExtensionFieldSetsInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(ExtensionFieldSetsInsideOptional); + + auto iter_ExtensionFieldSetsInsideOptional_1 = dataResponse.extensionFieldSets.Value().begin(); + while (iter_ExtensionFieldSetsInsideOptional_1.Next()) + { + auto & entry_1 = iter_ExtensionFieldSetsInsideOptional_1.GetValue(); + jobject newElement_1; + jobject newElement_1_clusterID; + std::string newElement_1_clusterIDClassName = "java/lang/Long"; + std::string newElement_1_clusterIDCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_clusterIDClassName.c_str(), + newElement_1_clusterIDCtorSignature.c_str(), + entry_1.clusterID, newElement_1_clusterID); + jobject newElement_1_attributeValueList; + chip::JniReferences::GetInstance().CreateArrayList(newElement_1_attributeValueList); + + auto iter_newElement_1_attributeValueList_3 = entry_1.attributeValueList.begin(); + while (iter_newElement_1_attributeValueList_3.Next()) + { + auto & entry_3 = iter_newElement_1_attributeValueList_3.GetValue(); + jobject newElement_3; + jobject newElement_3_attributeID; + if (!entry_3.attributeID.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_3_attributeID); + } + else + { + jobject newElement_3_attributeIDInsideOptional; + std::string newElement_3_attributeIDInsideOptionalClassName = "java/lang/Long"; + std::string newElement_3_attributeIDInsideOptionalCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_3_attributeIDInsideOptionalClassName.c_str(), + newElement_3_attributeIDInsideOptionalCtorSignature.c_str(), entry_3.attributeID.Value(), + newElement_3_attributeIDInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_3_attributeIDInsideOptional, + newElement_3_attributeID); + } + jobject newElement_3_attributeValue; + chip::JniReferences::GetInstance().CreateArrayList(newElement_3_attributeValue); + + auto iter_newElement_3_attributeValue_5 = entry_3.attributeValue.begin(); + while (iter_newElement_3_attributeValue_5.Next()) + { + auto & entry_5 = iter_newElement_3_attributeValue_5.GetValue(); + jobject newElement_5; + std::string newElement_5ClassName = "java/lang/Integer"; + std::string newElement_5CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_5ClassName.c_str(), newElement_5CtorSignature.c_str(), entry_5, newElement_5); + chip::JniReferences::GetInstance().AddToList(newElement_3_attributeValue, newElement_5); + } + + jclass attributeValuePairStructClass_4; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ScenesClusterAttributeValuePair", attributeValuePairStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ScenesClusterAttributeValuePair"); + return; + } + jmethodID attributeValuePairStructCtor_4 = + env->GetMethodID(attributeValuePairStructClass_4, "", "(Ljava/util/Optional;Ljava/util/ArrayList;)V"); + if (attributeValuePairStructCtor_4 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ScenesClusterAttributeValuePair constructor"); + return; + } + + newElement_3 = env->NewObject(attributeValuePairStructClass_4, attributeValuePairStructCtor_4, + newElement_3_attributeID, newElement_3_attributeValue); + chip::JniReferences::GetInstance().AddToList(newElement_1_attributeValueList, newElement_3); + } + + jclass extensionFieldSetStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ScenesClusterExtensionFieldSet", extensionFieldSetStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ScenesClusterExtensionFieldSet"); + return; + } + jmethodID extensionFieldSetStructCtor_2 = + env->GetMethodID(extensionFieldSetStructClass_2, "", "(Ljava/lang/Long;Ljava/util/ArrayList;)V"); + if (extensionFieldSetStructCtor_2 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ScenesClusterExtensionFieldSet constructor"); + return; + } + + newElement_1 = env->NewObject(extensionFieldSetStructClass_2, extensionFieldSetStructCtor_2, newElement_1_clusterID, + newElement_1_attributeValueList); + chip::JniReferences::GetInstance().AddToList(ExtensionFieldSetsInsideOptional, newElement_1); + } + chip::JniReferences::GetInstance().CreateOptional(ExtensionFieldSetsInsideOptional, ExtensionFieldSets); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID, TransitionTime, SceneName, ExtensionFieldSets); +} +CHIPScenesClusterCopySceneResponseCallback::CHIPScenesClusterCopySceneResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPScenesClusterCopySceneResponseCallback::~CHIPScenesClusterCopySceneResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPScenesClusterCopySceneResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), + dataResponse.status, Status); + jobject GroupIdentifierFrom; + std::string GroupIdentifierFromClassName = "java/lang/Integer"; + std::string GroupIdentifierFromCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIdentifierFromClassName.c_str(), + GroupIdentifierFromCtorSignature.c_str(), + dataResponse.groupIdentifierFrom, GroupIdentifierFrom); + jobject SceneIdentifierFrom; + std::string SceneIdentifierFromClassName = "java/lang/Integer"; + std::string SceneIdentifierFromCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIdentifierFromClassName.c_str(), + SceneIdentifierFromCtorSignature.c_str(), + dataResponse.sceneIdentifierFrom, SceneIdentifierFrom); + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupIdentifierFrom, SceneIdentifierFrom); +} CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback( jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -2919,21 +3266,360 @@ void CHIPDoorLockClusterGetUserResponseCallback::CallbackFn( jobject NextUserIndex; if (dataResponse.nextUserIndex.IsNull()) { - NextUserIndex = nullptr; + NextUserIndex = nullptr; + } + else + { + std::string NextUserIndexClassName = "java/lang/Integer"; + std::string NextUserIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NextUserIndexClassName.c_str(), NextUserIndexCtorSignature.c_str(), dataResponse.nextUserIndex.Value(), NextUserIndex); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, UserIndex, UserName, UserUniqueID, UserStatus, UserType, CredentialRule, + Credentials, CreatorFabricIndex, LastModifiedFabricIndex, NextUserIndex); +} +CHIPDoorLockClusterSetCredentialResponseCallback::CHIPDoorLockClusterSetCredentialResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDoorLockClusterSetCredentialResponseCallback::~CHIPDoorLockClusterSetCredentialResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPDoorLockClusterSetCredentialResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), + static_cast(dataResponse.status), Status); + jobject UserIndex; + if (dataResponse.userIndex.IsNull()) + { + UserIndex = nullptr; + } + else + { + std::string UserIndexClassName = "java/lang/Integer"; + std::string UserIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), + dataResponse.userIndex.Value(), UserIndex); + } + jobject NextCredentialIndex; + if (dataResponse.nextCredentialIndex.IsNull()) + { + NextCredentialIndex = nullptr; + } + else + { + std::string NextCredentialIndexClassName = "java/lang/Integer"; + std::string NextCredentialIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NextCredentialIndexClassName.c_str(), NextCredentialIndexCtorSignature.c_str(), + dataResponse.nextCredentialIndex.Value(), NextCredentialIndex); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, UserIndex, NextCredentialIndex); +} +CHIPDoorLockClusterGetCredentialStatusResponseCallback::CHIPDoorLockClusterGetCredentialStatusResponseCallback( + jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDoorLockClusterGetCredentialStatusResponseCallback::~CHIPDoorLockClusterGetCredentialStatusResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPDoorLockClusterGetCredentialStatusResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject CredentialExists; + std::string CredentialExistsClassName = "java/lang/Boolean"; + std::string CredentialExistsCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + CredentialExistsClassName.c_str(), CredentialExistsCtorSignature.c_str(), dataResponse.credentialExists, CredentialExists); + jobject UserIndex; + if (dataResponse.userIndex.IsNull()) + { + UserIndex = nullptr; + } + else + { + std::string UserIndexClassName = "java/lang/Integer"; + std::string UserIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), + dataResponse.userIndex.Value(), UserIndex); + } + jobject CreatorFabricIndex; + if (dataResponse.creatorFabricIndex.IsNull()) + { + CreatorFabricIndex = nullptr; + } + else + { + std::string CreatorFabricIndexClassName = "java/lang/Integer"; + std::string CreatorFabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(CreatorFabricIndexClassName.c_str(), + CreatorFabricIndexCtorSignature.c_str(), + dataResponse.creatorFabricIndex.Value(), CreatorFabricIndex); + } + jobject LastModifiedFabricIndex; + if (dataResponse.lastModifiedFabricIndex.IsNull()) + { + LastModifiedFabricIndex = nullptr; + } + else + { + std::string LastModifiedFabricIndexClassName = "java/lang/Integer"; + std::string LastModifiedFabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + LastModifiedFabricIndexClassName.c_str(), LastModifiedFabricIndexCtorSignature.c_str(), + dataResponse.lastModifiedFabricIndex.Value(), LastModifiedFabricIndex); + } + jobject NextCredentialIndex; + if (dataResponse.nextCredentialIndex.IsNull()) + { + NextCredentialIndex = nullptr; + } + else + { + std::string NextCredentialIndexClassName = "java/lang/Integer"; + std::string NextCredentialIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NextCredentialIndexClassName.c_str(), NextCredentialIndexCtorSignature.c_str(), + dataResponse.nextCredentialIndex.Value(), NextCredentialIndex); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, CredentialExists, UserIndex, CreatorFabricIndex, LastModifiedFabricIndex, + NextCredentialIndex); +} +CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CHIPThermostatClusterGetWeeklyScheduleResponseCallback( + jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThermostatClusterGetWeeklyScheduleResponseCallback::~CHIPThermostatClusterGetWeeklyScheduleResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; } - else + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject NumberOfTransitionsForSequence; + std::string NumberOfTransitionsForSequenceClassName = "java/lang/Integer"; + std::string NumberOfTransitionsForSequenceCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NumberOfTransitionsForSequenceClassName.c_str(), NumberOfTransitionsForSequenceCtorSignature.c_str(), + dataResponse.numberOfTransitionsForSequence, NumberOfTransitionsForSequence); + jobject DayOfWeekForSequence; + std::string DayOfWeekForSequenceClassName = "java/lang/Integer"; + std::string DayOfWeekForSequenceCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(DayOfWeekForSequenceClassName.c_str(), + DayOfWeekForSequenceCtorSignature.c_str(), + dataResponse.dayOfWeekForSequence.Raw(), DayOfWeekForSequence); + jobject ModeForSequence; + std::string ModeForSequenceClassName = "java/lang/Integer"; + std::string ModeForSequenceCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(ModeForSequenceClassName.c_str(), + ModeForSequenceCtorSignature.c_str(), + dataResponse.modeForSequence.Raw(), ModeForSequence); + jobject Transitions; + chip::JniReferences::GetInstance().CreateArrayList(Transitions); + + auto iter_Transitions_0 = dataResponse.transitions.begin(); + while (iter_Transitions_0.Next()) { - std::string NextUserIndexClassName = "java/lang/Integer"; - std::string NextUserIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NextUserIndexClassName.c_str(), NextUserIndexCtorSignature.c_str(), dataResponse.nextUserIndex.Value(), NextUserIndex); + auto & entry_0 = iter_Transitions_0.GetValue(); + jobject newElement_0; + jobject newElement_0_transitionTime; + std::string newElement_0_transitionTimeClassName = "java/lang/Integer"; + std::string newElement_0_transitionTimeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_transitionTimeClassName.c_str(), + newElement_0_transitionTimeCtorSignature.c_str(), + entry_0.transitionTime, newElement_0_transitionTime); + jobject newElement_0_heatSetpoint; + if (entry_0.heatSetpoint.IsNull()) + { + newElement_0_heatSetpoint = nullptr; + } + else + { + std::string newElement_0_heatSetpointClassName = "java/lang/Integer"; + std::string newElement_0_heatSetpointCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_heatSetpointClassName.c_str(), + newElement_0_heatSetpointCtorSignature.c_str(), + entry_0.heatSetpoint.Value(), newElement_0_heatSetpoint); + } + jobject newElement_0_coolSetpoint; + if (entry_0.coolSetpoint.IsNull()) + { + newElement_0_coolSetpoint = nullptr; + } + else + { + std::string newElement_0_coolSetpointClassName = "java/lang/Integer"; + std::string newElement_0_coolSetpointCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_coolSetpointClassName.c_str(), + newElement_0_coolSetpointCtorSignature.c_str(), + entry_0.coolSetpoint.Value(), newElement_0_coolSetpoint); + } + + jclass thermostatScheduleTransitionStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ThermostatClusterThermostatScheduleTransition", + thermostatScheduleTransitionStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterThermostatScheduleTransition"); + return; + } + jmethodID thermostatScheduleTransitionStructCtor_1 = env->GetMethodID( + thermostatScheduleTransitionStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (thermostatScheduleTransitionStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterThermostatScheduleTransition constructor"); + return; + } + + newElement_0 = env->NewObject(thermostatScheduleTransitionStructClass_1, thermostatScheduleTransitionStructCtor_1, + newElement_0_transitionTime, newElement_0_heatSetpoint, newElement_0_coolSetpoint); + chip::JniReferences::GetInstance().AddToList(Transitions, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, UserIndex, UserName, UserUniqueID, UserStatus, UserType, CredentialRule, - Credentials, CreatorFabricIndex, LastModifiedFabricIndex, NextUserIndex); + env->CallVoidMethod(javaCallbackRef, javaMethod, NumberOfTransitionsForSequence, DayOfWeekForSequence, ModeForSequence, + Transitions); } -CHIPDoorLockClusterSetCredentialResponseCallback::CHIPDoorLockClusterSetCredentialResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPChannelClusterChangeChannelResponseCallback::CHIPChannelClusterChangeChannelResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2949,7 +3635,7 @@ CHIPDoorLockClusterSetCredentialResponseCallback::CHIPDoorLockClusterSetCredenti } } -CHIPDoorLockClusterSetCredentialResponseCallback::~CHIPDoorLockClusterSetCredentialResponseCallback() +CHIPChannelClusterChangeChannelResponseCallback::~CHIPChannelClusterChangeChannelResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2960,8 +3646,8 @@ CHIPDoorLockClusterSetCredentialResponseCallback::~CHIPDoorLockClusterSetCredent env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPDoorLockClusterSetCredentialResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType & dataResponse) +void CHIPChannelClusterChangeChannelResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2971,17 +3657,17 @@ void CHIPDoorLockClusterSetCredentialResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject Status; @@ -2989,37 +3675,24 @@ void CHIPDoorLockClusterSetCredentialResponseCallback::CallbackFn( std::string StatusCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), static_cast(dataResponse.status), Status); - jobject UserIndex; - if (dataResponse.userIndex.IsNull()) - { - UserIndex = nullptr; - } - else - { - std::string UserIndexClassName = "java/lang/Integer"; - std::string UserIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), - dataResponse.userIndex.Value(), UserIndex); - } - jobject NextCredentialIndex; - if (dataResponse.nextCredentialIndex.IsNull()) + jobject Data; + if (!dataResponse.data.HasValue()) { - NextCredentialIndex = nullptr; + chip::JniReferences::GetInstance().CreateOptional(nullptr, Data); } else { - std::string NextCredentialIndexClassName = "java/lang/Integer"; - std::string NextCredentialIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NextCredentialIndexClassName.c_str(), NextCredentialIndexCtorSignature.c_str(), - dataResponse.nextCredentialIndex.Value(), NextCredentialIndex); + jobject DataInsideOptional; + DataInsideOptional = + env->NewStringUTF(std::string(dataResponse.data.Value().data(), dataResponse.data.Value().size()).c_str()); + chip::JniReferences::GetInstance().CreateOptional(DataInsideOptional, Data); } - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, UserIndex, NextCredentialIndex); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); } -CHIPDoorLockClusterGetCredentialStatusResponseCallback::CHIPDoorLockClusterGetCredentialStatusResponseCallback( +CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CHIPTargetNavigatorClusterNavigateTargetResponseCallback( jobject javaCallback) : - Callback::Callback(CallbackFn, this) + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3035,7 +3708,7 @@ CHIPDoorLockClusterGetCredentialStatusResponseCallback::CHIPDoorLockClusterGetCr } } -CHIPDoorLockClusterGetCredentialStatusResponseCallback::~CHIPDoorLockClusterGetCredentialStatusResponseCallback() +CHIPTargetNavigatorClusterNavigateTargetResponseCallback::~CHIPTargetNavigatorClusterNavigateTargetResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3046,8 +3719,8 @@ CHIPDoorLockClusterGetCredentialStatusResponseCallback::~CHIPDoorLockClusterGetC env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPDoorLockClusterGetCredentialStatusResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType & dataResponse) +void CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3057,84 +3730,42 @@ void CHIPDoorLockClusterGetCredentialStatusResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject CredentialExists; - std::string CredentialExistsClassName = "java/lang/Boolean"; - std::string CredentialExistsCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - CredentialExistsClassName.c_str(), CredentialExistsCtorSignature.c_str(), dataResponse.credentialExists, CredentialExists); - jobject UserIndex; - if (dataResponse.userIndex.IsNull()) - { - UserIndex = nullptr; - } - else - { - std::string UserIndexClassName = "java/lang/Integer"; - std::string UserIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(UserIndexClassName.c_str(), UserIndexCtorSignature.c_str(), - dataResponse.userIndex.Value(), UserIndex); - } - jobject CreatorFabricIndex; - if (dataResponse.creatorFabricIndex.IsNull()) - { - CreatorFabricIndex = nullptr; - } - else - { - std::string CreatorFabricIndexClassName = "java/lang/Integer"; - std::string CreatorFabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(CreatorFabricIndexClassName.c_str(), - CreatorFabricIndexCtorSignature.c_str(), - dataResponse.creatorFabricIndex.Value(), CreatorFabricIndex); - } - jobject LastModifiedFabricIndex; - if (dataResponse.lastModifiedFabricIndex.IsNull()) - { - LastModifiedFabricIndex = nullptr; - } - else - { - std::string LastModifiedFabricIndexClassName = "java/lang/Integer"; - std::string LastModifiedFabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - LastModifiedFabricIndexClassName.c_str(), LastModifiedFabricIndexCtorSignature.c_str(), - dataResponse.lastModifiedFabricIndex.Value(), LastModifiedFabricIndex); - } - jobject NextCredentialIndex; - if (dataResponse.nextCredentialIndex.IsNull()) - { - NextCredentialIndex = nullptr; - } - else + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), + static_cast(dataResponse.status), Status); + jobject Data; + if (!dataResponse.data.HasValue()) { - std::string NextCredentialIndexClassName = "java/lang/Integer"; - std::string NextCredentialIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NextCredentialIndexClassName.c_str(), NextCredentialIndexCtorSignature.c_str(), - dataResponse.nextCredentialIndex.Value(), NextCredentialIndex); + chip::JniReferences::GetInstance().CreateOptional(nullptr, Data); + } + else + { + jobject DataInsideOptional; + DataInsideOptional = + env->NewStringUTF(std::string(dataResponse.data.Value().data(), dataResponse.data.Value().size()).c_str()); + chip::JniReferences::GetInstance().CreateOptional(DataInsideOptional, Data); } - env->CallVoidMethod(javaCallbackRef, javaMethod, CredentialExists, UserIndex, CreatorFabricIndex, LastModifiedFabricIndex, - NextCredentialIndex); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); } -CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CHIPThermostatClusterGetWeeklyScheduleResponseCallback( - jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPMediaPlaybackClusterPlaybackResponseCallback::CHIPMediaPlaybackClusterPlaybackResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3150,7 +3781,7 @@ CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CHIPThermostatClusterGet } } -CHIPThermostatClusterGetWeeklyScheduleResponseCallback::~CHIPThermostatClusterGetWeeklyScheduleResponseCallback() +CHIPMediaPlaybackClusterPlaybackResponseCallback::~CHIPMediaPlaybackClusterPlaybackResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3161,8 +3792,8 @@ CHIPThermostatClusterGetWeeklyScheduleResponseCallback::~CHIPThermostatClusterGe env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType & dataResponse) +void CHIPMediaPlaybackClusterPlaybackResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3172,107 +3803,41 @@ void CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject NumberOfTransitionsForSequence; - std::string NumberOfTransitionsForSequenceClassName = "java/lang/Integer"; - std::string NumberOfTransitionsForSequenceCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NumberOfTransitionsForSequenceClassName.c_str(), NumberOfTransitionsForSequenceCtorSignature.c_str(), - dataResponse.numberOfTransitionsForSequence, NumberOfTransitionsForSequence); - jobject DayOfWeekForSequence; - std::string DayOfWeekForSequenceClassName = "java/lang/Integer"; - std::string DayOfWeekForSequenceCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(DayOfWeekForSequenceClassName.c_str(), - DayOfWeekForSequenceCtorSignature.c_str(), - dataResponse.dayOfWeekForSequence.Raw(), DayOfWeekForSequence); - jobject ModeForSequence; - std::string ModeForSequenceClassName = "java/lang/Integer"; - std::string ModeForSequenceCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(ModeForSequenceClassName.c_str(), - ModeForSequenceCtorSignature.c_str(), - dataResponse.modeForSequence.Raw(), ModeForSequence); - jobject Transitions; - chip::JniReferences::GetInstance().CreateArrayList(Transitions); - - auto iter_Transitions_0 = dataResponse.transitions.begin(); - while (iter_Transitions_0.Next()) + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), + static_cast(dataResponse.status), Status); + jobject Data; + if (!dataResponse.data.HasValue()) { - auto & entry_0 = iter_Transitions_0.GetValue(); - jobject newElement_0; - jobject newElement_0_transitionTime; - std::string newElement_0_transitionTimeClassName = "java/lang/Integer"; - std::string newElement_0_transitionTimeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_transitionTimeClassName.c_str(), - newElement_0_transitionTimeCtorSignature.c_str(), - entry_0.transitionTime, newElement_0_transitionTime); - jobject newElement_0_heatSetpoint; - if (entry_0.heatSetpoint.IsNull()) - { - newElement_0_heatSetpoint = nullptr; - } - else - { - std::string newElement_0_heatSetpointClassName = "java/lang/Integer"; - std::string newElement_0_heatSetpointCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_heatSetpointClassName.c_str(), - newElement_0_heatSetpointCtorSignature.c_str(), - entry_0.heatSetpoint.Value(), newElement_0_heatSetpoint); - } - jobject newElement_0_coolSetpoint; - if (entry_0.coolSetpoint.IsNull()) - { - newElement_0_coolSetpoint = nullptr; - } - else - { - std::string newElement_0_coolSetpointClassName = "java/lang/Integer"; - std::string newElement_0_coolSetpointCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_coolSetpointClassName.c_str(), - newElement_0_coolSetpointCtorSignature.c_str(), - entry_0.coolSetpoint.Value(), newElement_0_coolSetpoint); - } - - jclass thermostatScheduleTransitionStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ThermostatClusterThermostatScheduleTransition", - thermostatScheduleTransitionStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterThermostatScheduleTransition"); - return; - } - jmethodID thermostatScheduleTransitionStructCtor_1 = env->GetMethodID( - thermostatScheduleTransitionStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); - if (thermostatScheduleTransitionStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterThermostatScheduleTransition constructor"); - return; - } - - newElement_0 = env->NewObject(thermostatScheduleTransitionStructClass_1, thermostatScheduleTransitionStructCtor_1, - newElement_0_transitionTime, newElement_0_heatSetpoint, newElement_0_coolSetpoint); - chip::JniReferences::GetInstance().AddToList(Transitions, newElement_0); + chip::JniReferences::GetInstance().CreateOptional(nullptr, Data); + } + else + { + jobject DataInsideOptional; + DataInsideOptional = + env->NewStringUTF(std::string(dataResponse.data.Value().data(), dataResponse.data.Value().size()).c_str()); + chip::JniReferences::GetInstance().CreateOptional(DataInsideOptional, Data); } - env->CallVoidMethod(javaCallbackRef, javaMethod, NumberOfTransitionsForSequence, DayOfWeekForSequence, ModeForSequence, - Transitions); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); } -CHIPChannelClusterChangeChannelResponseCallback::CHIPChannelClusterChangeChannelResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPKeypadInputClusterSendKeyResponseCallback::CHIPKeypadInputClusterSendKeyResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3288,7 +3853,7 @@ CHIPChannelClusterChangeChannelResponseCallback::CHIPChannelClusterChangeChannel } } -CHIPChannelClusterChangeChannelResponseCallback::~CHIPChannelClusterChangeChannelResponseCallback() +CHIPKeypadInputClusterSendKeyResponseCallback::~CHIPKeypadInputClusterSendKeyResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3299,8 +3864,8 @@ CHIPChannelClusterChangeChannelResponseCallback::~CHIPChannelClusterChangeChanne env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPChannelClusterChangeChannelResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & dataResponse) +void CHIPKeypadInputClusterSendKeyResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3310,17 +3875,16 @@ void CHIPChannelClusterChangeChannelResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject Status; @@ -3328,24 +3892,11 @@ void CHIPChannelClusterChangeChannelResponseCallback::CallbackFn( std::string StatusCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), static_cast(dataResponse.status), Status); - jobject Data; - if (!dataResponse.data.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Data); - } - else - { - jobject DataInsideOptional; - DataInsideOptional = - env->NewStringUTF(std::string(dataResponse.data.Value().data(), dataResponse.data.Value().size()).c_str()); - chip::JniReferences::GetInstance().CreateOptional(DataInsideOptional, Data); - } - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status); } -CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CHIPTargetNavigatorClusterNavigateTargetResponseCallback( - jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPContentLauncherClusterLauncherResponseCallback::CHIPContentLauncherClusterLauncherResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3361,7 +3912,7 @@ CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CHIPTargetNavigatorClu } } -CHIPTargetNavigatorClusterNavigateTargetResponseCallback::~CHIPTargetNavigatorClusterNavigateTargetResponseCallback() +CHIPContentLauncherClusterLauncherResponseCallback::~CHIPContentLauncherClusterLauncherResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3372,8 +3923,8 @@ CHIPTargetNavigatorClusterNavigateTargetResponseCallback::~CHIPTargetNavigatorCl env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & dataResponse) +void CHIPContentLauncherClusterLauncherResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3383,10 +3934,10 @@ void CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; @@ -3417,8 +3968,9 @@ void CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); } -CHIPMediaPlaybackClusterPlaybackResponseCallback::CHIPMediaPlaybackClusterPlaybackResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPApplicationLauncherClusterLauncherResponseCallback::CHIPApplicationLauncherClusterLauncherResponseCallback( + jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3434,7 +3986,7 @@ CHIPMediaPlaybackClusterPlaybackResponseCallback::CHIPMediaPlaybackClusterPlayba } } -CHIPMediaPlaybackClusterPlaybackResponseCallback::~CHIPMediaPlaybackClusterPlaybackResponseCallback() +CHIPApplicationLauncherClusterLauncherResponseCallback::~CHIPApplicationLauncherClusterLauncherResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3445,8 +3997,8 @@ CHIPMediaPlaybackClusterPlaybackResponseCallback::~CHIPMediaPlaybackClusterPlayb env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPMediaPlaybackClusterPlaybackResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType & dataResponse) +void CHIPApplicationLauncherClusterLauncherResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3456,9 +4008,10 @@ void CHIPMediaPlaybackClusterPlaybackResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; @@ -3482,15 +4035,75 @@ void CHIPMediaPlaybackClusterPlaybackResponseCallback::CallbackFn( else { jobject DataInsideOptional; - DataInsideOptional = - env->NewStringUTF(std::string(dataResponse.data.Value().data(), dataResponse.data.Value().size()).c_str()); + jbyteArray DataInsideOptionalByteArray = env->NewByteArray(static_cast(dataResponse.data.Value().size())); + env->SetByteArrayRegion(DataInsideOptionalByteArray, 0, static_cast(dataResponse.data.Value().size()), + reinterpret_cast(dataResponse.data.Value().data())); + DataInsideOptional = DataInsideOptionalByteArray; chip::JniReferences::GetInstance().CreateOptional(DataInsideOptional, Data); } - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); +} +CHIPAccountLoginClusterGetSetupPINResponseCallback::CHIPAccountLoginClusterGetSetupPINResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPAccountLoginClusterGetSetupPINResponseCallback::~CHIPAccountLoginClusterGetSetupPINResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPAccountLoginClusterGetSetupPINResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject SetupPIN; + SetupPIN = env->NewStringUTF(std::string(dataResponse.setupPIN.data(), dataResponse.setupPIN.size()).c_str()); + + env->CallVoidMethod(javaCallbackRef, javaMethod, SetupPIN); } -CHIPKeypadInputClusterSendKeyResponseCallback::CHIPKeypadInputClusterSendKeyResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback:: + CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3506,7 +4119,8 @@ CHIPKeypadInputClusterSendKeyResponseCallback::CHIPKeypadInputClusterSendKeyResp } } -CHIPKeypadInputClusterSendKeyResponseCallback::~CHIPKeypadInputClusterSendKeyResponseCallback() +CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback:: + ~CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3517,8 +4131,9 @@ CHIPKeypadInputClusterSendKeyResponseCallback::~CHIPKeypadInputClusterSendKeyRes env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPKeypadInputClusterSendKeyResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType & dataResponse) +void CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback::CallbackFn( + void * context, + const chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3528,28 +4143,58 @@ void CHIPKeypadInputClusterSendKeyResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - static_cast(dataResponse.status), Status); + jobject profileCount; + std::string profileCountClassName = "java/lang/Integer"; + std::string profileCountCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(profileCountClassName.c_str(), profileCountCtorSignature.c_str(), + dataResponse.profileCount, profileCount); + jobject profileIntervalPeriod; + std::string profileIntervalPeriodClassName = "java/lang/Integer"; + std::string profileIntervalPeriodCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(profileIntervalPeriodClassName.c_str(), + profileIntervalPeriodCtorSignature.c_str(), + dataResponse.profileIntervalPeriod, profileIntervalPeriod); + jobject maxNumberOfIntervals; + std::string maxNumberOfIntervalsClassName = "java/lang/Integer"; + std::string maxNumberOfIntervalsCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(maxNumberOfIntervalsClassName.c_str(), + maxNumberOfIntervalsCtorSignature.c_str(), + dataResponse.maxNumberOfIntervals, maxNumberOfIntervals); + jobject listOfAttributes; + chip::JniReferences::GetInstance().CreateArrayList(listOfAttributes); + + auto iter_listOfAttributes_0 = dataResponse.listOfAttributes.begin(); + while (iter_listOfAttributes_0.Next()) + { + auto & entry_0 = iter_listOfAttributes_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(listOfAttributes, newElement_0); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, Status); + env->CallVoidMethod(javaCallbackRef, javaMethod, profileCount, profileIntervalPeriod, maxNumberOfIntervals, listOfAttributes); } -CHIPContentLauncherClusterLauncherResponseCallback::CHIPContentLauncherClusterLauncherResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallback:: + CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3565,7 +4210,8 @@ CHIPContentLauncherClusterLauncherResponseCallback::CHIPContentLauncherClusterLa } } -CHIPContentLauncherClusterLauncherResponseCallback::~CHIPContentLauncherClusterLauncherResponseCallback() +CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallback:: + ~CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3576,8 +4222,9 @@ CHIPContentLauncherClusterLauncherResponseCallback::~CHIPContentLauncherClusterL env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPContentLauncherClusterLauncherResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::DecodableType & dataResponse) +void CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallback::CallbackFn( + void * context, + const chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3587,43 +4234,69 @@ void CHIPContentLauncherClusterLauncherResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - static_cast(dataResponse.status), Status); - jobject Data; - if (!dataResponse.data.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Data); - } - else - { - jobject DataInsideOptional; - DataInsideOptional = - env->NewStringUTF(std::string(dataResponse.data.Value().data(), dataResponse.data.Value().size()).c_str()); - chip::JniReferences::GetInstance().CreateOptional(DataInsideOptional, Data); + jobject startTime; + std::string startTimeClassName = "java/lang/Long"; + std::string startTimeCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(startTimeClassName.c_str(), startTimeCtorSignature.c_str(), + dataResponse.startTime, startTime); + jobject status; + std::string statusClassName = "java/lang/Integer"; + std::string statusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), + dataResponse.status, status); + jobject profileIntervalPeriod; + std::string profileIntervalPeriodClassName = "java/lang/Integer"; + std::string profileIntervalPeriodCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(profileIntervalPeriodClassName.c_str(), + profileIntervalPeriodCtorSignature.c_str(), + dataResponse.profileIntervalPeriod, profileIntervalPeriod); + jobject numberOfIntervalsDelivered; + std::string numberOfIntervalsDeliveredClassName = "java/lang/Integer"; + std::string numberOfIntervalsDeliveredCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + numberOfIntervalsDeliveredClassName.c_str(), numberOfIntervalsDeliveredCtorSignature.c_str(), + dataResponse.numberOfIntervalsDelivered, numberOfIntervalsDelivered); + jobject attributeId; + std::string attributeIdClassName = "java/lang/Integer"; + std::string attributeIdCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(attributeIdClassName.c_str(), attributeIdCtorSignature.c_str(), + dataResponse.attributeId, attributeId); + jobject intervals; + chip::JniReferences::GetInstance().CreateArrayList(intervals); + + auto iter_intervals_0 = dataResponse.intervals.begin(); + while (iter_intervals_0.Next()) + { + auto & entry_0 = iter_intervals_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(intervals, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); + env->CallVoidMethod(javaCallbackRef, javaMethod, startTime, status, profileIntervalPeriod, numberOfIntervalsDelivered, + attributeId, intervals); } -CHIPApplicationLauncherClusterLauncherResponseCallback::CHIPApplicationLauncherClusterLauncherResponseCallback( - jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPUnitTestingClusterTestSpecificResponseCallback::CHIPUnitTestingClusterTestSpecificResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3639,7 +4312,7 @@ CHIPApplicationLauncherClusterLauncherResponseCallback::CHIPApplicationLauncherC } } -CHIPApplicationLauncherClusterLauncherResponseCallback::~CHIPApplicationLauncherClusterLauncherResponseCallback() +CHIPUnitTestingClusterTestSpecificResponseCallback::~CHIPUnitTestingClusterTestSpecificResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3650,8 +4323,8 @@ CHIPApplicationLauncherClusterLauncherResponseCallback::~CHIPApplicationLauncher env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPApplicationLauncherClusterLauncherResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType & dataResponse) +void CHIPUnitTestingClusterTestSpecificResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3661,44 +4334,30 @@ void CHIPApplicationLauncherClusterLauncherResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), - static_cast(dataResponse.status), Status); - jobject Data; - if (!dataResponse.data.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, Data); - } - else - { - jobject DataInsideOptional; - jbyteArray DataInsideOptionalByteArray = env->NewByteArray(static_cast(dataResponse.data.Value().size())); - env->SetByteArrayRegion(DataInsideOptionalByteArray, 0, static_cast(dataResponse.data.Value().size()), - reinterpret_cast(dataResponse.data.Value().data())); - DataInsideOptional = DataInsideOptionalByteArray; - chip::JniReferences::GetInstance().CreateOptional(DataInsideOptional, Data); - } + jobject returnValue; + std::string returnValueClassName = "java/lang/Integer"; + std::string returnValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(returnValueClassName.c_str(), returnValueCtorSignature.c_str(), + dataResponse.returnValue, returnValue); - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Data); + env->CallVoidMethod(javaCallbackRef, javaMethod, returnValue); } -CHIPAccountLoginClusterGetSetupPINResponseCallback::CHIPAccountLoginClusterGetSetupPINResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPUnitTestingClusterTestAddArgumentsResponseCallback::CHIPUnitTestingClusterTestAddArgumentsResponseCallback( + jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3714,7 +4373,7 @@ CHIPAccountLoginClusterGetSetupPINResponseCallback::CHIPAccountLoginClusterGetSe } } -CHIPAccountLoginClusterGetSetupPINResponseCallback::~CHIPAccountLoginClusterGetSetupPINResponseCallback() +CHIPUnitTestingClusterTestAddArgumentsResponseCallback::~CHIPUnitTestingClusterTestAddArgumentsResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3725,8 +4384,8 @@ CHIPAccountLoginClusterGetSetupPINResponseCallback::~CHIPAccountLoginClusterGetS env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPAccountLoginClusterGetSetupPINResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType & dataResponse) +void CHIPUnitTestingClusterTestAddArgumentsResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3736,26 +4395,30 @@ void CHIPAccountLoginClusterGetSetupPINResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject SetupPIN; - SetupPIN = env->NewStringUTF(std::string(dataResponse.setupPIN.data(), dataResponse.setupPIN.size()).c_str()); + jobject returnValue; + std::string returnValueClassName = "java/lang/Integer"; + std::string returnValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(returnValueClassName.c_str(), returnValueCtorSignature.c_str(), + dataResponse.returnValue, returnValue); - env->CallVoidMethod(javaCallbackRef, javaMethod, SetupPIN); + env->CallVoidMethod(javaCallbackRef, javaMethod, returnValue); } -CHIPUnitTestingClusterTestSpecificResponseCallback::CHIPUnitTestingClusterTestSpecificResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPUnitTestingClusterTestSimpleArgumentResponseCallback::CHIPUnitTestingClusterTestSimpleArgumentResponseCallback( + jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3771,7 +4434,7 @@ CHIPUnitTestingClusterTestSpecificResponseCallback::CHIPUnitTestingClusterTestSp } } -CHIPUnitTestingClusterTestSpecificResponseCallback::~CHIPUnitTestingClusterTestSpecificResponseCallback() +CHIPUnitTestingClusterTestSimpleArgumentResponseCallback::~CHIPUnitTestingClusterTestSimpleArgumentResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3782,8 +4445,8 @@ CHIPUnitTestingClusterTestSpecificResponseCallback::~CHIPUnitTestingClusterTestS env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPUnitTestingClusterTestSpecificResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType & dataResponse) +void CHIPUnitTestingClusterTestSimpleArgumentResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3793,30 +4456,30 @@ void CHIPUnitTestingClusterTestSpecificResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Boolean;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject returnValue; - std::string returnValueClassName = "java/lang/Integer"; - std::string returnValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(returnValueClassName.c_str(), returnValueCtorSignature.c_str(), - dataResponse.returnValue, returnValue); + std::string returnValueClassName = "java/lang/Boolean"; + std::string returnValueCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(returnValueClassName.c_str(), returnValueCtorSignature.c_str(), + dataResponse.returnValue, returnValue); env->CallVoidMethod(javaCallbackRef, javaMethod, returnValue); } -CHIPUnitTestingClusterTestAddArgumentsResponseCallback::CHIPUnitTestingClusterTestAddArgumentsResponseCallback( +CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback::CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback( jobject javaCallback) : - Callback::Callback(CallbackFn, this) + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3832,7 +4495,7 @@ CHIPUnitTestingClusterTestAddArgumentsResponseCallback::CHIPUnitTestingClusterTe } } -CHIPUnitTestingClusterTestAddArgumentsResponseCallback::~CHIPUnitTestingClusterTestAddArgumentsResponseCallback() +CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback::~CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3843,8 +4506,8 @@ CHIPUnitTestingClusterTestAddArgumentsResponseCallback::~CHIPUnitTestingClusterT env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPUnitTestingClusterTestAddArgumentsResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType & dataResponse) +void CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3854,26 +4517,345 @@ void CHIPUnitTestingClusterTestAddArgumentsResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", + "(Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/" + "ArrayList;Ljava/lang/Integer;Ljava/lang/Boolean;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject returnValue; - std::string returnValueClassName = "java/lang/Integer"; - std::string returnValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(returnValueClassName.c_str(), returnValueCtorSignature.c_str(), - dataResponse.returnValue, returnValue); + jobject arg1; + chip::JniReferences::GetInstance().CreateArrayList(arg1); + + auto iter_arg1_0 = dataResponse.arg1.begin(); + while (iter_arg1_0.Next()) + { + auto & entry_0 = iter_arg1_0.GetValue(); + jobject newElement_0; + jobject newElement_0_a; + std::string newElement_0_aClassName = "java/lang/Integer"; + std::string newElement_0_aCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_aClassName.c_str(), newElement_0_aCtorSignature.c_str(), entry_0.a, newElement_0_a); + jobject newElement_0_b; + std::string newElement_0_bClassName = "java/lang/Boolean"; + std::string newElement_0_bCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_bClassName.c_str(), + newElement_0_bCtorSignature.c_str(), entry_0.b, newElement_0_b); + jobject newElement_0_c; + jobject newElement_0_c_a; + std::string newElement_0_c_aClassName = "java/lang/Integer"; + std::string newElement_0_c_aCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_c_aClassName.c_str(), newElement_0_c_aCtorSignature.c_str(), entry_0.c.a, newElement_0_c_a); + jobject newElement_0_c_b; + std::string newElement_0_c_bClassName = "java/lang/Boolean"; + std::string newElement_0_c_bCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_c_bClassName.c_str(), newElement_0_c_bCtorSignature.c_str(), entry_0.c.b, newElement_0_c_b); + jobject newElement_0_c_c; + std::string newElement_0_c_cClassName = "java/lang/Integer"; + std::string newElement_0_c_cCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_c_cClassName.c_str(), + newElement_0_c_cCtorSignature.c_str(), + static_cast(entry_0.c.c), newElement_0_c_c); + jobject newElement_0_c_d; + jbyteArray newElement_0_c_dByteArray = env->NewByteArray(static_cast(entry_0.c.d.size())); + env->SetByteArrayRegion(newElement_0_c_dByteArray, 0, static_cast(entry_0.c.d.size()), + reinterpret_cast(entry_0.c.d.data())); + newElement_0_c_d = newElement_0_c_dByteArray; + jobject newElement_0_c_e; + newElement_0_c_e = env->NewStringUTF(std::string(entry_0.c.e.data(), entry_0.c.e.size()).c_str()); + jobject newElement_0_c_f; + std::string newElement_0_c_fClassName = "java/lang/Integer"; + std::string newElement_0_c_fCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_c_fClassName.c_str(), newElement_0_c_fCtorSignature.c_str(), entry_0.c.f.Raw(), newElement_0_c_f); + jobject newElement_0_c_g; + std::string newElement_0_c_gClassName = "java/lang/Float"; + std::string newElement_0_c_gCtorSignature = "(F)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_c_gClassName.c_str(), newElement_0_c_gCtorSignature.c_str(), entry_0.c.g, newElement_0_c_g); + jobject newElement_0_c_h; + std::string newElement_0_c_hClassName = "java/lang/Double"; + std::string newElement_0_c_hCtorSignature = "(D)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_c_hClassName.c_str(), newElement_0_c_hCtorSignature.c_str(), entry_0.c.h, newElement_0_c_h); + + jclass simpleStructStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); + return; + } + jmethodID simpleStructStructCtor_2 = + env->GetMethodID(simpleStructStructClass_2, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" + "Integer;Ljava/lang/Float;Ljava/lang/Double;)V"); + if (simpleStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); + return; + } + + newElement_0_c = env->NewObject(simpleStructStructClass_2, simpleStructStructCtor_2, newElement_0_c_a, newElement_0_c_b, + newElement_0_c_c, newElement_0_c_d, newElement_0_c_e, newElement_0_c_f, newElement_0_c_g, + newElement_0_c_h); + jobject newElement_0_d; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_d); + + auto iter_newElement_0_d_2 = entry_0.d.begin(); + while (iter_newElement_0_d_2.Next()) + { + auto & entry_2 = iter_newElement_0_d_2.GetValue(); + jobject newElement_2; + jobject newElement_2_a; + std::string newElement_2_aClassName = "java/lang/Integer"; + std::string newElement_2_aCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_aClassName.c_str(), newElement_2_aCtorSignature.c_str(), entry_2.a, newElement_2_a); + jobject newElement_2_b; + std::string newElement_2_bClassName = "java/lang/Boolean"; + std::string newElement_2_bCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_bClassName.c_str(), newElement_2_bCtorSignature.c_str(), entry_2.b, newElement_2_b); + jobject newElement_2_c; + std::string newElement_2_cClassName = "java/lang/Integer"; + std::string newElement_2_cCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_cClassName.c_str(), + newElement_2_cCtorSignature.c_str(), + static_cast(entry_2.c), newElement_2_c); + jobject newElement_2_d; + jbyteArray newElement_2_dByteArray = env->NewByteArray(static_cast(entry_2.d.size())); + env->SetByteArrayRegion(newElement_2_dByteArray, 0, static_cast(entry_2.d.size()), + reinterpret_cast(entry_2.d.data())); + newElement_2_d = newElement_2_dByteArray; + jobject newElement_2_e; + newElement_2_e = env->NewStringUTF(std::string(entry_2.e.data(), entry_2.e.size()).c_str()); + jobject newElement_2_f; + std::string newElement_2_fClassName = "java/lang/Integer"; + std::string newElement_2_fCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_fClassName.c_str(), newElement_2_fCtorSignature.c_str(), entry_2.f.Raw(), newElement_2_f); + jobject newElement_2_g; + std::string newElement_2_gClassName = "java/lang/Float"; + std::string newElement_2_gCtorSignature = "(F)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_gClassName.c_str(), newElement_2_gCtorSignature.c_str(), entry_2.g, newElement_2_g); + jobject newElement_2_h; + std::string newElement_2_hClassName = "java/lang/Double"; + std::string newElement_2_hCtorSignature = "(D)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_hClassName.c_str(), newElement_2_hCtorSignature.c_str(), entry_2.h, newElement_2_h); + + jclass simpleStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); + return; + } + jmethodID simpleStructStructCtor_3 = + env->GetMethodID(simpleStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" + "Integer;Ljava/lang/Float;Ljava/lang/Double;)V"); + if (simpleStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); + return; + } + + newElement_2 = + env->NewObject(simpleStructStructClass_3, simpleStructStructCtor_3, newElement_2_a, newElement_2_b, newElement_2_c, + newElement_2_d, newElement_2_e, newElement_2_f, newElement_2_g, newElement_2_h); + chip::JniReferences::GetInstance().AddToList(newElement_0_d, newElement_2); + } + jobject newElement_0_e; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_e); + + auto iter_newElement_0_e_2 = entry_0.e.begin(); + while (iter_newElement_0_e_2.Next()) + { + auto & entry_2 = iter_newElement_0_e_2.GetValue(); + jobject newElement_2; + std::string newElement_2ClassName = "java/lang/Long"; + std::string newElement_2CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), entry_2, newElement_2); + chip::JniReferences::GetInstance().AddToList(newElement_0_e, newElement_2); + } + jobject newElement_0_f; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_f); + + auto iter_newElement_0_f_2 = entry_0.f.begin(); + while (iter_newElement_0_f_2.Next()) + { + auto & entry_2 = iter_newElement_0_f_2.GetValue(); + jobject newElement_2; + jbyteArray newElement_2ByteArray = env->NewByteArray(static_cast(entry_2.size())); + env->SetByteArrayRegion(newElement_2ByteArray, 0, static_cast(entry_2.size()), + reinterpret_cast(entry_2.data())); + newElement_2 = newElement_2ByteArray; + chip::JniReferences::GetInstance().AddToList(newElement_0_f, newElement_2); + } + jobject newElement_0_g; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_g); + + auto iter_newElement_0_g_2 = entry_0.g.begin(); + while (iter_newElement_0_g_2.Next()) + { + auto & entry_2 = iter_newElement_0_g_2.GetValue(); + jobject newElement_2; + std::string newElement_2ClassName = "java/lang/Integer"; + std::string newElement_2CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2ClassName.c_str(), + newElement_2CtorSignature.c_str(), entry_2, newElement_2); + chip::JniReferences::GetInstance().AddToList(newElement_0_g, newElement_2); + } + + jclass nestedStructListStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterNestedStructList", nestedStructListStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterNestedStructList"); + return; + } + jmethodID nestedStructListStructCtor_1 = env->GetMethodID( + nestedStructListStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Lchip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;Ljava/util/" + "ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;)V"); + if (nestedStructListStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterNestedStructList constructor"); + return; + } + + newElement_0 = env->NewObject(nestedStructListStructClass_1, nestedStructListStructCtor_1, newElement_0_a, newElement_0_b, + newElement_0_c, newElement_0_d, newElement_0_e, newElement_0_f, newElement_0_g); + chip::JniReferences::GetInstance().AddToList(arg1, newElement_0); + } + jobject arg2; + chip::JniReferences::GetInstance().CreateArrayList(arg2); + + auto iter_arg2_0 = dataResponse.arg2.begin(); + while (iter_arg2_0.Next()) + { + auto & entry_0 = iter_arg2_0.GetValue(); + jobject newElement_0; + jobject newElement_0_a; + std::string newElement_0_aClassName = "java/lang/Integer"; + std::string newElement_0_aCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_aClassName.c_str(), newElement_0_aCtorSignature.c_str(), entry_0.a, newElement_0_a); + jobject newElement_0_b; + std::string newElement_0_bClassName = "java/lang/Boolean"; + std::string newElement_0_bCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_bClassName.c_str(), + newElement_0_bCtorSignature.c_str(), entry_0.b, newElement_0_b); + jobject newElement_0_c; + std::string newElement_0_cClassName = "java/lang/Integer"; + std::string newElement_0_cCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_cClassName.c_str(), newElement_0_cCtorSignature.c_str(), static_cast(entry_0.c), newElement_0_c); + jobject newElement_0_d; + jbyteArray newElement_0_dByteArray = env->NewByteArray(static_cast(entry_0.d.size())); + env->SetByteArrayRegion(newElement_0_dByteArray, 0, static_cast(entry_0.d.size()), + reinterpret_cast(entry_0.d.data())); + newElement_0_d = newElement_0_dByteArray; + jobject newElement_0_e; + newElement_0_e = env->NewStringUTF(std::string(entry_0.e.data(), entry_0.e.size()).c_str()); + jobject newElement_0_f; + std::string newElement_0_fClassName = "java/lang/Integer"; + std::string newElement_0_fCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_fClassName.c_str(), newElement_0_fCtorSignature.c_str(), entry_0.f.Raw(), newElement_0_f); + jobject newElement_0_g; + std::string newElement_0_gClassName = "java/lang/Float"; + std::string newElement_0_gCtorSignature = "(F)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_gClassName.c_str(), + newElement_0_gCtorSignature.c_str(), entry_0.g, newElement_0_g); + jobject newElement_0_h; + std::string newElement_0_hClassName = "java/lang/Double"; + std::string newElement_0_hCtorSignature = "(D)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_hClassName.c_str(), newElement_0_hCtorSignature.c_str(), entry_0.h, newElement_0_h); + + jclass simpleStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); + return; + } + jmethodID simpleStructStructCtor_1 = + env->GetMethodID(simpleStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" + "Integer;Ljava/lang/Float;Ljava/lang/Double;)V"); + if (simpleStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); + return; + } + + newElement_0 = + env->NewObject(simpleStructStructClass_1, simpleStructStructCtor_1, newElement_0_a, newElement_0_b, newElement_0_c, + newElement_0_d, newElement_0_e, newElement_0_f, newElement_0_g, newElement_0_h); + chip::JniReferences::GetInstance().AddToList(arg2, newElement_0); + } + jobject arg3; + chip::JniReferences::GetInstance().CreateArrayList(arg3); - env->CallVoidMethod(javaCallbackRef, javaMethod, returnValue); + auto iter_arg3_0 = dataResponse.arg3.begin(); + while (iter_arg3_0.Next()) + { + auto & entry_0 = iter_arg3_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + chip::JniReferences::GetInstance().AddToList(arg3, newElement_0); + } + jobject arg4; + chip::JniReferences::GetInstance().CreateArrayList(arg4); + + auto iter_arg4_0 = dataResponse.arg4.begin(); + while (iter_arg4_0.Next()) + { + auto & entry_0 = iter_arg4_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Boolean"; + std::string newElement_0CtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arg4, newElement_0); + } + jobject arg5; + std::string arg5ClassName = "java/lang/Integer"; + std::string arg5CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(arg5ClassName.c_str(), arg5CtorSignature.c_str(), + static_cast(dataResponse.arg5), arg5); + jobject arg6; + std::string arg6ClassName = "java/lang/Boolean"; + std::string arg6CtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(arg6ClassName.c_str(), arg6CtorSignature.c_str(), dataResponse.arg6, + arg6); + + env->CallVoidMethod(javaCallbackRef, javaMethod, arg1, arg2, arg3, arg4, arg5, arg6); } CHIPUnitTestingClusterTestListInt8UReverseResponseCallback::CHIPUnitTestingClusterTestListInt8UReverseResponseCallback( jobject javaCallback) : @@ -4125,6 +5107,619 @@ void CHIPUnitTestingClusterTestNullableOptionalResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, wasPresent, wasNull, value, originalValue); } +CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback:: + CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback:: + ~CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback::CallbackFn( + void * context, + const chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Boolean;Ljava/util/Optional;Ljava/lang/Boolean;Ljava/util/Optional;Ljava/lang/Boolean;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/lang/Boolean;Ljava/util/Optional;Ljava/lang/Boolean;Ljava/util/Optional;Ljava/lang/" + "Boolean;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Boolean;Ljava/util/Optional;Ljava/lang/Boolean;Ljava/util/" + "Optional;Ljava/lang/Boolean;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Boolean;Ljava/util/Optional;Ljava/lang/" + "Boolean;Ljava/util/Optional;Ljava/lang/Boolean;Ljava/util/Optional;Ljava/util/Optional;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject NullableIntWasNull; + std::string NullableIntWasNullClassName = "java/lang/Boolean"; + std::string NullableIntWasNullCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(NullableIntWasNullClassName.c_str(), + NullableIntWasNullCtorSignature.c_str(), + dataResponse.nullableIntWasNull, NullableIntWasNull); + jobject NullableIntValue; + if (!dataResponse.nullableIntValue.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableIntValue); + } + else + { + jobject NullableIntValueInsideOptional; + std::string NullableIntValueInsideOptionalClassName = "java/lang/Integer"; + std::string NullableIntValueInsideOptionalCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableIntValueInsideOptionalClassName.c_str(), NullableIntValueInsideOptionalCtorSignature.c_str(), + dataResponse.nullableIntValue.Value(), NullableIntValueInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(NullableIntValueInsideOptional, NullableIntValue); + } + jobject OptionalIntWasPresent; + std::string OptionalIntWasPresentClassName = "java/lang/Boolean"; + std::string OptionalIntWasPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(OptionalIntWasPresentClassName.c_str(), + OptionalIntWasPresentCtorSignature.c_str(), + dataResponse.optionalIntWasPresent, OptionalIntWasPresent); + jobject OptionalIntValue; + if (!dataResponse.optionalIntValue.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, OptionalIntValue); + } + else + { + jobject OptionalIntValueInsideOptional; + std::string OptionalIntValueInsideOptionalClassName = "java/lang/Integer"; + std::string OptionalIntValueInsideOptionalCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + OptionalIntValueInsideOptionalClassName.c_str(), OptionalIntValueInsideOptionalCtorSignature.c_str(), + dataResponse.optionalIntValue.Value(), OptionalIntValueInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(OptionalIntValueInsideOptional, OptionalIntValue); + } + jobject NullableOptionalIntWasPresent; + std::string NullableOptionalIntWasPresentClassName = "java/lang/Boolean"; + std::string NullableOptionalIntWasPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableOptionalIntWasPresentClassName.c_str(), NullableOptionalIntWasPresentCtorSignature.c_str(), + dataResponse.nullableOptionalIntWasPresent, NullableOptionalIntWasPresent); + jobject NullableOptionalIntWasNull; + if (!dataResponse.nullableOptionalIntWasNull.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableOptionalIntWasNull); + } + else + { + jobject NullableOptionalIntWasNullInsideOptional; + std::string NullableOptionalIntWasNullInsideOptionalClassName = "java/lang/Boolean"; + std::string NullableOptionalIntWasNullInsideOptionalCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalIntWasNullInsideOptionalClassName.c_str(), + NullableOptionalIntWasNullInsideOptionalCtorSignature.c_str(), + dataResponse.nullableOptionalIntWasNull.Value(), + NullableOptionalIntWasNullInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(NullableOptionalIntWasNullInsideOptional, NullableOptionalIntWasNull); + } + jobject NullableOptionalIntValue; + if (!dataResponse.nullableOptionalIntValue.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableOptionalIntValue); + } + else + { + jobject NullableOptionalIntValueInsideOptional; + std::string NullableOptionalIntValueInsideOptionalClassName = "java/lang/Integer"; + std::string NullableOptionalIntValueInsideOptionalCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableOptionalIntValueInsideOptionalClassName.c_str(), NullableOptionalIntValueInsideOptionalCtorSignature.c_str(), + dataResponse.nullableOptionalIntValue.Value(), NullableOptionalIntValueInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(NullableOptionalIntValueInsideOptional, NullableOptionalIntValue); + } + jobject NullableStringWasNull; + std::string NullableStringWasNullClassName = "java/lang/Boolean"; + std::string NullableStringWasNullCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(NullableStringWasNullClassName.c_str(), + NullableStringWasNullCtorSignature.c_str(), + dataResponse.nullableStringWasNull, NullableStringWasNull); + jobject NullableStringValue; + if (!dataResponse.nullableStringValue.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableStringValue); + } + else + { + jobject NullableStringValueInsideOptional; + NullableStringValueInsideOptional = env->NewStringUTF( + std::string(dataResponse.nullableStringValue.Value().data(), dataResponse.nullableStringValue.Value().size()).c_str()); + chip::JniReferences::GetInstance().CreateOptional(NullableStringValueInsideOptional, NullableStringValue); + } + jobject OptionalStringWasPresent; + std::string OptionalStringWasPresentClassName = "java/lang/Boolean"; + std::string OptionalStringWasPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(OptionalStringWasPresentClassName.c_str(), + OptionalStringWasPresentCtorSignature.c_str(), + dataResponse.optionalStringWasPresent, OptionalStringWasPresent); + jobject OptionalStringValue; + if (!dataResponse.optionalStringValue.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, OptionalStringValue); + } + else + { + jobject OptionalStringValueInsideOptional; + OptionalStringValueInsideOptional = env->NewStringUTF( + std::string(dataResponse.optionalStringValue.Value().data(), dataResponse.optionalStringValue.Value().size()).c_str()); + chip::JniReferences::GetInstance().CreateOptional(OptionalStringValueInsideOptional, OptionalStringValue); + } + jobject NullableOptionalStringWasPresent; + std::string NullableOptionalStringWasPresentClassName = "java/lang/Boolean"; + std::string NullableOptionalStringWasPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableOptionalStringWasPresentClassName.c_str(), NullableOptionalStringWasPresentCtorSignature.c_str(), + dataResponse.nullableOptionalStringWasPresent, NullableOptionalStringWasPresent); + jobject NullableOptionalStringWasNull; + if (!dataResponse.nullableOptionalStringWasNull.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableOptionalStringWasNull); + } + else + { + jobject NullableOptionalStringWasNullInsideOptional; + std::string NullableOptionalStringWasNullInsideOptionalClassName = "java/lang/Boolean"; + std::string NullableOptionalStringWasNullInsideOptionalCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalStringWasNullInsideOptionalClassName.c_str(), + NullableOptionalStringWasNullInsideOptionalCtorSignature.c_str(), + dataResponse.nullableOptionalStringWasNull.Value(), + NullableOptionalStringWasNullInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(NullableOptionalStringWasNullInsideOptional, + NullableOptionalStringWasNull); + } + jobject NullableOptionalStringValue; + if (!dataResponse.nullableOptionalStringValue.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableOptionalStringValue); + } + else + { + jobject NullableOptionalStringValueInsideOptional; + NullableOptionalStringValueInsideOptional = + env->NewStringUTF(std::string(dataResponse.nullableOptionalStringValue.Value().data(), + dataResponse.nullableOptionalStringValue.Value().size()) + .c_str()); + chip::JniReferences::GetInstance().CreateOptional(NullableOptionalStringValueInsideOptional, NullableOptionalStringValue); + } + jobject NullableStructWasNull; + std::string NullableStructWasNullClassName = "java/lang/Boolean"; + std::string NullableStructWasNullCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(NullableStructWasNullClassName.c_str(), + NullableStructWasNullCtorSignature.c_str(), + dataResponse.nullableStructWasNull, NullableStructWasNull); + jobject NullableStructValue; + if (!dataResponse.nullableStructValue.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableStructValue); + } + else + { + jobject NullableStructValueInsideOptional; + jobject NullableStructValueInsideOptional_a; + std::string NullableStructValueInsideOptional_aClassName = "java/lang/Integer"; + std::string NullableStructValueInsideOptional_aCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableStructValueInsideOptional_aClassName.c_str(), NullableStructValueInsideOptional_aCtorSignature.c_str(), + dataResponse.nullableStructValue.Value().a, NullableStructValueInsideOptional_a); + jobject NullableStructValueInsideOptional_b; + std::string NullableStructValueInsideOptional_bClassName = "java/lang/Boolean"; + std::string NullableStructValueInsideOptional_bCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableStructValueInsideOptional_bClassName.c_str(), NullableStructValueInsideOptional_bCtorSignature.c_str(), + dataResponse.nullableStructValue.Value().b, NullableStructValueInsideOptional_b); + jobject NullableStructValueInsideOptional_c; + std::string NullableStructValueInsideOptional_cClassName = "java/lang/Integer"; + std::string NullableStructValueInsideOptional_cCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableStructValueInsideOptional_cClassName.c_str(), NullableStructValueInsideOptional_cCtorSignature.c_str(), + static_cast(dataResponse.nullableStructValue.Value().c), NullableStructValueInsideOptional_c); + jobject NullableStructValueInsideOptional_d; + jbyteArray NullableStructValueInsideOptional_dByteArray = + env->NewByteArray(static_cast(dataResponse.nullableStructValue.Value().d.size())); + env->SetByteArrayRegion(NullableStructValueInsideOptional_dByteArray, 0, + static_cast(dataResponse.nullableStructValue.Value().d.size()), + reinterpret_cast(dataResponse.nullableStructValue.Value().d.data())); + NullableStructValueInsideOptional_d = NullableStructValueInsideOptional_dByteArray; + jobject NullableStructValueInsideOptional_e; + NullableStructValueInsideOptional_e = env->NewStringUTF( + std::string(dataResponse.nullableStructValue.Value().e.data(), dataResponse.nullableStructValue.Value().e.size()) + .c_str()); + jobject NullableStructValueInsideOptional_f; + std::string NullableStructValueInsideOptional_fClassName = "java/lang/Integer"; + std::string NullableStructValueInsideOptional_fCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableStructValueInsideOptional_fClassName.c_str(), NullableStructValueInsideOptional_fCtorSignature.c_str(), + dataResponse.nullableStructValue.Value().f.Raw(), NullableStructValueInsideOptional_f); + jobject NullableStructValueInsideOptional_g; + std::string NullableStructValueInsideOptional_gClassName = "java/lang/Float"; + std::string NullableStructValueInsideOptional_gCtorSignature = "(F)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableStructValueInsideOptional_gClassName.c_str(), NullableStructValueInsideOptional_gCtorSignature.c_str(), + dataResponse.nullableStructValue.Value().g, NullableStructValueInsideOptional_g); + jobject NullableStructValueInsideOptional_h; + std::string NullableStructValueInsideOptional_hClassName = "java/lang/Double"; + std::string NullableStructValueInsideOptional_hCtorSignature = "(D)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableStructValueInsideOptional_hClassName.c_str(), NullableStructValueInsideOptional_hCtorSignature.c_str(), + dataResponse.nullableStructValue.Value().h, NullableStructValueInsideOptional_h); + + jclass simpleStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); + return; + } + jmethodID simpleStructStructCtor_1 = + env->GetMethodID(simpleStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" + "Integer;Ljava/lang/Float;Ljava/lang/Double;)V"); + if (simpleStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); + return; + } + + NullableStructValueInsideOptional = env->NewObject( + simpleStructStructClass_1, simpleStructStructCtor_1, NullableStructValueInsideOptional_a, + NullableStructValueInsideOptional_b, NullableStructValueInsideOptional_c, NullableStructValueInsideOptional_d, + NullableStructValueInsideOptional_e, NullableStructValueInsideOptional_f, NullableStructValueInsideOptional_g, + NullableStructValueInsideOptional_h); + chip::JniReferences::GetInstance().CreateOptional(NullableStructValueInsideOptional, NullableStructValue); + } + jobject OptionalStructWasPresent; + std::string OptionalStructWasPresentClassName = "java/lang/Boolean"; + std::string OptionalStructWasPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(OptionalStructWasPresentClassName.c_str(), + OptionalStructWasPresentCtorSignature.c_str(), + dataResponse.optionalStructWasPresent, OptionalStructWasPresent); + jobject OptionalStructValue; + if (!dataResponse.optionalStructValue.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, OptionalStructValue); + } + else + { + jobject OptionalStructValueInsideOptional; + jobject OptionalStructValueInsideOptional_a; + std::string OptionalStructValueInsideOptional_aClassName = "java/lang/Integer"; + std::string OptionalStructValueInsideOptional_aCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + OptionalStructValueInsideOptional_aClassName.c_str(), OptionalStructValueInsideOptional_aCtorSignature.c_str(), + dataResponse.optionalStructValue.Value().a, OptionalStructValueInsideOptional_a); + jobject OptionalStructValueInsideOptional_b; + std::string OptionalStructValueInsideOptional_bClassName = "java/lang/Boolean"; + std::string OptionalStructValueInsideOptional_bCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + OptionalStructValueInsideOptional_bClassName.c_str(), OptionalStructValueInsideOptional_bCtorSignature.c_str(), + dataResponse.optionalStructValue.Value().b, OptionalStructValueInsideOptional_b); + jobject OptionalStructValueInsideOptional_c; + std::string OptionalStructValueInsideOptional_cClassName = "java/lang/Integer"; + std::string OptionalStructValueInsideOptional_cCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + OptionalStructValueInsideOptional_cClassName.c_str(), OptionalStructValueInsideOptional_cCtorSignature.c_str(), + static_cast(dataResponse.optionalStructValue.Value().c), OptionalStructValueInsideOptional_c); + jobject OptionalStructValueInsideOptional_d; + jbyteArray OptionalStructValueInsideOptional_dByteArray = + env->NewByteArray(static_cast(dataResponse.optionalStructValue.Value().d.size())); + env->SetByteArrayRegion(OptionalStructValueInsideOptional_dByteArray, 0, + static_cast(dataResponse.optionalStructValue.Value().d.size()), + reinterpret_cast(dataResponse.optionalStructValue.Value().d.data())); + OptionalStructValueInsideOptional_d = OptionalStructValueInsideOptional_dByteArray; + jobject OptionalStructValueInsideOptional_e; + OptionalStructValueInsideOptional_e = env->NewStringUTF( + std::string(dataResponse.optionalStructValue.Value().e.data(), dataResponse.optionalStructValue.Value().e.size()) + .c_str()); + jobject OptionalStructValueInsideOptional_f; + std::string OptionalStructValueInsideOptional_fClassName = "java/lang/Integer"; + std::string OptionalStructValueInsideOptional_fCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + OptionalStructValueInsideOptional_fClassName.c_str(), OptionalStructValueInsideOptional_fCtorSignature.c_str(), + dataResponse.optionalStructValue.Value().f.Raw(), OptionalStructValueInsideOptional_f); + jobject OptionalStructValueInsideOptional_g; + std::string OptionalStructValueInsideOptional_gClassName = "java/lang/Float"; + std::string OptionalStructValueInsideOptional_gCtorSignature = "(F)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + OptionalStructValueInsideOptional_gClassName.c_str(), OptionalStructValueInsideOptional_gCtorSignature.c_str(), + dataResponse.optionalStructValue.Value().g, OptionalStructValueInsideOptional_g); + jobject OptionalStructValueInsideOptional_h; + std::string OptionalStructValueInsideOptional_hClassName = "java/lang/Double"; + std::string OptionalStructValueInsideOptional_hCtorSignature = "(D)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + OptionalStructValueInsideOptional_hClassName.c_str(), OptionalStructValueInsideOptional_hCtorSignature.c_str(), + dataResponse.optionalStructValue.Value().h, OptionalStructValueInsideOptional_h); + + jclass simpleStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); + return; + } + jmethodID simpleStructStructCtor_1 = + env->GetMethodID(simpleStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" + "Integer;Ljava/lang/Float;Ljava/lang/Double;)V"); + if (simpleStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); + return; + } + + OptionalStructValueInsideOptional = env->NewObject( + simpleStructStructClass_1, simpleStructStructCtor_1, OptionalStructValueInsideOptional_a, + OptionalStructValueInsideOptional_b, OptionalStructValueInsideOptional_c, OptionalStructValueInsideOptional_d, + OptionalStructValueInsideOptional_e, OptionalStructValueInsideOptional_f, OptionalStructValueInsideOptional_g, + OptionalStructValueInsideOptional_h); + chip::JniReferences::GetInstance().CreateOptional(OptionalStructValueInsideOptional, OptionalStructValue); + } + jobject NullableOptionalStructWasPresent; + std::string NullableOptionalStructWasPresentClassName = "java/lang/Boolean"; + std::string NullableOptionalStructWasPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableOptionalStructWasPresentClassName.c_str(), NullableOptionalStructWasPresentCtorSignature.c_str(), + dataResponse.nullableOptionalStructWasPresent, NullableOptionalStructWasPresent); + jobject NullableOptionalStructWasNull; + if (!dataResponse.nullableOptionalStructWasNull.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableOptionalStructWasNull); + } + else + { + jobject NullableOptionalStructWasNullInsideOptional; + std::string NullableOptionalStructWasNullInsideOptionalClassName = "java/lang/Boolean"; + std::string NullableOptionalStructWasNullInsideOptionalCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalStructWasNullInsideOptionalClassName.c_str(), + NullableOptionalStructWasNullInsideOptionalCtorSignature.c_str(), + dataResponse.nullableOptionalStructWasNull.Value(), + NullableOptionalStructWasNullInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(NullableOptionalStructWasNullInsideOptional, + NullableOptionalStructWasNull); + } + jobject NullableOptionalStructValue; + if (!dataResponse.nullableOptionalStructValue.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableOptionalStructValue); + } + else + { + jobject NullableOptionalStructValueInsideOptional; + jobject NullableOptionalStructValueInsideOptional_a; + std::string NullableOptionalStructValueInsideOptional_aClassName = "java/lang/Integer"; + std::string NullableOptionalStructValueInsideOptional_aCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableOptionalStructValueInsideOptional_aClassName.c_str(), + NullableOptionalStructValueInsideOptional_aCtorSignature.c_str(), dataResponse.nullableOptionalStructValue.Value().a, + NullableOptionalStructValueInsideOptional_a); + jobject NullableOptionalStructValueInsideOptional_b; + std::string NullableOptionalStructValueInsideOptional_bClassName = "java/lang/Boolean"; + std::string NullableOptionalStructValueInsideOptional_bCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalStructValueInsideOptional_bClassName.c_str(), + NullableOptionalStructValueInsideOptional_bCtorSignature.c_str(), + dataResponse.nullableOptionalStructValue.Value().b, + NullableOptionalStructValueInsideOptional_b); + jobject NullableOptionalStructValueInsideOptional_c; + std::string NullableOptionalStructValueInsideOptional_cClassName = "java/lang/Integer"; + std::string NullableOptionalStructValueInsideOptional_cCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableOptionalStructValueInsideOptional_cClassName.c_str(), + NullableOptionalStructValueInsideOptional_cCtorSignature.c_str(), + static_cast(dataResponse.nullableOptionalStructValue.Value().c), NullableOptionalStructValueInsideOptional_c); + jobject NullableOptionalStructValueInsideOptional_d; + jbyteArray NullableOptionalStructValueInsideOptional_dByteArray = + env->NewByteArray(static_cast(dataResponse.nullableOptionalStructValue.Value().d.size())); + env->SetByteArrayRegion(NullableOptionalStructValueInsideOptional_dByteArray, 0, + static_cast(dataResponse.nullableOptionalStructValue.Value().d.size()), + reinterpret_cast(dataResponse.nullableOptionalStructValue.Value().d.data())); + NullableOptionalStructValueInsideOptional_d = NullableOptionalStructValueInsideOptional_dByteArray; + jobject NullableOptionalStructValueInsideOptional_e; + NullableOptionalStructValueInsideOptional_e = + env->NewStringUTF(std::string(dataResponse.nullableOptionalStructValue.Value().e.data(), + dataResponse.nullableOptionalStructValue.Value().e.size()) + .c_str()); + jobject NullableOptionalStructValueInsideOptional_f; + std::string NullableOptionalStructValueInsideOptional_fClassName = "java/lang/Integer"; + std::string NullableOptionalStructValueInsideOptional_fCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableOptionalStructValueInsideOptional_fClassName.c_str(), + NullableOptionalStructValueInsideOptional_fCtorSignature.c_str(), + dataResponse.nullableOptionalStructValue.Value().f.Raw(), NullableOptionalStructValueInsideOptional_f); + jobject NullableOptionalStructValueInsideOptional_g; + std::string NullableOptionalStructValueInsideOptional_gClassName = "java/lang/Float"; + std::string NullableOptionalStructValueInsideOptional_gCtorSignature = "(F)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableOptionalStructValueInsideOptional_gClassName.c_str(), + NullableOptionalStructValueInsideOptional_gCtorSignature.c_str(), dataResponse.nullableOptionalStructValue.Value().g, + NullableOptionalStructValueInsideOptional_g); + jobject NullableOptionalStructValueInsideOptional_h; + std::string NullableOptionalStructValueInsideOptional_hClassName = "java/lang/Double"; + std::string NullableOptionalStructValueInsideOptional_hCtorSignature = "(D)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableOptionalStructValueInsideOptional_hClassName.c_str(), + NullableOptionalStructValueInsideOptional_hCtorSignature.c_str(), dataResponse.nullableOptionalStructValue.Value().h, + NullableOptionalStructValueInsideOptional_h); + + jclass simpleStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); + return; + } + jmethodID simpleStructStructCtor_1 = + env->GetMethodID(simpleStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" + "Integer;Ljava/lang/Float;Ljava/lang/Double;)V"); + if (simpleStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); + return; + } + + NullableOptionalStructValueInsideOptional = + env->NewObject(simpleStructStructClass_1, simpleStructStructCtor_1, NullableOptionalStructValueInsideOptional_a, + NullableOptionalStructValueInsideOptional_b, NullableOptionalStructValueInsideOptional_c, + NullableOptionalStructValueInsideOptional_d, NullableOptionalStructValueInsideOptional_e, + NullableOptionalStructValueInsideOptional_f, NullableOptionalStructValueInsideOptional_g, + NullableOptionalStructValueInsideOptional_h); + chip::JniReferences::GetInstance().CreateOptional(NullableOptionalStructValueInsideOptional, NullableOptionalStructValue); + } + jobject NullableListWasNull; + std::string NullableListWasNullClassName = "java/lang/Boolean"; + std::string NullableListWasNullCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(NullableListWasNullClassName.c_str(), + NullableListWasNullCtorSignature.c_str(), + dataResponse.nullableListWasNull, NullableListWasNull); + jobject NullableListValue; + if (!dataResponse.nullableListValue.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableListValue); + } + else + { + jobject NullableListValueInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(NullableListValueInsideOptional); + + auto iter_NullableListValueInsideOptional_1 = dataResponse.nullableListValue.Value().begin(); + while (iter_NullableListValueInsideOptional_1.Next()) + { + auto & entry_1 = iter_NullableListValueInsideOptional_1.GetValue(); + jobject newElement_1; + std::string newElement_1ClassName = "java/lang/Integer"; + std::string newElement_1CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), static_cast(entry_1), newElement_1); + chip::JniReferences::GetInstance().AddToList(NullableListValueInsideOptional, newElement_1); + } + chip::JniReferences::GetInstance().CreateOptional(NullableListValueInsideOptional, NullableListValue); + } + jobject OptionalListWasPresent; + std::string OptionalListWasPresentClassName = "java/lang/Boolean"; + std::string OptionalListWasPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(OptionalListWasPresentClassName.c_str(), + OptionalListWasPresentCtorSignature.c_str(), + dataResponse.optionalListWasPresent, OptionalListWasPresent); + jobject OptionalListValue; + if (!dataResponse.optionalListValue.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, OptionalListValue); + } + else + { + jobject OptionalListValueInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(OptionalListValueInsideOptional); + + auto iter_OptionalListValueInsideOptional_1 = dataResponse.optionalListValue.Value().begin(); + while (iter_OptionalListValueInsideOptional_1.Next()) + { + auto & entry_1 = iter_OptionalListValueInsideOptional_1.GetValue(); + jobject newElement_1; + std::string newElement_1ClassName = "java/lang/Integer"; + std::string newElement_1CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), static_cast(entry_1), newElement_1); + chip::JniReferences::GetInstance().AddToList(OptionalListValueInsideOptional, newElement_1); + } + chip::JniReferences::GetInstance().CreateOptional(OptionalListValueInsideOptional, OptionalListValue); + } + jobject NullableOptionalListWasPresent; + std::string NullableOptionalListWasPresentClassName = "java/lang/Boolean"; + std::string NullableOptionalListWasPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + NullableOptionalListWasPresentClassName.c_str(), NullableOptionalListWasPresentCtorSignature.c_str(), + dataResponse.nullableOptionalListWasPresent, NullableOptionalListWasPresent); + jobject NullableOptionalListWasNull; + if (!dataResponse.nullableOptionalListWasNull.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableOptionalListWasNull); + } + else + { + jobject NullableOptionalListWasNullInsideOptional; + std::string NullableOptionalListWasNullInsideOptionalClassName = "java/lang/Boolean"; + std::string NullableOptionalListWasNullInsideOptionalCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(NullableOptionalListWasNullInsideOptionalClassName.c_str(), + NullableOptionalListWasNullInsideOptionalCtorSignature.c_str(), + dataResponse.nullableOptionalListWasNull.Value(), + NullableOptionalListWasNullInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(NullableOptionalListWasNullInsideOptional, NullableOptionalListWasNull); + } + jobject NullableOptionalListValue; + if (!dataResponse.nullableOptionalListValue.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, NullableOptionalListValue); + } + else + { + jobject NullableOptionalListValueInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(NullableOptionalListValueInsideOptional); + + auto iter_NullableOptionalListValueInsideOptional_1 = dataResponse.nullableOptionalListValue.Value().begin(); + while (iter_NullableOptionalListValueInsideOptional_1.Next()) + { + auto & entry_1 = iter_NullableOptionalListValueInsideOptional_1.GetValue(); + jobject newElement_1; + std::string newElement_1ClassName = "java/lang/Integer"; + std::string newElement_1CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), static_cast(entry_1), newElement_1); + chip::JniReferences::GetInstance().AddToList(NullableOptionalListValueInsideOptional, newElement_1); + } + chip::JniReferences::GetInstance().CreateOptional(NullableOptionalListValueInsideOptional, NullableOptionalListValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, NullableIntWasNull, NullableIntValue, OptionalIntWasPresent, OptionalIntValue, + NullableOptionalIntWasPresent, NullableOptionalIntWasNull, NullableOptionalIntValue, NullableStringWasNull, + NullableStringValue, OptionalStringWasPresent, OptionalStringValue, NullableOptionalStringWasPresent, + NullableOptionalStringWasNull, NullableOptionalStringValue, NullableStructWasNull, NullableStructValue, + OptionalStructWasPresent, OptionalStructValue, NullableOptionalStructWasPresent, + NullableOptionalStructWasNull, NullableOptionalStructValue, NullableListWasNull, NullableListValue, + OptionalListWasPresent, OptionalListValue, NullableOptionalListWasPresent, NullableOptionalListWasNull, + NullableOptionalListValue); +} CHIPUnitTestingClusterBooleanResponseCallback::CHIPUnitTestingClusterBooleanResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) { @@ -4359,4 +5954,67 @@ void CHIPUnitTestingClusterTestEmitTestEventResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, value); } +CHIPUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback:: + CHIPUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback:: + ~CHIPUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback::CallbackFn( + void * context, + const chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + dataResponse.value, value); + + env->CallVoidMethod(javaCallbackRef, javaMethod, value); +} } // namespace chip diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h index fb3446a16f3935..5a264fb1994368 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h @@ -160,6 +160,49 @@ class CHIPScenesClusterGetSceneMembershipResponseCallback jobject javaCallbackRef; }; +class CHIPScenesClusterEnhancedAddSceneResponseCallback + : public Callback::Callback +{ +public: + CHIPScenesClusterEnhancedAddSceneResponseCallback(jobject javaCallback); + + ~CHIPScenesClusterEnhancedAddSceneResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPScenesClusterEnhancedViewSceneResponseCallback + : public Callback::Callback +{ +public: + CHIPScenesClusterEnhancedViewSceneResponseCallback(jobject javaCallback); + + ~CHIPScenesClusterEnhancedViewSceneResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPScenesClusterCopySceneResponseCallback : public Callback::Callback +{ +public: + CHIPScenesClusterCopySceneResponseCallback(jobject javaCallback); + + ~CHIPScenesClusterCopySceneResponseCallback(); + + static void CallbackFn(void * context, const chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback : public Callback::Callback { @@ -597,6 +640,38 @@ class CHIPAccountLoginClusterGetSetupPINResponseCallback jobject javaCallbackRef; }; +class CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback + : public Callback::Callback +{ +public: + CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback(jobject javaCallback); + + ~CHIPElectricalMeasurementClusterGetProfileInfoResponseCommandCallback(); + + static void + CallbackFn(void * context, + const chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallback + : public Callback::Callback +{ +public: + CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallback(jobject javaCallback); + + ~CHIPElectricalMeasurementClusterGetMeasurementProfileResponseCommandCallback(); + + static void CallbackFn( + void * context, + const chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPUnitTestingClusterTestSpecificResponseCallback : public Callback::Callback { @@ -627,6 +702,36 @@ class CHIPUnitTestingClusterTestAddArgumentsResponseCallback jobject javaCallbackRef; }; +class CHIPUnitTestingClusterTestSimpleArgumentResponseCallback + : public Callback::Callback +{ +public: + CHIPUnitTestingClusterTestSimpleArgumentResponseCallback(jobject javaCallback); + + ~CHIPUnitTestingClusterTestSimpleArgumentResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback + : public Callback::Callback +{ +public: + CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback(jobject javaCallback); + + ~CHIPUnitTestingClusterTestStructArrayArgumentResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::UnitTesting::Commands::TestStructArrayArgumentResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPUnitTestingClusterTestListInt8UReverseResponseCallback : public Callback::Callback { @@ -672,6 +777,22 @@ class CHIPUnitTestingClusterTestNullableOptionalResponseCallback jobject javaCallbackRef; }; +class CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback + : public Callback::Callback +{ +public: + CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback(jobject javaCallback); + + ~CHIPUnitTestingClusterTestComplexNullableOptionalResponseCallback(); + + static void + CallbackFn(void * context, + const chip::app::Clusters::UnitTesting::Commands::TestComplexNullableOptionalResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPUnitTestingClusterBooleanResponseCallback : public Callback::Callback { public: @@ -715,4 +836,20 @@ class CHIPUnitTestingClusterTestEmitTestEventResponseCallback jobject javaCallbackRef; }; +class CHIPUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback + : public Callback::Callback +{ +public: + CHIPUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback(jobject javaCallback); + + ~CHIPUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback(); + + static void + CallbackFn(void * context, + const chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + } // namespace chip From cefa2fed201d9be30ff7115e8854afdc81843d74 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 28 Mar 2023 16:38:36 -0400 Subject: [PATCH 018/158] Fix bridge FALLTHROUGH annotation (#25870) Co-authored-by: Andrei Litvin --- .../dynamic-bridge-app/linux/include/data-model/DataModel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/dynamic-bridge-app/linux/include/data-model/DataModel.h b/examples/dynamic-bridge-app/linux/include/data-model/DataModel.h index 6f78787830e3f3..cba8d3c9907129 100644 --- a/examples/dynamic-bridge-app/linux/include/data-model/DataModel.h +++ b/examples/dynamic-bridge-app/linux/include/data-model/DataModel.h @@ -277,7 +277,7 @@ CHIP_ERROR Decode(const ConcreteDataAttributePath & aPath, AttributeValueDecoder case ConcreteDataAttributePath::ListOperation::ReplaceAll: x.clear(); - // fallthrough + FALLTHROUGH; default: x.emplace_back(); return aDecoder.Decode(x.back()); From 1b5e18b8e6a2ceea073d3f6b99ff3cbc9d0deb5d Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 28 Mar 2023 20:46:12 -0400 Subject: [PATCH 019/158] Make implementing handleBDXTransferSessionEndForNodeID actually optional. (#25871) It's marked @optional in the API, but we're calling it unconditionally. --- .../Framework/CHIP/MTROTAProviderDelegateBridge.mm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm index d85222411918fe..3caacafae59533 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm @@ -316,11 +316,13 @@ CHIP_ERROR OnTransferSessionEnd(TransferSession::OutputEvent & event) auto nodeId = @(mNodeId.Value()); auto strongDelegate = mDelegate; - dispatch_async(mDelegateNotificationQueue, ^{ - [strongDelegate handleBDXTransferSessionEndForNodeID:nodeId - controller:controller - error:[MTRError errorForCHIPErrorCode:error]]; - }); + if ([strongDelegate respondsToSelector:@selector(handleBDXTransferSessionEndForNodeID:controller:error:)]) { + dispatch_async(mDelegateNotificationQueue, ^{ + [strongDelegate handleBDXTransferSessionEndForNodeID:nodeId + controller:controller + error:[MTRError errorForCHIPErrorCode:error]]; + }); + } ResetState(); return CHIP_NO_ERROR; From bd17b9f52f41eeac5aaa74c1ecf3a76e06dd6958 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 28 Mar 2023 20:56:10 -0400 Subject: [PATCH 020/158] Add some basic XCTest tests for OTA in the Darwin framework. (#25869) The change to MTRPairingTests.m is to stop using deprecated APIs. --- .github/workflows/darwin.yaml | 3 + .../Framework/CHIPTests/MTROTAProviderTests.m | 286 ++++++++++++++++++ .../Framework/CHIPTests/MTRPairingTests.m | 34 +-- .../Matter.xcodeproj/project.pbxproj | 4 + 4 files changed, 310 insertions(+), 17 deletions(-) create mode 100644 src/darwin/Framework/CHIPTests/MTROTAProviderTests.m diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index 5f054d177001bb..bd8af5cd75fd1f 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -139,6 +139,9 @@ jobs: run: | mkdir -p /tmp/darwin/framework-tests ../../../out/debug/chip-all-clusters-app --interface-id -1 > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) & + # Make sure ota-requestor is using a different port, discriminator, and KVS from all-clusters-app. + # And a different one from the test harness too; the test harness uses port 5541. + ../../../out/debug/chip-ota-requestor-app --interface-id -1 --secured-device-port 5542 --discriminator 1111 --KVS /tmp/chip-ota-requestor-kvs > >(tee /tmp/darwin/framework-tests/ota-requestor-app.log) 2> >(tee /tmp/darwin/framework-tests/ota-requestor-app-err.log >&2) & xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-incomplete-umbrella -Wno-unguarded-availability-new' > >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2) working-directory: src/darwin/Framework - name: Uploading log files diff --git a/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m b/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m new file mode 100644 index 00000000000000..83c1fb677bc72a --- /dev/null +++ b/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m @@ -0,0 +1,286 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// module headers +#import + +#import "MTRErrorTestUtils.h" +#import "MTRTestKeys.h" +#import "MTRTestResetCommissioneeHelper.h" +#import "MTRTestStorage.h" + +// system dependencies +#import + +// Set the following to 1 in order to run individual test case manually. +#define MANUAL_INDIVIDUAL_TEST 0 + +static const uint16_t kPairingTimeoutInSeconds = 10; +static const uint16_t kTimeoutInSeconds = 3; +static const uint64_t kDeviceId = 0x12341234; +// NOTE: This onboarding payload is for the chip-ota-requestor-app, not chip-all-clusters-app +static NSString * kOnboardingPayload = @"MT:-24J0SO527K10648G00"; + +static const uint16_t kLocalPort = 5541; +static const uint16_t kTestVendorId = 0xFFF1u; +static const uint16_t kOTAProviderEndpointId = 0; + +static MTRDevice * sConnectedDevice; + +// Singleton controller we use. +static MTRDeviceController * sController = nil; + +// Keys we can use to restart the controller. +static MTRTestKeys * sTestKeys = nil; + +@interface MTROTAProviderTestControllerDelegate : NSObject +@property (nonatomic, strong) XCTestExpectation * expectation; +@end + +@implementation MTROTAProviderTestControllerDelegate +- (id)initWithExpectation:(XCTestExpectation *)expectation +{ + self = [super init]; + if (self) { + _expectation = expectation; + } + return self; +} + +- (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError * _Nullable)error +{ + XCTAssertEqual(error.code, 0); + + NSError * commissionError = nil; + [sController commissionNodeWithID:@(kDeviceId) + commissioningParams:[[MTRCommissioningParameters alloc] init] + error:&commissionError]; + XCTAssertNil(commissionError); + + // Keep waiting for onCommissioningComplete +} + +- (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError *)error +{ + XCTAssertEqual(error.code, 0); + [_expectation fulfill]; + _expectation = nil; +} + +@end + +@interface MTROTAProviderDelegateImpl : NSObject +@property (nonatomic) XCTestExpectation * handleQueryImageExpectation; +@end + +@implementation MTROTAProviderDelegateImpl +- (void)handleQueryImageForNodeID:(NSNumber *)nodeID + controller:(MTRDeviceController *)controller + params:(MTROTASoftwareUpdateProviderClusterQueryImageParams *)params + completion:(void (^)(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + XCTAssertEqualObjects(nodeID, @(kDeviceId)); + XCTAssertEqual(controller, sController); + // TODO: Anything we can test here about the params? + + // TODO: Make it possible to configure our responses. + __auto_type * responseParams = [[MTROTASoftwareUpdateProviderClusterQueryImageResponseParams alloc] init]; + responseParams.status = @(MTROTASoftwareUpdateProviderOTAQueryStatusNotAvailable); + completion(responseParams, nil); + + if (self.handleQueryImageExpectation != nil) { + [self.handleQueryImageExpectation fulfill]; + } +} + +- (void)handleApplyUpdateRequestForNodeID:(NSNumber *)nodeID + controller:(MTRDeviceController *)controller + params:(MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams *)params + completion:(void (^)(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); +} + +- (void)handleNotifyUpdateAppliedForNodeID:(NSNumber *)nodeID + controller:(MTRDeviceController *)controller + params:(MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params + completion:(MTRStatusCompletion)completion +{ + completion([NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); +} + +- (void)handleBDXTransferSessionBeginForNodeID:(NSNumber *)nodeID + controller:(MTRDeviceController *)controller + fileDesignator:(NSString *)fileDesignator + offset:(NSNumber *)offset + completion:(MTRStatusCompletion)completion +{ + completion([NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); +} + +- (void)handleBDXQueryForNodeID:(NSNumber *)nodeID + controller:(MTRDeviceController *)controller + blockSize:(NSNumber *)blockSize + blockIndex:(NSNumber *)blockIndex + bytesToSkip:(NSNumber *)bytesToSkip + completion:(void (^)(NSData * _Nullable data, BOOL isEOF))completion +{ + completion(nil, YES); +} + +- (void)handleBDXTransferSessionEndForNodeID:(NSNumber *)nodeID + controller:(MTRDeviceController *)controller + error:(NSError * _Nullable)error +{ +} + +@end + +static MTROTAProviderDelegateImpl * sOTAProviderDelegate; + +@interface MTROTAProviderTests : XCTestCase +@end + +@implementation MTROTAProviderTests + +- (void)setUp +{ + [super setUp]; + [self setContinueAfterFailure:NO]; +} + +- (void)tearDown +{ +#if MANUAL_INDIVIDUAL_TEST + [self shutdownStack]; +#endif + [super tearDown]; +} + +- (void)initStack +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type * storage = [[MTRTestStorage alloc] init]; + sOTAProviderDelegate = [[MTROTAProviderDelegateImpl alloc] init]; + + __auto_type * factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + factoryParams.port = @(kLocalPort); + factoryParams.otaProviderDelegate = sOTAProviderDelegate; + factoryParams.shouldStartServer = YES; + + BOOL ok = [factory startControllerFactory:factoryParams error:nil]; + XCTAssertTrue(ok); + + __auto_type * testKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(testKeys); + + sTestKeys = testKeys; + + // Needs to match what startControllerOnExistingFabric calls elsewhere in + // this file do. + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:testKeys.ipk fabricID:@(1) nocSigner:testKeys]; + params.vendorID = @(kTestVendorId); + + MTRDeviceController * controller = [factory createControllerOnNewFabric:params error:nil]; + XCTAssertNotNil(controller); + + sController = controller; + + XCTestExpectation * expectation = [self expectationWithDescription:@"Commissioning Complete"]; + __auto_type * deviceControllerDelegate = [[MTROTAProviderTestControllerDelegate alloc] initWithExpectation:expectation]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.device_controller_delegate", DISPATCH_QUEUE_SERIAL); + + [controller setDeviceControllerDelegate:deviceControllerDelegate queue:callbackQueue]; + + NSError * error; + __auto_type * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:kOnboardingPayload error:&error]; + XCTAssertNotNil(payload); + XCTAssertNil(error); + + [controller setupCommissioningSessionWithPayload:payload newNodeID:@(kDeviceId) error:&error]; + XCTAssertNil(error); + + [self waitForExpectations:@[ expectation ] timeout:kPairingTimeoutInSeconds]; + + sConnectedDevice = [MTRDevice deviceWithNodeID:@(kDeviceId) controller:controller]; +} + +- (void)shutdownStack +{ + MTRDeviceController * controller = sController; + XCTAssertNotNil(controller); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); + + [[MTRDeviceControllerFactory sharedInstance] stopControllerFactory]; +} + +#if !MANUAL_INDIVIDUAL_TEST +- (void)test000_SetUp +{ + [self initStack]; +} +#endif + +- (void)test001_ReceiveOTAQuery +{ +#if MANUAL_INDIVIDUAL_TEST + [self initStack]; +#endif + + __auto_type * device = sConnectedDevice; + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * queryExpectation = [self expectationWithDescription:@"handleQueryImageForNodeID called"]; + XCTestExpectation * responseExpectation = [self expectationWithDescription:@"AnnounceOTAProvider succeeded"]; + sOTAProviderDelegate.handleQueryImageExpectation = queryExpectation; + + // Advertise ourselves as an OTA provider. + __auto_type * params = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams alloc] init]; + params.providerNodeID = [sController controllerNodeID]; + params.vendorID = @(kTestVendorId); + params.announcementReason = @(MTROTASoftwareUpdateRequestorOTAAnnouncementReasonSimpleAnnouncement); + params.endpoint = @(kOTAProviderEndpointId); + + __auto_type * cluster = [[MTRClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(0) queue:queue]; + [cluster announceOTAProviderWithParams:params + expectedValues:nil + expectedValueInterval:nil + completion:^(NSError * _Nullable error) { + XCTAssertNil(error); + [responseExpectation fulfill]; + }]; + + [self waitForExpectations:@[ queryExpectation, responseExpectation ] timeout:kTimeoutInSeconds]; + sOTAProviderDelegate.handleQueryImageExpectation = nil; +} + +#if !MANUAL_INDIVIDUAL_TEST +- (void)test999_TearDown +{ + __auto_type * device = [MTRBaseDevice deviceWithNodeID:@(kDeviceId) controller:sController]; + ResetCommissionee(device, dispatch_get_main_queue(), self, kTimeoutInSeconds); + [self shutdownStack]; +} +#endif + +@end diff --git a/src/darwin/Framework/CHIPTests/MTRPairingTests.m b/src/darwin/Framework/CHIPTests/MTRPairingTests.m index f2d59c67d58319..ba164102055f13 100644 --- a/src/darwin/Framework/CHIPTests/MTRPairingTests.m +++ b/src/darwin/Framework/CHIPTests/MTRPairingTests.m @@ -72,13 +72,13 @@ - (void)deviceAttestationCompletedForController:(MTRDeviceController *)controlle @end -@interface MTRPairingTestPairingDelegate : NSObject +@interface MTRPairingTestControllerDelegate : NSObject @property (nonatomic, strong) XCTestExpectation * expectation; @property (nonatomic, nullable) id attestationDelegate; @property (nonatomic, nullable) NSNumber * failSafeExtension; @end -@implementation MTRPairingTestPairingDelegate +@implementation MTRPairingTestControllerDelegate - (id)initWithExpectation:(XCTestExpectation *)expectation attestationDelegate:(id)attestationDelegate failSafeExtension:(NSNumber *)failSafeExtension @@ -92,7 +92,7 @@ - (id)initWithExpectation:(XCTestExpectation *)expectation return self; } -- (void)onPairingComplete:(NSError *)error +- (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError * _Nullable)error { XCTAssertEqual(error.code, 0); @@ -101,13 +101,13 @@ - (void)onPairingComplete:(NSError *)error params.failSafeTimeout = self.failSafeExtension; NSError * commissionError = nil; - [sController commissionDevice:sDeviceId commissioningParams:params error:&commissionError]; + [controller commissionNodeWithID:@(sDeviceId) commissioningParams:params error:&commissionError]; XCTAssertNil(commissionError); // Keep waiting for onCommissioningComplete } -- (void)onCommissioningComplete:(NSError *)error +- (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError * _Nullable)error { XCTAssertEqual(error.code, 0); [_expectation fulfill]; @@ -121,15 +121,15 @@ static void DoPairingTest(XCTestCase * testcase, id Date: Wed, 29 Mar 2023 08:57:31 +0200 Subject: [PATCH 021/158] doc: chip_tool: clarify some parts (#25818) * doc: chip_tool: clarify some parts Edited sections that were in need of updates after the previous review. These edits change the meaning of existing doc in the parts related to the interactive mode vs single-command mode, and in the part about commissioning commands. Signed-off-by: Grzegorz Ferenc * Restyled by prettier-markdown --------- Signed-off-by: Grzegorz Ferenc Co-authored-by: Restyled.io --- docs/guides/chip_tool_guide.md | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/docs/guides/chip_tool_guide.md b/docs/guides/chip_tool_guide.md index 2bc999d9ecc5ac..655cc226fb6e0c 100644 --- a/docs/guides/chip_tool_guide.md +++ b/docs/guides/chip_tool_guide.md @@ -257,14 +257,15 @@ Alternatively, you can also use a QR code payload. ##### Commissioning with setup PIN code -To discover devices and try to pair with the first discovered device using the -provided setup code, use the following command pattern: +To discover devices and try to pair with one of them using the provided setup +code, use the following command pattern: ``` $ ./chip-tool pairing onnetwork ``` -In this command: +The command keeps trying devices until pairing with one of them succeeds or +until it runs out of pairing possibilities. In this command: - __ is the user-defined ID of the node being commissioned. - __ is device specific _setup PIN code_ determined in the @@ -273,14 +274,15 @@ In this command: ##### Commissioning with long discriminator -To discover devices with a long discriminator and try to pair with the first -discovered one using the provided setup code, use the following command pattern: +To discover devices with a long discriminator and try to pair with one of them +using the provided setup code, use the following command pattern: ``` $ ./chip-tool pairing onnetwork-long ``` -In this command: +The command keeps trying devices until pairing with one of them succeeds or +until it runs out of pairing possibilities. In this command: - __ is the user-defined ID of the node being commissioned. - __ and __ are device specific keys determined in @@ -292,14 +294,14 @@ In this command: Matter devices log the QR code payload and manual pairing code when they boot. To discover devices based on the given QR code payload or manual pairing code -and try to pair with the first discovered one, use the following command -pattern: +and try to pair with one of them, use the following command pattern: ``` $ ./chip-tool pairing code ``` -In this command: +The command keeps trying devices until pairing with one of them succeeds or +until it runs out of pairing possibilities. In this command: - __ is the user-defined ID of the node being commissioned. - __ is the QR code payload ID, for example @@ -410,10 +412,15 @@ The CHIP Tool can run in one of the following modes: [1650992689511] [32397:1415601] CHIP: [TOO] Run command failure: ../../../examples/chip-tool/commands/common/CHIPCommand.cpp:392: CHIP Error 0x00000032: Timeout ``` + Moreover, when using the single-command mode, the CHIP Tool will establish a + new CASE session with every command sent. + - Interactive mode - In this mode, a command will terminate with an error if it does not complete within the timeout period. However, the CHIP Tool will not be terminated and it will not terminate processes that previous commands - have started. + have started. Moreover, when using the interactive mode, the CHIP Tool will + establish a new CASE session only when there is no session available yet. On + the following commands, it will use the existing session. #### Modifying timeout duration in single-command mode From 2d4895e147246eb2edc7224dec1e56f0c380fd15 Mon Sep 17 00:00:00 2001 From: Grzegorz Ferenc <41291385+greg-fer@users.noreply.github.com> Date: Wed, 29 Mar 2023 15:30:20 +0200 Subject: [PATCH 022/158] doc: doc structure edits (#25821) * doc: doc structure edits Updated landing page for Guides with structure from guides/README.md. Excluded guides/README.md from doxygen build, so it only shows in GH. Added links to docs on the main README.md. Signed-off-by: Grzegorz Ferenc * Restyled by prettier-markdown * misspell: add docbuild to ignored word list Added docbuild to .wordlist.txt. Signed-off-by: Grzegorz Ferenc --------- Signed-off-by: Grzegorz Ferenc Co-authored-by: Restyled.io --- .github/.wordlist.txt | 1 + README.md | 49 +++++++++++++++++++++++++------------------ docs/conf.py | 3 ++- docs/guides/index.md | 49 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 81 insertions(+), 21 deletions(-) diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 2d43504f1cd83d..5b812d9e1dc6b1 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -434,6 +434,7 @@ Dnsmasq dnsmasqd DNSSD DNSStubListener +docbuild Dockerfile Dockerfiles Don'ts diff --git a/README.md b/README.md index 03e41c39f2b448..1dd90182ee5181 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Builds](https://github.com/project-chip/connectedhomeip/workflows/Builds/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/build.yaml) +**Examples:** [![Examples - EFR32](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20EFR32/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-efr32.yaml) [![Examples - ESP32](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20ESP32/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-esp32.yaml) [![Examples - i.MX Linux](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20i.MX%20Linux/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-linux-imx.yaml) @@ -14,14 +15,22 @@ [![Build example - Infineon](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-infineon.yaml/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-infineon.yaml) [![Build example - BouffaloLab](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20BouffaloLab/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-bouffalolab.yaml) +**Platforms:** [![Android](https://github.com/project-chip/connectedhomeip/workflows/Android/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/android.yaml) +**Tests:** [![Unit / Integration Tests](https://github.com/project-chip/connectedhomeip/workflows/Unit%20/%20Integration%20Tests/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/unit_integration_test.yaml) [![Cirque](https://github.com/project-chip/connectedhomeip/workflows/Cirque/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/cirque.yaml) [![QEMU](https://github.com/project-chip/connectedhomeip/workflows/QEMU/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/qemu.yaml) +**Tools:** [![ZAP Templates](https://github.com/project-chip/connectedhomeip/workflows/ZAP/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/zap_templates.yaml) +**Documentation:** +[![Documentation Build](https://github.com/project-chip/connectedhomeip/actions/workflows/docbuild.yaml/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/docbuild.yaml) + +- [Matter SDK documentation page](https://project-chip.github.io/connectedhomeip-doc/index.html) + # About Matter (formerly Project CHIP) creates more connections between more objects, @@ -180,26 +189,26 @@ Instructions about how to build Matter can be found [here](./docs/README.md) . The Matter repository is structured as follows: -| File/Folder | Content | -| ------------------ | ------------------------------------------------------------------ | -| build | Build system support content and built output directories | -| build_overrides | Build system parameter customization for different platforms | -| config | Project configurations | -| credentials | Development and test credentials | -| docs | Documentation, including guides | -| examples | Example firmware applications that demonstrate use of Matter | -| integrations | 3rd Party integrations | -| scripts | Scripts needed to work with the Matter repository | -| src | Implementation of Matter | -| third_party | 3rd party code used by Matter | -| zzz_generated | zap generated template code - Revolving around cluster information | -| BUILD.gn | Build file for the gn build system | -| CODE_OF_CONDUCT.md | Code of conduct for Matter and contribution to it | -| CONTRIBUTING.md | Guidelines for contributing to Matter | -| LICENSE | Matter license file | -| REVIEWERS.md | PR reviewers | -| gn_build.sh | Build script for specific projects such as Android, EFR32, etc. | -| README.md | This File | +| File/Folder | Content | +| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| build | Build system support content and built output directories | +| build_overrides | Build system parameter customization for different platforms | +| config | Project configurations | +| credentials | Development and test credentials | +| docs | Documentation, including guides. Visit the [Matter SDK documentation page](https://project-chip.github.io/connectedhomeip-doc/index.html) to read it. | +| examples | Example firmware applications that demonstrate use of Matter | +| integrations | 3rd Party integrations | +| scripts | Scripts needed to work with the Matter repository | +| src | Implementation of Matter | +| third_party | 3rd party code used by Matter | +| zzz_generated | zap generated template code - Revolving around cluster information | +| BUILD.gn | Build file for the gn build system | +| CODE_OF_CONDUCT.md | Code of conduct for Matter and contribution to it | +| CONTRIBUTING.md | Guidelines for contributing to Matter | +| LICENSE | Matter license file | +| REVIEWERS.md | PR reviewers | +| gn_build.sh | Build script for specific projects such as Android, EFR32, etc. | +| README.md | This File | # License diff --git a/docs/conf.py b/docs/conf.py index 2434c39e7a7224..bf83e215be05b5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,7 +12,7 @@ # -- Project information ----------------------------------------------------- project = "Matter" -copyright = "2022, Matter Contributors" +copyright = "2020-2023, Matter Contributors" author = "Matter Contributors" version = "1.0.0" @@ -31,6 +31,7 @@ "examples/providers/README.md", "examples/thermostat/nxp/linux-se05x/README.md", "examples/common/m5stack-tft/repo", + "docs/guides/README.md", ] diff --git a/docs/guides/index.md b/docs/guides/index.md index 9b2d1b249d47e9..c6a488f8e8add5 100644 --- a/docs/guides/index.md +++ b/docs/guides/index.md @@ -6,7 +6,56 @@ and features. ```{toctree} :glob: :maxdepth: 1 +:hidden: * esp32/README ``` + +## Build Guides + +- [Building](./BUILDING.md) + +## Platform Guides + +- [Android - Building](./android_building.md) +- [Apple - Testing with iPhone, iPad, macOS, Apple TV, HomePod, Watch, etc](./darwin.md) +- [Espressif (ESP32) - Getting Started Guide](./esp32/README.md) +- [Infineon PSoC6 - Software Update](./infineon_psoc6_software_update.md) +- [Linux - Simulated Devices](./simulated_device_linux.md) +- [mbedOS - Adding a new target](./mbedos_add_new_target.md) +- [mbedOS - Commissioning](./mbedos_commissioning.md) +- [mbedOS - Platform Overview](./mbedos_platform_overview.md) +- [nRF Connect - Android Commissioning](./nrfconnect_android_commissioning.md) +- [nRF Connect - CLI Guide](./nrfconnect_examples_cli.md) +- [nRF Connect - Configuration](./nrfconnect_examples_configuration.md) +- [nRF Connect - Factory Data Configuration](./nrfconnect_factory_data_configuration.md) +- [nRF Connect - Platform Overview](./nrfconnect_platform_overview.md) +- [nRF Connect - Software Update](./nrfconnect_examples_software_update.md) +- [NXP - Android Commissioning](./nxp_k32w_android_commissioning.md) +- [NXP - Linux Examples](./nxp_imx8m_linux_examples.md) +- [Silicon Labs - Documentation](https://github.com/SiliconLabs/matter#readme) +- [Silicon Labs - Building](./silabs_efr32_building.md) +- [Silicon Labs - Software Update](./silabs_efr32_software_update.md) +- [TI - Platform Overview](./ti_platform_overview.md) + +## Tool Guides + +- [CHIP Tool](./chip_tool_guide.md) +- [Python Matter-Repl](./matter-repl.md) +- [python-chip-controller - Advanced](./python_chip_controller_advanced_usage.md) +- [python-chip-controller - Building](./python_chip_controller_building.md) + +## Development Guides + +- [Access Control](./access-control-guide.md) +- [IP Commissioning](./ip_commissioning.md) + +## Setup Guides + +- [Open Thread - Hardware suggestions](./openthread_rcp_nrf_dongle.md) +- [Open Thread - Setting up a Raspberry Pi as a Border Router](./openthread_border_router_pi.md) + +## Troubleshooting Guides + +- [Avahi - Troubleshooting](./troubleshooting_avahi.md) From 7ae0f48c0873a39bcac6ef6f0205c5224aaec08a Mon Sep 17 00:00:00 2001 From: Sid Hsu Date: Wed, 29 Mar 2023 22:56:03 +0800 Subject: [PATCH 023/158] [Infineon] Implement event-based Thread stack task for CYW30739. (#25796) * [Infineon] Implement event-based Thread stack task for CYW30739. * Add EventFlags for platform-specific wrappers of event flags. * Implement otTaskletsSignalPending and otSysEventSignalPending callback functions for the OpenThread stack to notify the Thread stack task if there are pending events to be processed. * Update CYW30739 SDK and ot-ifx submodules for the event-based implementations. * Use the default value of CHIP_DEVICE_CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE. * Disable OTA of lighting and lock apps because CYW30739 is running out of flash. * Enable OTA and disable FTD for the flash space. * Fix the documents. --- .../lighting-app/infineon/cyw30739/args.gni | 2 +- examples/lock-app/infineon/cyw30739/args.gni | 2 +- src/platform/Infineon/CYW30739/BUILD.gn | 2 + .../CYW30739/CHIPDevicePlatformConfig.h | 1 - src/platform/Infineon/CYW30739/EventFlags.cpp | 72 +++++++++++++++++++ src/platform/Infineon/CYW30739/EventFlags.h | 49 +++++++++++++ .../Infineon/CYW30739/PlatformManagerImpl.cpp | 28 ++------ .../Infineon/CYW30739/PlatformManagerImpl.h | 6 +- .../CYW30739/ThreadStackManagerImpl.cpp | 30 ++++++++ .../CYW30739/ThreadStackManagerImpl.h | 13 ++-- .../infineon/cyw30739_sdk/repos/30739A0 | 2 +- .../cyw30739_sdk/repos/CYW930739M2EVB-01 | 2 +- .../infineon/cyw30739_sdk/repos/btsdk-include | 2 +- .../infineon/cyw30739_sdk/repos/btsdk-tools | 2 +- third_party/openthread/ot-ifx | 2 +- 15 files changed, 176 insertions(+), 39 deletions(-) create mode 100644 src/platform/Infineon/CYW30739/EventFlags.cpp create mode 100644 src/platform/Infineon/CYW30739/EventFlags.h diff --git a/examples/lighting-app/infineon/cyw30739/args.gni b/examples/lighting-app/infineon/cyw30739/args.gni index b8aeb760b79fb6..c19de1f1304321 100644 --- a/examples/lighting-app/infineon/cyw30739/args.gni +++ b/examples/lighting-app/infineon/cyw30739/args.gni @@ -18,7 +18,7 @@ import("${chip_root}/src/platform/Infineon/CYW30739/args.gni") cyw30739_sdk_target = get_label_info(":sdk", "label_no_toolchain") -chip_openthread_ftd = true +chip_openthread_ftd = false chip_enable_ota_requestor = true diff --git a/examples/lock-app/infineon/cyw30739/args.gni b/examples/lock-app/infineon/cyw30739/args.gni index b8aeb760b79fb6..c19de1f1304321 100644 --- a/examples/lock-app/infineon/cyw30739/args.gni +++ b/examples/lock-app/infineon/cyw30739/args.gni @@ -18,7 +18,7 @@ import("${chip_root}/src/platform/Infineon/CYW30739/args.gni") cyw30739_sdk_target = get_label_info(":sdk", "label_no_toolchain") -chip_openthread_ftd = true +chip_openthread_ftd = false chip_enable_ota_requestor = true diff --git a/src/platform/Infineon/CYW30739/BUILD.gn b/src/platform/Infineon/CYW30739/BUILD.gn index 9759c32ede89b9..61f03102cc75b3 100644 --- a/src/platform/Infineon/CYW30739/BUILD.gn +++ b/src/platform/Infineon/CYW30739/BUILD.gn @@ -39,6 +39,8 @@ static_library("CYW30739") { "ConnectivityManagerImpl.h", "DiagnosticDataProviderImpl.cpp", "DiagnosticDataProviderImpl.h", + "EventFlags.cpp", + "EventFlags.h", "FactoryDataProvider.cpp", "FactoryDataProvider.h", "InetPlatformConfig.h", diff --git a/src/platform/Infineon/CYW30739/CHIPDevicePlatformConfig.h b/src/platform/Infineon/CYW30739/CHIPDevicePlatformConfig.h index f66eab30f51e68..1e43a7dcbbf87f 100644 --- a/src/platform/Infineon/CYW30739/CHIPDevicePlatformConfig.h +++ b/src/platform/Infineon/CYW30739/CHIPDevicePlatformConfig.h @@ -63,6 +63,5 @@ // -------------------- Network Telemetry Configuration -------------------- // -------------------- Event Logging Configuration -------------------- -#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE 256 // -------------------- Software Update Manager Configuration -------------------- diff --git a/src/platform/Infineon/CYW30739/EventFlags.cpp b/src/platform/Infineon/CYW30739/EventFlags.cpp new file mode 100644 index 00000000000000..4a299843cf6a39 --- /dev/null +++ b/src/platform/Infineon/CYW30739/EventFlags.cpp @@ -0,0 +1,72 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides a class that serves as a wrapper for the event system of CYW30739 + * platform's underlying RTOS. An event instance is comprised of 32 flags. + * Each flag can be utilized for thread synchronization purposes. + */ +#include "EventFlags.h" + +#include + +namespace chip { +namespace DeviceLayer { + +CHIP_ERROR EventFlags::Init(void) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + wiced_result_t result; + + mFlags = wiced_rtos_create_event_flags(); + VerifyOrExit(mFlags != nullptr, err = CHIP_ERROR_NO_MEMORY); + + result = wiced_rtos_init_event_flags(mFlags); + VerifyOrExit(result == WICED_SUCCESS, err = CHIP_ERROR_NO_MEMORY); + +exit: + return err; +} + +CHIP_ERROR EventFlags::Set(uint32_t flags) +{ + assert(!wiced_rtos_check_for_stack_overflow()); + + if (wiced_rtos_set_event_flags(mFlags, flags) != WICED_SUCCESS) + { + ChipLogError(DeviceLayer, "wiced_rtos_set_event_flags %08lx", flags); + return CHIP_ERROR_INTERNAL; + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR EventFlags::WaitAnyForever(uint32_t & flags) +{ + const wiced_result_t result = + wiced_rtos_wait_for_event_flags(mFlags, 0xffffffff, &flags, WICED_TRUE, WAIT_FOR_ANY_EVENT, WICED_WAIT_FOREVER); + if (result != WICED_SUCCESS) + { + ChipLogError(DeviceLayer, "wiced_rtos_wait_for_event_flags 0x%08x", result); + return CHIP_ERROR_INTERNAL; + } + return CHIP_NO_ERROR; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/Infineon/CYW30739/EventFlags.h b/src/platform/Infineon/CYW30739/EventFlags.h new file mode 100644 index 00000000000000..3ef5824683fc64 --- /dev/null +++ b/src/platform/Infineon/CYW30739/EventFlags.h @@ -0,0 +1,49 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides a class that serves as a wrapper for the event system of CYW30739 + * platform's underlying RTOS. An event instance is comprised of 32 flags. + * Each flag can be utilized for thread synchronization purposes. + */ + +#pragma once + +#include +#include + +namespace chip { +namespace DeviceLayer { + +/** + * A class represents an event group with 32 flags. + */ +class EventFlags +{ +public: + CHIP_ERROR Init(void); + CHIP_ERROR Set(uint32_t flags); + CHIP_ERROR WaitAnyForever(uint32_t & flags); + +private: + wiced_event_flags_t * mFlags; +}; + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/Infineon/CYW30739/PlatformManagerImpl.cpp b/src/platform/Infineon/CYW30739/PlatformManagerImpl.cpp index c2da0a1efc8414..643cecc44d9fdb 100644 --- a/src/platform/Infineon/CYW30739/PlatformManagerImpl.cpp +++ b/src/platform/Infineon/CYW30739/PlatformManagerImpl.cpp @@ -50,11 +50,8 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) VerifyOrExit(mThread != nullptr, err = CHIP_ERROR_NO_MEMORY); /* Initialize the event flags. */ - mEventFlags = wiced_rtos_create_event_flags(); - VerifyOrExit(mEventFlags != nullptr, err = CHIP_ERROR_NO_MEMORY); + ReturnErrorOnFailure(mEventFlags.Init()); - result = wiced_rtos_init_event_flags(mEventFlags); - VerifyOrExit(result == WICED_SUCCESS, err = CHIP_ERROR_NO_MEMORY); /* Initialize the event queue. */ mEventQueue = wiced_rtos_create_queue(); VerifyOrExit(mEventQueue != nullptr, err = CHIP_ERROR_NO_MEMORY); @@ -87,12 +84,9 @@ void PlatformManagerImpl::_RunEventLoop(void) while (true) { - uint32_t flags_set = 0; - const wiced_result_t result = wiced_rtos_wait_for_event_flags(mEventFlags, 0xffffffff, &flags_set, WICED_TRUE, - WAIT_FOR_ANY_EVENT, WICED_WAIT_FOREVER); - if (result != WICED_SUCCESS) + uint32_t flags_set = 0; + if (mEventFlags.WaitAnyForever(flags_set) != CHIP_NO_ERROR) { - ChipLogError(DeviceLayer, "wiced_rtos_wait_for_event_flags 0x%08x", result); continue; } @@ -147,7 +141,7 @@ CHIP_ERROR PlatformManagerImpl::_PostEvent(const ChipDeviceEvent * event) return CHIP_ERROR_INTERNAL; } - SetEventFlags(kPostEventFlag); + mEventFlags.Set(kPostEventFlag); return CHIP_NO_ERROR; } @@ -172,16 +166,6 @@ CHIP_ERROR PlatformManagerImpl::_StartChipTimer(System::Clock::Timeout durationM void PlatformManagerImpl::_Shutdown() {} -void PlatformManagerImpl::SetEventFlags(uint32_t flags) -{ - assert(!wiced_rtos_check_for_stack_overflow()); - - if (wiced_rtos_set_event_flags(mEventFlags, flags) != WICED_SUCCESS) - { - ChipLogError(DeviceLayer, "%s wiced_rtos_set_event_flags %08lx", __func__, flags); - } -} - void PlatformManagerImpl::HandleTimerEvent(void) { const CHIP_ERROR err = static_cast(DeviceLayer::SystemLayer()).HandlePlatformTimer(); @@ -217,7 +201,7 @@ void PlatformManagerImpl::HandlePostEvent(void) /* Set another application thread event if the event queue is not empty. */ if (!wiced_rtos_is_queue_empty(mEventQueue)) { - SetEventFlags(kPostEventFlag); + mEventFlags.Set(kPostEventFlag); } } @@ -229,7 +213,7 @@ void PlatformManagerImpl::EventLoopTaskMain(uint32_t arg) void PlatformManagerImpl::TimerCallback(WICED_TIMER_PARAM_TYPE params) { - PlatformMgrImpl().SetEventFlags(kTimerEventFlag); + PlatformMgrImpl().mEventFlags.Set(kTimerEventFlag); } int PlatformManagerImpl::GetEntropy(void * data, unsigned char * output, size_t len, size_t * olen) diff --git a/src/platform/Infineon/CYW30739/PlatformManagerImpl.h b/src/platform/Infineon/CYW30739/PlatformManagerImpl.h index 7d121f1dcb7b10..20912ddab9d032 100644 --- a/src/platform/Infineon/CYW30739/PlatformManagerImpl.h +++ b/src/platform/Infineon/CYW30739/PlatformManagerImpl.h @@ -26,7 +26,8 @@ #include #include -#include + +#include "EventFlags.h" namespace chip { namespace DeviceLayer { @@ -57,7 +58,6 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener CHIP_ERROR _StartChipTimer(System::Clock::Timeout durationMS); void _Shutdown(void); - void SetEventFlags(uint32_t flags); void HandleTimerEvent(void); void HandlePostEvent(void); @@ -67,7 +67,7 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener friend PlatformManagerImpl & PlatformMgrImpl(void); wiced_thread_t * mThread; - wiced_event_flags_t * mEventFlags; + EventFlags mEventFlags; wiced_queue_t * mEventQueue; wiced_timer_t mTimer; wiced_mutex_t * mMutex; diff --git a/src/platform/Infineon/CYW30739/ThreadStackManagerImpl.cpp b/src/platform/Infineon/CYW30739/ThreadStackManagerImpl.cpp index 67a1bea4c7ba42..747c04990242ca 100644 --- a/src/platform/Infineon/CYW30739/ThreadStackManagerImpl.cpp +++ b/src/platform/Infineon/CYW30739/ThreadStackManagerImpl.cpp @@ -45,6 +45,8 @@ CHIP_ERROR ThreadStackManagerImpl::_InitThreadStack() mThread = wiced_rtos_create_thread(); VerifyOrExit(mThread != nullptr, err = CHIP_ERROR_NO_MEMORY); + ReturnErrorOnFailure(mEventFlags.Init()); + mMutex = wiced_rtos_create_mutex(); VerifyOrExit(mMutex != nullptr, err = CHIP_ERROR_NO_MEMORY); @@ -58,6 +60,16 @@ CHIP_ERROR ThreadStackManagerImpl::_InitThreadStack() return err; } +void ThreadStackManagerImpl::SignalThreadActivityPending() +{ + mEventFlags.Set(kActivityPendingEventFlag); +} + +void ThreadStackManagerImpl::SignalThreadActivityPendingFromISR() +{ + mEventFlags.Set(kActivityPendingFromISREventFlag); +} + CHIP_ERROR ThreadStackManagerImpl::_StartThreadTask() { CHIP_ERROR err = CHIP_NO_ERROR; @@ -87,6 +99,12 @@ void ThreadStackManagerImpl::ThreadTaskMain(void) { while (true) { + uint32_t flags = 0; + if (mEventFlags.WaitAnyForever(flags) != CHIP_NO_ERROR) + { + continue; + } + LockThreadStack(); ProcessThreadActivity(); UnlockThreadStack(); @@ -102,6 +120,18 @@ void ThreadStackManagerImpl::ThreadTaskMain(uint32_t arg) } // namespace DeviceLayer } // namespace chip +using namespace ::chip::DeviceLayer; + +extern "C" void otTaskletsSignalPending(otInstance * p_instance) +{ + ThreadStackMgrImpl().SignalThreadActivityPending(); +} + +extern "C" void otSysEventSignalPending(void) +{ + ThreadStackMgrImpl().SignalThreadActivityPendingFromISR(); +} + extern "C" void * otPlatCAlloc(size_t aNum, size_t aSize) { return CHIPPlatformMemoryCalloc(aNum, aSize); diff --git a/src/platform/Infineon/CYW30739/ThreadStackManagerImpl.h b/src/platform/Infineon/CYW30739/ThreadStackManagerImpl.h index 2b3e295501dc58..cdb2cb8ee65fdc 100644 --- a/src/platform/Infineon/CYW30739/ThreadStackManagerImpl.h +++ b/src/platform/Infineon/CYW30739/ThreadStackManagerImpl.h @@ -26,7 +26,8 @@ #include #include -#include + +#include "EventFlags.h" namespace chip { namespace DeviceLayer { @@ -45,6 +46,8 @@ class ThreadStackManagerImpl final : public ThreadStackManager, // ===== Methods that implement the ThreadStackManager abstract interface. CHIP_ERROR _InitThreadStack(); + void SignalThreadActivityPending(); + void SignalThreadActivityPendingFromISR(); inline bool IsCurrentTask(void) { return wiced_rtos_is_current_thread(mThread) == WICED_SUCCESS; } protected: @@ -55,11 +58,6 @@ class ThreadStackManagerImpl final : public ThreadStackManager, bool _TryLockThreadStack(); void _UnlockThreadStack(); - // ===== Methods that override the GenericThreadStackManagerImpl_OpenThread abstract interface. - - void _OnCHIPoBLEAdvertisingStart(); - void _OnCHIPoBLEAdvertisingStop(); - private: // ===== Members for internal use by the following friends. @@ -67,6 +65,7 @@ class ThreadStackManagerImpl final : public ThreadStackManager, friend ThreadStackManagerImpl & ::chip::DeviceLayer::ThreadStackMgrImpl(void); wiced_thread_t * mThread; + EventFlags mEventFlags; wiced_mutex_t * mMutex; static ThreadStackManagerImpl sInstance; @@ -75,6 +74,8 @@ class ThreadStackManagerImpl final : public ThreadStackManager, void ThreadTaskMain(void); static void ThreadTaskMain(uint32_t arg); + static constexpr uint32_t kActivityPendingEventFlag = 1 << 0; + static constexpr uint32_t kActivityPendingFromISREventFlag = 1 << 1; }; /** diff --git a/third_party/infineon/cyw30739_sdk/repos/30739A0 b/third_party/infineon/cyw30739_sdk/repos/30739A0 index 85a07264df8533..f951c7d3d3c37e 160000 --- a/third_party/infineon/cyw30739_sdk/repos/30739A0 +++ b/third_party/infineon/cyw30739_sdk/repos/30739A0 @@ -1 +1 @@ -Subproject commit 85a07264df8533e8eaea85e340a98b4e648adfa1 +Subproject commit f951c7d3d3c37e995b38ea1fdfe1cdae9a5e9cc8 diff --git a/third_party/infineon/cyw30739_sdk/repos/CYW930739M2EVB-01 b/third_party/infineon/cyw30739_sdk/repos/CYW930739M2EVB-01 index d5f5b678236866..d3e46e83a248fd 160000 --- a/third_party/infineon/cyw30739_sdk/repos/CYW930739M2EVB-01 +++ b/third_party/infineon/cyw30739_sdk/repos/CYW930739M2EVB-01 @@ -1 +1 @@ -Subproject commit d5f5b678236866620b8f4a88360fb035d3407e06 +Subproject commit d3e46e83a248fdd4617839761ce2333f8eac1f2c diff --git a/third_party/infineon/cyw30739_sdk/repos/btsdk-include b/third_party/infineon/cyw30739_sdk/repos/btsdk-include index b1eb9b39f3ef86..b9a1aac342f239 160000 --- a/third_party/infineon/cyw30739_sdk/repos/btsdk-include +++ b/third_party/infineon/cyw30739_sdk/repos/btsdk-include @@ -1 +1 @@ -Subproject commit b1eb9b39f3ef86211164c4d9825bee6316ac76c6 +Subproject commit b9a1aac342f2399ccd4894b0fe6f9e323a613b68 diff --git a/third_party/infineon/cyw30739_sdk/repos/btsdk-tools b/third_party/infineon/cyw30739_sdk/repos/btsdk-tools index 9743681eed4d3f..0943e94ccca9ed 160000 --- a/third_party/infineon/cyw30739_sdk/repos/btsdk-tools +++ b/third_party/infineon/cyw30739_sdk/repos/btsdk-tools @@ -1 +1 @@ -Subproject commit 9743681eed4d3f16a291bff6f8aee65349d1241b +Subproject commit 0943e94ccca9ed871b0e9a6ebfbc126ad50a6d11 diff --git a/third_party/openthread/ot-ifx b/third_party/openthread/ot-ifx index 2ee7240000f9bc..6bf0fdbd389794 160000 --- a/third_party/openthread/ot-ifx +++ b/third_party/openthread/ot-ifx @@ -1 +1 @@ -Subproject commit 2ee7240000f9bc6a876f3f4b31f02ca82dca5f43 +Subproject commit 6bf0fdbd38979435f66667ac0113d4fcee972a32 From 0f1fc1b230eca4b4ce2f45c4a8cf1ce238284e96 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 29 Mar 2023 12:43:02 -0400 Subject: [PATCH 024/158] Fix crashes during CASE establishment. (#25868) * Fix crashes during CASE establishment. There were two potential sources of crashes: 1) TryNextResult on the resolver scheduled an async task that could not be canceled. If, while that task was pending, the OperationalSessionSetup was destroyed (which could happen if another session for the same peer had become active in the meantime and another connection attempt happened) we would end up with use-after-free. 2) ScheduleSessionSetupReattempt scheduled a timer that was never being canceled. Similar to above, if the OperationalSessionSetup got destroyed before the timer fired we could end up with use-after-free. The fix for the first problem is to make TryNextResult synchronous, instead of scheduling an async task. The fix for the second problem is to introduce a new state of OperationalSessionSetup that's used while waiting for the timer and to ensure that the timer is canceled when leaving that state or if the OperationalSessionSetup is destroyed. To preserve existing behavior, if we are in the "waiting for timer" state and new connection attempt happens and there is a session we can attach to, then we immediately move to the Connected state (and cancel the timer). * Address review comments. --- src/app/OperationalSessionSetup.cpp | 64 +++++++++++++------ src/app/OperationalSessionSetup.h | 8 +++ src/lib/address_resolve/AddressResolve.h | 33 ++++++---- .../AddressResolve_DefaultImpl.cpp | 14 ++-- .../AddressResolve_DefaultImpl.h | 1 - 5 files changed, 80 insertions(+), 40 deletions(-) diff --git a/src/app/OperationalSessionSetup.cpp b/src/app/OperationalSessionSetup.cpp index 62551d66c22247..2e9d572a18618e 100644 --- a/src/app/OperationalSessionSetup.cpp +++ b/src/app/OperationalSessionSetup.cpp @@ -53,6 +53,14 @@ void OperationalSessionSetup::MoveToState(State aTargetState) ChipLogDetail(Discovery, "OperationalSessionSetup[%u:" ChipLogFormatX64 "]: State change %d --> %d", mPeerId.GetFabricIndex(), ChipLogValueX64(mPeerId.GetNodeId()), to_underlying(mState), to_underlying(aTargetState)); + +#if CHIP_DEVICE_CONFIG_ENABLE_AUTOMATIC_CASE_RETRIES + if (mState == State::WaitingForRetry) + { + CancelSessionSetupReattempt(); + } +#endif + mState = aTargetState; if (aTargetState != State::Connecting) @@ -64,7 +72,9 @@ void OperationalSessionSetup::MoveToState(State aTargetState) bool OperationalSessionSetup::AttachToExistingSecureSession() { - VerifyOrReturnError(mState == State::NeedsAddress || mState == State::ResolvingAddress || mState == State::HasAddress, false); + VerifyOrReturnError(mState == State::NeedsAddress || mState == State::ResolvingAddress || mState == State::HasAddress || + mState == State::WaitingForRetry, + false); auto sessionHandle = mInitParams.sessionManager->FindSecureSessionForNode(mPeerId, MakeOptional(Transport::SecureSession::Type::kCASE)); @@ -119,6 +129,7 @@ void OperationalSessionSetup::Connect(Callback::Callback * on break; case State::ResolvingAddress: + case State::WaitingForRetry: isConnected = AttachToExistingSecureSession(); break; @@ -320,20 +331,27 @@ void OperationalSessionSetup::OnSessionEstablishmentError(CHIP_ERROR error) { #if CHIP_DEVICE_CONFIG_ENABLE_AUTOMATIC_CASE_RETRIES // Make a copy of the ReliableMessageProtocolConfig, since our - // mCaseClient is about to go away. + // mCaseClient is about to go away once we change state. ReliableMessageProtocolConfig remoteMprConfig = mCASEClient->GetRemoteMRPIntervals(); #endif + // Move to the ResolvingAddress state, in case we have more results, + // since we expect to receive results in that state. + MoveToState(State::ResolvingAddress); if (CHIP_NO_ERROR == Resolver::Instance().TryNextResult(mAddressLookupHandle)) { #if CHIP_DEVICE_CONFIG_ENABLE_AUTOMATIC_CASE_RETRIES - // Our retry is going to be immediate, once the event loop spins. + // Our retry has already been kicked off. NotifyRetryHandlers(error, remoteMprConfig, System::Clock::kZero); #endif // CHIP_DEVICE_CONFIG_ENABLE_AUTOMATIC_CASE_RETRIES - MoveToState(State::ResolvingAddress); return; } + // Moving back to the Connecting state would be a bit of a lie, since we + // don't have an mCASEClient. Just go back to NeedsAddress, since + // that's really where we are now. + MoveToState(State::NeedsAddress); + #if CHIP_DEVICE_CONFIG_ENABLE_AUTOMATIC_CASE_RETRIES if (mRemainingAttempts > 0) { @@ -341,6 +359,7 @@ void OperationalSessionSetup::OnSessionEstablishmentError(CHIP_ERROR error) CHIP_ERROR err = ScheduleSessionSetupReattempt(reattemptDelay); if (err == CHIP_NO_ERROR) { + MoveToState(State::WaitingForRetry); NotifyRetryHandlers(error, remoteMprConfig, reattemptDelay); return; } @@ -406,6 +425,10 @@ OperationalSessionSetup::~OperationalSessionSetup() // Make sure we don't leak it. mClientPool->Release(mCASEClient); } + +#if CHIP_DEVICE_CONFIG_ENABLE_AUTOMATIC_CASE_RETRIES + CancelSessionSetupReattempt(); +#endif // CHIP_DEVICE_CONFIG_ENABLE_AUTOMATIC_CASE_RETRIES } CHIP_ERROR OperationalSessionSetup::LookupPeerAddress() @@ -553,27 +576,32 @@ CHIP_ERROR OperationalSessionSetup::ScheduleSessionSetupReattempt(System::Clock: return err; } +void OperationalSessionSetup::CancelSessionSetupReattempt() +{ + // If we can't get a system layer, there is no way for us to cancel things + // at this point, but hopefully that's because everything is torn down + // anyway and hence the timer will not fire. + auto * sessionManager = mInitParams.exchangeMgr->GetSessionManager(); + VerifyOrReturn(sessionManager != nullptr); + + auto * systemLayer = sessionManager->SystemLayer(); + VerifyOrReturn(systemLayer != nullptr); + + systemLayer->CancelTimer(TrySetupAgain, this); +} + void OperationalSessionSetup::TrySetupAgain(System::Layer * systemLayer, void * state) { auto * self = static_cast(state); - CHIP_ERROR err = CHIP_NO_ERROR; - - if (self->mState != State::NeedsAddress) - { - err = CHIP_ERROR_INCORRECT_STATE; - } - else + self->MoveToState(State::ResolvingAddress); + CHIP_ERROR err = self->LookupPeerAddress(); + if (err == CHIP_NO_ERROR) { - self->MoveToState(State::ResolvingAddress); - err = self->LookupPeerAddress(); - if (err == CHIP_NO_ERROR) - { - return; - } + return; } - // Give up; we're either in a bad state or could not start a lookup. + // Give up; we could not start a lookup. self->DequeueConnectionCallbacks(err); // Do not touch `self` instance anymore; it has been destroyed in DequeueConnectionCallbacks. } diff --git a/src/app/OperationalSessionSetup.h b/src/app/OperationalSessionSetup.h index cb3f624ba6724e..60f0f0ecaba5b7 100644 --- a/src/app/OperationalSessionSetup.h +++ b/src/app/OperationalSessionSetup.h @@ -253,6 +253,8 @@ class DLL_EXPORT OperationalSessionSetup : public SessionDelegate, HasAddress, // Have an address, CASE handshake not started yet. Connecting, // CASE handshake in progress. SecureConnected, // CASE session established. + WaitingForRetry, // No address known, but a retry is pending. Added at + // end to make logs easier to understand. }; CASEClientInitParams mInitParams; @@ -335,6 +337,12 @@ class DLL_EXPORT OperationalSessionSetup : public SessionDelegate, */ CHIP_ERROR ScheduleSessionSetupReattempt(System::Clock::Seconds16 & timerDelay); + /** + * Cancel a scheduled setup reattempt, if we can (i.e. if we still have + * access to the SystemLayer). + */ + void CancelSessionSetupReattempt(); + /** * Helper for our backoff retry timer. */ diff --git a/src/lib/address_resolve/AddressResolve.h b/src/lib/address_resolve/AddressResolve.h index 11c0959e3357df..8034aed7c1f28a 100644 --- a/src/lib/address_resolve/AddressResolve.h +++ b/src/lib/address_resolve/AddressResolve.h @@ -204,19 +204,30 @@ class Resolver /// in progress) virtual CHIP_ERROR LookupNode(const NodeLookupRequest & request, Impl::NodeLookupHandle & handle) = 0; - /// Inform the Lookup handle that the previous node lookup was not sufficient - /// for the purpose of the caller (e.g establishing a session fails with the - /// result of the previous lookup), and that more data is needed. + /// Inform the Lookup handle that the previous node lookup was not + /// sufficient for the purpose of the caller (e.g establishing a session + /// fails with the result of the previous lookup), and that more data is + /// needed. /// - /// If this returns CHIP_NO_ERROR, the following is expected: - /// - The listener OnNodeAddressResolved will be called with the additional data. - /// - handle must NOT be destroyed while the lookup is in progress (it - /// is part of an internal 'lookup list') - /// - handle must NOT be reused (the lookup is done on a per-node basis - /// and maintains lookup data internally while the operation is still - /// in progress) + /// This method must be called on a handle that is no longer active to + /// succeed. + /// + /// If the handle is no longer active and has results that have not been + /// delivered to the listener yet, the listener's OnNodeAddressResolved will + /// be called synchronously before the method returns. Note that depending + /// on the listener implementation this can end up destroying the handle + /// and/or the listener. + /// + /// This method will return CHIP_NO_ERROR if and only if it has called + /// OnNodeAddressResolved. + /// + /// This method will return CHIP_ERROR_INCORRECT_STATE if the handle is + /// still active. + /// + /// This method will return CHIP_ERROR_WELL_EMPTY if there are no more + /// results. /// - /// If no additional data is available at the time of the request, it returns CHIP_ERROR_WELL_EMPTY. + /// This method may return other errors in some cases. virtual CHIP_ERROR TryNextResult(Impl::NodeLookupHandle & handle) = 0; /// Stops an active lookup request. diff --git a/src/lib/address_resolve/AddressResolve_DefaultImpl.cpp b/src/lib/address_resolve/AddressResolve_DefaultImpl.cpp index a6b1bbde423dfb..10e50cbd734cfe 100644 --- a/src/lib/address_resolve/AddressResolve_DefaultImpl.cpp +++ b/src/lib/address_resolve/AddressResolve_DefaultImpl.cpp @@ -187,20 +187,14 @@ CHIP_ERROR Resolver::LookupNode(const NodeLookupRequest & request, Impl::NodeLoo CHIP_ERROR Resolver::TryNextResult(Impl::NodeLookupHandle & handle) { - VerifyOrReturnError(mSystemLayer != nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(!mActiveLookups.Contains(&handle), CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(handle.HasLookupResult(), CHIP_ERROR_WELL_EMPTY); - return mSystemLayer->ScheduleWork(&OnTryNextResult, static_cast(&handle)); -} - -void Resolver::OnTryNextResult(System::Layer * layer, void * context) -{ - auto handle = static_cast(context); - auto listener = handle->GetListener(); - auto peerId = handle->GetRequest().GetPeerId(); - auto result = handle->TakeLookupResult(); + auto listener = handle.GetListener(); + auto peerId = handle.GetRequest().GetPeerId(); + auto result = handle.TakeLookupResult(); listener->OnNodeAddressResolved(peerId, result); + return CHIP_NO_ERROR; } CHIP_ERROR Resolver::CancelLookup(Impl::NodeLookupHandle & handle, FailureCallback cancel_method) diff --git a/src/lib/address_resolve/AddressResolve_DefaultImpl.h b/src/lib/address_resolve/AddressResolve_DefaultImpl.h index a70e3466326716..ac6d7dd8d1f4d0 100644 --- a/src/lib/address_resolve/AddressResolve_DefaultImpl.h +++ b/src/lib/address_resolve/AddressResolve_DefaultImpl.h @@ -183,7 +183,6 @@ class Resolver : public ::chip::AddressResolve::Resolver, public Dnssd::Operatio private: static void OnResolveTimer(System::Layer * layer, void * context) { static_cast(context)->HandleTimer(); } - static void OnTryNextResult(System::Layer * layer, void * context); /// Timer on lookup node events: min and max search times. void HandleTimer(); From 6e37dc3631b3c2d3f5e0c1ed0d8ba28bc2393c04 Mon Sep 17 00:00:00 2001 From: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com> Date: Wed, 29 Mar 2023 15:12:25 -0400 Subject: [PATCH 025/158] Fix test value fallback for hardware version string read (#25864) --- .../platform/silabs/SiWx917/SiWx917DeviceDataProvider.cpp | 6 +++--- examples/platform/silabs/efr32/EFR32DeviceDataProvider.cpp | 6 +++--- src/include/platform/CHIPDeviceConfig.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/platform/silabs/SiWx917/SiWx917DeviceDataProvider.cpp b/examples/platform/silabs/SiWx917/SiWx917DeviceDataProvider.cpp index 651d6270574a57..30cc5172081c06 100644 --- a/examples/platform/silabs/SiWx917/SiWx917DeviceDataProvider.cpp +++ b/examples/platform/silabs/SiWx917/SiWx917DeviceDataProvider.cpp @@ -355,13 +355,13 @@ CHIP_ERROR SIWx917DeviceDataProvider::GetHardwareVersionString(char * buf, size_ size_t hardwareVersionStringLen = 0; // without counting null-terminator CHIP_ERROR err = SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_HardwareVersionString, buf, bufSize, hardwareVersionStringLen); -#if defined(CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION_STRING) +#if defined(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING) if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { - memcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION_STRING, sizeof(bufSize)); + memcpy(buf, CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING, bufSize); err = CHIP_NO_ERROR; } -#endif // CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION_STRING +#endif // CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING return err; } diff --git a/examples/platform/silabs/efr32/EFR32DeviceDataProvider.cpp b/examples/platform/silabs/efr32/EFR32DeviceDataProvider.cpp index 4a37ada00fa327..491fe1b117bbde 100644 --- a/examples/platform/silabs/efr32/EFR32DeviceDataProvider.cpp +++ b/examples/platform/silabs/efr32/EFR32DeviceDataProvider.cpp @@ -224,13 +224,13 @@ CHIP_ERROR EFR32DeviceDataProvider::GetHardwareVersionString(char * buf, size_t size_t hardwareVersionStringLen = 0; // without counting null-terminator CHIP_ERROR err = SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_HardwareVersionString, buf, bufSize, hardwareVersionStringLen); -#if defined(CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION_STRING) +#if defined(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING) if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { - memcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION_STRING, sizeof(bufSize)); + memcpy(buf, CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING, bufSize); err = CHIP_NO_ERROR; } -#endif // CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION_STRING +#endif // CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING return err; } diff --git a/src/include/platform/CHIPDeviceConfig.h b/src/include/platform/CHIPDeviceConfig.h index d95435954d1ad7..a3512e8f944925 100644 --- a/src/include/platform/CHIPDeviceConfig.h +++ b/src/include/platform/CHIPDeviceConfig.h @@ -224,7 +224,7 @@ #endif /** - * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION_STRING + * CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING * * Human readable string identifying version of the product assigned by the device vendor. */ From 2aefaa68dc9e40c8949a46b1e42b395f4a408d91 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Wed, 29 Mar 2023 21:48:37 +0200 Subject: [PATCH 026/158] Check WPA supplicant state before saving config (#22895) * Check WPA supplicant state before saving config * Add save config log message * Fix segfault when WiFi is not enabled but ble-wifi pairing is used * Fix typo in variable name associattion -> association * C++ initialization for GDBusWpaSupplicant struct * Add missing mWpaSupplicantMutex locks --------- Co-authored-by: Andrei Litvin --- .../Linux/ConnectivityManagerImpl.cpp | 48 +++++++++++++------ src/platform/Linux/ConnectivityManagerImpl.h | 26 +++++----- .../webos/ConnectivityManagerImpl.cpp | 30 +++++++----- src/platform/webos/ConnectivityManagerImpl.h | 22 +++++---- 4 files changed, 77 insertions(+), 49 deletions(-) diff --git a/src/platform/Linux/ConnectivityManagerImpl.cpp b/src/platform/Linux/ConnectivityManagerImpl.cpp index c04adfaf105780..57bba172fe3590 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.cpp +++ b/src/platform/Linux/ConnectivityManagerImpl.cpp @@ -147,7 +147,8 @@ void ConnectivityManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) } #if CHIP_DEVICE_CONFIG_ENABLE_WPA -bool ConnectivityManagerImpl::mAssociattionStarted = false; + +bool ConnectivityManagerImpl::mAssociationStarted = false; BitFlags::ConnectivityFlags> ConnectivityManagerImpl::mConnectivityFlag; struct GDBusWpaSupplicant ConnectivityManagerImpl::mWpaSupplicant; @@ -157,6 +158,7 @@ ConnectivityManager::WiFiStationMode ConnectivityManagerImpl::_GetWiFiStationMod { if (mWiFiStationMode != kWiFiStationMode_ApplicationControlled) { + std::lock_guard lock(mWpaSupplicantMutex); mWiFiStationMode = (mWpaSupplicant.iface != nullptr) ? kWiFiStationMode_Enabled : kWiFiStationMode_Disabled; } @@ -397,7 +399,7 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaFiW1Wpa_supplicant1Inte { if (g_strcmp0(value_str, "\'associating\'") == 0) { - mAssociattionStarted = true; + mAssociationStarted = true; } else if (g_strcmp0(value_str, "\'disconnected\'") == 0) { @@ -409,7 +411,7 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaFiW1Wpa_supplicant1Inte delegate->OnConnectionStatusChanged(static_cast(ConnectionStatusEnum::kConnected)); } - if (mAssociattionStarted) + if (mAssociationStarted) { uint8_t associationFailureCause = static_cast(AssociationFailureCauseEnum::kUnknown); uint16_t status = WLAN_STATUS_UNSPECIFIED_FAILURE; @@ -447,7 +449,7 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaFiW1Wpa_supplicant1Inte DeviceLayer::SystemLayer().ScheduleLambda([]() { ConnectivityMgrImpl().UpdateNetworkStatus(); }); - mAssociattionStarted = false; + mAssociationStarted = false; } else if (g_strcmp0(value_str, "\'associated\'") == 0) { @@ -460,7 +462,7 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaFiW1Wpa_supplicant1Inte } else if (g_strcmp0(value_str, "\'completed\'") == 0) { - if (mAssociattionStarted) + if (mAssociationStarted) { DeviceLayer::SystemLayer().ScheduleLambda([]() { if (mpConnectCallback != nullptr) @@ -471,7 +473,7 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaFiW1Wpa_supplicant1Inte ConnectivityMgrImpl().PostNetworkConnect(); }); } - mAssociattionStarted = false; + mAssociationStarted = false; } } @@ -723,14 +725,10 @@ void ConnectivityManagerImpl::_OnWpaProxyReady(GObject * source_object, GAsyncRe void ConnectivityManagerImpl::StartWiFiManagement() { + std::lock_guard lock(mWpaSupplicantMutex); + mConnectivityFlag.ClearAll(); - mWpaSupplicant.state = GDBusWpaSupplicant::INIT; - mWpaSupplicant.scanState = GDBusWpaSupplicant::WIFI_SCANNING_IDLE; - mWpaSupplicant.proxy = nullptr; - mWpaSupplicant.iface = nullptr; - mWpaSupplicant.bss = nullptr; - mWpaSupplicant.interfacePath = nullptr; - mWpaSupplicant.networkPath = nullptr; + mWpaSupplicant = GDBusWpaSupplicant{}; ChipLogProgress(DeviceLayer, "wpa_supplicant: Start WiFi management"); @@ -752,6 +750,8 @@ void ConnectivityManagerImpl::DriveAPState() CHIP_ERROR err = CHIP_NO_ERROR; WiFiAPState targetState; + std::lock_guard lock(mWpaSupplicantMutex); + // If the AP interface is not under application control... if (mWiFiAPMode != kWiFiAPMode_ApplicationControlled) { @@ -867,6 +867,8 @@ CHIP_ERROR ConnectivityManagerImpl::ConfigureWiFiAP() uint16_t discriminator = 0; char ssid[32]; + std::lock_guard lock(mWpaSupplicantMutex); + channel = ConnectivityUtils::MapChannelToFrequency(kWiFi_BAND_2_4_GHZ, CHIP_DEVICE_CONFIG_WIFI_AP_CHANNEL); if (GetCommissionableDataProvider()->GetSetupDiscriminator(discriminator) != CHIP_NO_ERROR) @@ -961,8 +963,11 @@ ConnectivityManagerImpl::ConnectWiFiNetworkAsync(ByteSpan ssid, ByteSpan credent char ssidStr[kMaxWiFiSSIDLength + 1u] = { 0 }; char keyStr[kMaxWiFiKeyLength + 1u] = { 0 }; + std::lock_guard lock(mWpaSupplicantMutex); + VerifyOrReturnError(ssid.size() <= kMaxWiFiSSIDLength, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(credentials.size() <= kMaxWiFiKeyLength, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(mWpaSupplicant.iface != nullptr, CHIP_ERROR_INCORRECT_STATE); // There is another ongoing connect request, reject the new one. VerifyOrReturnError(mpConnectCallback == nullptr, CHIP_ERROR_INCORRECT_STATE); @@ -1046,6 +1051,9 @@ void ConnectivityManagerImpl::_ConnectWiFiNetworkAsyncCallback(GObject * source_ ConnectivityManagerImpl * this_ = reinterpret_cast(user_data); std::unique_ptr attachRes; std::unique_ptr err; + + std::lock_guard lock(mWpaSupplicantMutex); + { gboolean result = wpa_fi_w1_wpa_supplicant1_interface_call_select_network_finish(mWpaSupplicant.iface, res, &MakeUniquePointerReceiver(err).Get()); @@ -1132,7 +1140,15 @@ CHIP_ERROR ConnectivityManagerImpl::CommitConfig() gboolean result; std::unique_ptr err; - ChipLogProgress(DeviceLayer, "wpa_supplicant: connected to network"); + std::lock_guard lock(mWpaSupplicantMutex); + + if (mWpaSupplicant.state != GDBusWpaSupplicant::WPA_INTERFACE_CONNECTED) + { + ChipLogError(DeviceLayer, "wpa_supplicant: CommitConfig: interface proxy not connected"); + return CHIP_ERROR_INCORRECT_STATE; + } + + ChipLogProgress(DeviceLayer, "wpa_supplicant: save config"); result = wpa_fi_w1_wpa_supplicant1_interface_call_save_config_sync(mWpaSupplicant.iface, nullptr, &MakeUniquePointerReceiver(err).Get()); @@ -1196,7 +1212,7 @@ CHIP_ERROR ConnectivityManagerImpl::GetWiFiSecurityType(SecurityTypeEnum & secur if (mWpaSupplicant.state != GDBusWpaSupplicant::WPA_INTERFACE_CONNECTED) { - ChipLogError(DeviceLayer, "wpa_supplicant: _GetWiFiSecurityType: interface proxy not connected"); + ChipLogError(DeviceLayer, "wpa_supplicant: GetWiFiSecurityType: interface proxy not connected"); return CHIP_ERROR_INCORRECT_STATE; } @@ -1605,6 +1621,8 @@ bool ConnectivityManagerImpl::_GetBssInfo(const gchar * bssPath, NetworkCommissi void ConnectivityManagerImpl::_OnWpaInterfaceScanDone(GObject * source_object, GAsyncResult * res, gpointer user_data) { + std::lock_guard lock(mWpaSupplicantMutex); + ChipLogProgress(DeviceLayer, "wpa_supplicant: network scan done"); gchar ** bsss = wpa_fi_w1_wpa_supplicant1_interface_dup_bsss(mWpaSupplicant.iface); gchar ** oldBsss = bsss; diff --git a/src/platform/Linux/ConnectivityManagerImpl.h b/src/platform/Linux/ConnectivityManagerImpl.h index e3fac9628a2238..b3a87ea1f6735b 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.h +++ b/src/platform/Linux/ConnectivityManagerImpl.h @@ -65,7 +65,7 @@ namespace DeviceLayer { #if CHIP_DEVICE_CONFIG_ENABLE_WPA struct GDBusWpaSupplicant { - enum + enum WpaState { INIT, WPA_CONNECTING, @@ -74,19 +74,21 @@ struct GDBusWpaSupplicant WPA_NO_INTERFACE_PATH, WPA_GOT_INTERFACE_PATH, WPA_INTERFACE_CONNECTED, - } state; + }; - enum + enum WpaScanning { WIFI_SCANNING_IDLE, WIFI_SCANNING, - } scanState; + }; - WpaFiW1Wpa_supplicant1 * proxy; - WpaFiW1Wpa_supplicant1Interface * iface; - WpaFiW1Wpa_supplicant1BSS * bss; - gchar * interfacePath; - gchar * networkPath; + WpaState state = INIT; + WpaScanning scanState = WIFI_SCANNING_IDLE; + WpaFiW1Wpa_supplicant1 * proxy = nullptr; + WpaFiW1Wpa_supplicant1Interface * iface = nullptr; + WpaFiW1Wpa_supplicant1BSS * bss = nullptr; + gchar * interfacePath = nullptr; + gchar * networkPath = nullptr; }; #endif @@ -203,9 +205,11 @@ class ConnectivityManagerImpl final : public ConnectivityManager, static bool _GetBssInfo(const gchar * bssPath, NetworkCommissioning::WiFiScanResponse & result); - static bool mAssociattionStarted; + static bool mAssociationStarted; static BitFlags mConnectivityFlag; - static struct GDBusWpaSupplicant mWpaSupplicant; + static GDBusWpaSupplicant mWpaSupplicant; + // Access to mWpaSupplicant has to be protected by a mutex because it is accessed from + // the CHIP event loop thread and dedicated D-Bus thread started by platform manager. static std::mutex mWpaSupplicantMutex; NetworkCommissioning::Internal::BaseDriver::NetworkStatusChangeCallback * mpStatusChangeCallback = nullptr; diff --git a/src/platform/webos/ConnectivityManagerImpl.cpp b/src/platform/webos/ConnectivityManagerImpl.cpp index 6cbefb8751eeae..675ac7078d23f0 100644 --- a/src/platform/webos/ConnectivityManagerImpl.cpp +++ b/src/platform/webos/ConnectivityManagerImpl.cpp @@ -143,7 +143,8 @@ void ConnectivityManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) } #if CHIP_DEVICE_CONFIG_ENABLE_WPA -bool ConnectivityManagerImpl::mAssociattionStarted = false; + +bool ConnectivityManagerImpl::mAssociationStarted = false; BitFlags::ConnectivityFlags> ConnectivityManagerImpl::mConnectivityFlag; struct GDBusWpaSupplicant ConnectivityManagerImpl::mWpaSupplicant; @@ -393,7 +394,7 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaFiW1Wpa_supplicant1Inte { if (g_strcmp0(value_str, "\'associating\'") == 0) { - mAssociattionStarted = true; + mAssociationStarted = true; } else if (g_strcmp0(value_str, "\'disconnected\'") == 0) { @@ -405,7 +406,7 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaFiW1Wpa_supplicant1Inte delegate->OnConnectionStatusChanged(static_cast(ConnectionStatusEnum::kConnected)); } - if (mAssociattionStarted) + if (mAssociationStarted) { uint8_t associationFailureCause = static_cast(AssociationFailureCauseEnum::kUnknown); uint16_t status = WLAN_STATUS_UNSPECIFIED_FAILURE; @@ -435,7 +436,7 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaFiW1Wpa_supplicant1Inte DeviceLayer::SystemLayer().ScheduleLambda([]() { ConnectivityMgrImpl().UpdateNetworkStatus(); }); - mAssociattionStarted = false; + mAssociationStarted = false; } else if (g_strcmp0(value_str, "\'associated\'") == 0) { @@ -697,13 +698,7 @@ void ConnectivityManagerImpl::_OnWpaProxyReady(GObject * source_object, GAsyncRe void ConnectivityManagerImpl::StartWiFiManagement() { mConnectivityFlag.ClearAll(); - mWpaSupplicant.state = GDBusWpaSupplicant::INIT; - mWpaSupplicant.scanState = GDBusWpaSupplicant::WIFI_SCANNING_IDLE; - mWpaSupplicant.proxy = nullptr; - mWpaSupplicant.iface = nullptr; - mWpaSupplicant.bss = nullptr; - mWpaSupplicant.interfacePath = nullptr; - mWpaSupplicant.networkPath = nullptr; + mWpaSupplicant = GDBusWpaSupplicant{}; ChipLogProgress(DeviceLayer, "wpa_supplicant: Start WiFi management"); @@ -936,6 +931,7 @@ ConnectivityManagerImpl::ConnectWiFiNetworkAsync(ByteSpan ssid, ByteSpan credent VerifyOrReturnError(ssid.size() <= kMaxWiFiSSIDLength, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(credentials.size() <= kMaxWiFiKeyLength, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(mWpaSupplicant.iface != nullptr, CHIP_ERROR_INCORRECT_STATE); // There is another ongoing connect request, reject the new one. VerifyOrReturnError(mpConnectCallback == nullptr, CHIP_ERROR_INCORRECT_STATE); @@ -1094,7 +1090,15 @@ CHIP_ERROR ConnectivityManagerImpl::CommitConfig() gboolean result; std::unique_ptr err; - ChipLogProgress(DeviceLayer, "wpa_supplicant: connected to network"); + std::lock_guard lock(mWpaSupplicantMutex); + + if (mWpaSupplicant.state != GDBusWpaSupplicant::WPA_INTERFACE_CONNECTED) + { + ChipLogError(DeviceLayer, "wpa_supplicant: CommitConfig: interface proxy not connected"); + return CHIP_ERROR_INCORRECT_STATE; + } + + ChipLogProgress(DeviceLayer, "wpa_supplicant: save config"); result = wpa_fi_w1_wpa_supplicant1_interface_call_save_config_sync(mWpaSupplicant.iface, nullptr, &MakeUniquePointerReceiver(err).Get()); @@ -1158,7 +1162,7 @@ CHIP_ERROR ConnectivityManagerImpl::GetWiFiSecurityType(SecurityTypeEnum & secur if (mWpaSupplicant.state != GDBusWpaSupplicant::WPA_INTERFACE_CONNECTED) { - ChipLogError(DeviceLayer, "wpa_supplicant: _GetWiFiSecurityType: interface proxy not connected"); + ChipLogError(DeviceLayer, "wpa_supplicant: GetWiFiSecurityType: interface proxy not connected"); return CHIP_ERROR_INCORRECT_STATE; } diff --git a/src/platform/webos/ConnectivityManagerImpl.h b/src/platform/webos/ConnectivityManagerImpl.h index 6d23f83d8683f0..8146377d3efeb6 100644 --- a/src/platform/webos/ConnectivityManagerImpl.h +++ b/src/platform/webos/ConnectivityManagerImpl.h @@ -65,7 +65,7 @@ namespace DeviceLayer { #if CHIP_DEVICE_CONFIG_ENABLE_WPA struct GDBusWpaSupplicant { - enum + enum WpaState { INIT, WPA_CONNECTING, @@ -74,19 +74,21 @@ struct GDBusWpaSupplicant WPA_NO_INTERFACE_PATH, WPA_GOT_INTERFACE_PATH, WPA_INTERFACE_CONNECTED, - } state; + }; - enum + enum WpaScanning { WIFI_SCANNING_IDLE, WIFI_SCANNING, - } scanState; + }; - WpaFiW1Wpa_supplicant1 * proxy; - WpaFiW1Wpa_supplicant1Interface * iface; - WpaFiW1Wpa_supplicant1BSS * bss; - gchar * interfacePath; - gchar * networkPath; + WpaState state = INIT; + WpaScanning scanState = WIFI_SCANNING_IDLE; + WpaFiW1Wpa_supplicant1 * proxy = nullptr; + WpaFiW1Wpa_supplicant1Interface * iface = nullptr; + WpaFiW1Wpa_supplicant1BSS * bss = nullptr; + gchar * interfacePath = nullptr; + gchar * networkPath = nullptr; }; #endif @@ -203,7 +205,7 @@ class ConnectivityManagerImpl final : public ConnectivityManager, static bool _GetBssInfo(const gchar * bssPath, NetworkCommissioning::WiFiScanResponse & result); - static bool mAssociattionStarted; + static bool mAssociationStarted; static BitFlags mConnectivityFlag; static struct GDBusWpaSupplicant mWpaSupplicant; static std::mutex mWpaSupplicantMutex; From a27bc8cc7a95d0c8c72ff2599d11be423d1358e3 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 29 Mar 2023 22:31:44 -0400 Subject: [PATCH 027/158] Remove unused CHIP_ERROR values. (#25888) This frees up space to add new errors we might actually need. ERROR_CODES.md was regenerated by running the script it points to and then restyle. --- docs/ERROR_CODES.md | 364 ++++----- src/lib/core/CHIPError.cpp | 285 ------- src/lib/core/CHIPError.h | 952 +++--------------------- src/lib/core/tests/TestCHIPErrorStr.cpp | 96 --- src/messaging/ExchangeContext.h | 2 - 5 files changed, 249 insertions(+), 1450 deletions(-) diff --git a/docs/ERROR_CODES.md b/docs/ERROR_CODES.md index 4026219328fa2f..17f4ff6ba83a5a 100644 --- a/docs/ERROR_CODES.md +++ b/docs/ERROR_CODES.md @@ -1,3 +1,5 @@ +[//]: # "start_ignore_spellcheck" + # Matter SDK `CHIP_ERROR` enums values This file was **AUTOMATICALLY** generated by @@ -8,238 +10,144 @@ This file was **AUTOMATICALLY** generated by - [SDK Core errors: range `0x000..0x0FF`](#sdk-core-errors) - [SDK Inet Layer errors: range `0x100..0x1FF`](#sdk-inet-layer-errors) - [SDK Device Layer errors: range `0x200..0x2FF`](#sdk-device-layer-errors) -- [ASN.1 Layer errors: range `0x300..0x3FF`](#asn.1-layer-errors) +- [ASN.1 Layer errors: range `0x300..0x3FF`](#asn-1-layer-errors) - [BLE Layer errors: range `0x400..0x4FF`](#ble-layer-errors) - [IM Global errors errors: range `0x500..0x5FF`](#im-global-errors-errors) ## SDK Core errors -| Decimal | Hex | Name | -| ------- | ---- | ---------------------------------------------------- | -| 0 | 0x00 | `CHIP_NO_ERROR` | -| 1 | 0x01 | `CHIP_ERROR_SENDING_BLOCKED` | -| 2 | 0x02 | `CHIP_ERROR_CONNECTION_ABORTED` | -| 3 | 0x03 | `CHIP_ERROR_INCORRECT_STATE` | -| 4 | 0x04 | `CHIP_ERROR_MESSAGE_TOO_LONG` | -| 5 | 0x05 | `CHIP_ERROR_UNSUPPORTED_EXCHANGE_VERSION` | -| 6 | 0x06 | `CHIP_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS` | -| 7 | 0x07 | `CHIP_ERROR_NO_UNSOLICITED_MESSAGE_HANDLER` | -| 8 | 0x08 | `CHIP_ERROR_NO_CONNECTION_HANDLER` | -| 9 | 0x09 | `CHIP_ERROR_TOO_MANY_PEER_NODES` | -| 10 | 0x0A | `CHIP_ERROR_SENTINEL` | -| 11 | 0x0B | `CHIP_ERROR_NO_MEMORY` | -| 12 | 0x0C | `CHIP_ERROR_NO_MESSAGE_HANDLER` | -| 13 | 0x0D | `CHIP_ERROR_MESSAGE_INCOMPLETE` | -| 14 | 0x0E | `CHIP_ERROR_DATA_NOT_ALIGNED` | -| 15 | 0x0F | `CHIP_ERROR_UNKNOWN_KEY_TYPE` | -| 16 | 0x10 | `CHIP_ERROR_KEY_NOT_FOUND` | -| 17 | 0x11 | `CHIP_ERROR_WRONG_ENCRYPTION_TYPE` | -| 18 | 0x12 | `CHIP_ERROR_TOO_MANY_KEYS` | -| 19 | 0x13 | `CHIP_ERROR_INTEGRITY_CHECK_FAILED` | -| 20 | 0x14 | `CHIP_ERROR_INVALID_SIGNATURE` | -| 21 | 0x15 | `CHIP_ERROR_UNSUPPORTED_MESSAGE_VERSION` | -| 22 | 0x16 | `CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE` | -| 23 | 0x17 | `CHIP_ERROR_UNSUPPORTED_SIGNATURE_TYPE` | -| 24 | 0x18 | `CHIP_ERROR_INVALID_MESSAGE_LENGTH` | -| 25 | 0x19 | `CHIP_ERROR_BUFFER_TOO_SMALL` | -| 26 | 0x1A | `CHIP_ERROR_DUPLICATE_KEY_ID` | -| 27 | 0x1B | `CHIP_ERROR_WRONG_KEY_TYPE` | -| 28 | 0x1C | `CHIP_ERROR_WELL_UNINITIALIZED` | -| 29 | 0x1D | `CHIP_ERROR_WELL_EMPTY` | -| 30 | 0x1E | `CHIP_ERROR_INVALID_STRING_LENGTH` | -| 31 | 0x1F | `CHIP_ERROR_INVALID_LIST_LENGTH` | -| 32 | 0x20 | `CHIP_ERROR_INVALID_INTEGRITY_TYPE` | -| 33 | 0x21 | `CHIP_ERROR_END_OF_TLV` | -| 34 | 0x22 | `CHIP_ERROR_TLV_UNDERRUN` | -| 35 | 0x23 | `CHIP_ERROR_INVALID_TLV_ELEMENT` | -| 36 | 0x24 | `CHIP_ERROR_INVALID_TLV_TAG` | -| 37 | 0x25 | `CHIP_ERROR_UNKNOWN_IMPLICIT_TLV_TAG` | -| 38 | 0x26 | `CHIP_ERROR_WRONG_TLV_TYPE` | -| 39 | 0x27 | `CHIP_ERROR_TLV_CONTAINER_OPEN` | -| 40 | 0x28 | `CHIP_ERROR_INVALID_TRANSFER_MODE` | -| 41 | 0x29 | `CHIP_ERROR_INVALID_PROFILE_ID` | -| 42 | 0x2A | `CHIP_ERROR_INVALID_MESSAGE_TYPE` | -| 43 | 0x2B | `CHIP_ERROR_UNEXPECTED_TLV_ELEMENT` | -| 44 | 0x2C | `CHIP_ERROR_STATUS_REPORT_RECEIVED` | -| 45 | 0x2D | `CHIP_ERROR_NOT_IMPLEMENTED` | -| 46 | 0x2E | `CHIP_ERROR_INVALID_ADDRESS` | -| 47 | 0x2F | `CHIP_ERROR_INVALID_ARGUMENT` | -| 48 | 0x30 | `CHIP_ERROR_INVALID_PATH_LIST` | -| 49 | 0x31 | `CHIP_ERROR_INVALID_DATA_LIST` | -| 50 | 0x32 | `CHIP_ERROR_TIMEOUT` | -| 51 | 0x33 | `CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR` | -| 52 | 0x34 | `CHIP_ERROR_UNSUPPORTED_DEVICE_DESCRIPTOR_VERSION` | -| 53 | 0x35 | `CHIP_ERROR_END_OF_INPUT` | -| 54 | 0x36 | `CHIP_ERROR_RATE_LIMIT_EXCEEDED` | -| 55 | 0x37 | `CHIP_ERROR_SECURITY_MANAGER_BUSY` | -| 56 | 0x38 | `CHIP_ERROR_INVALID_PASE_PARAMETER` | -| 57 | 0x39 | `CHIP_ERROR_PASE_SUPPORTS_ONLY_CONFIG1` | -| 58 | 0x3A | `CHIP_ERROR_KEY_CONFIRMATION_FAILED` | -| 59 | 0x3B | `CHIP_ERROR_INVALID_USE_OF_SESSION_KEY` | -| 60 | 0x3C | `CHIP_ERROR_CONNECTION_CLOSED_UNEXPECTEDLY` | -| 61 | 0x3D | `CHIP_ERROR_MISSING_TLV_ELEMENT` | -| 62 | 0x3E | `CHIP_ERROR_RANDOM_DATA_UNAVAILABLE` | -| 63 | 0x3F | `CHIP_ERROR_UNSUPPORTED_HOST_PORT_ELEMENT` | -| 64 | 0x40 | `CHIP_ERROR_INVALID_HOST_SUFFIX_INDEX` | -| 65 | 0x41 | `CHIP_ERROR_HOST_PORT_LIST_EMPTY` | -| 66 | 0x42 | `CHIP_ERROR_UNSUPPORTED_AUTH_MODE` | -| 67 | 0x43 | `CHIP_ERROR_INVALID_SERVICE_EP` | -| 68 | 0x44 | `CHIP_ERROR_INVALID_DIRECTORY_ENTRY_TYPE` | -| 69 | 0x45 | `CHIP_ERROR_FORCED_RESET` | -| 70 | 0x46 | `CHIP_ERROR_NO_ENDPOINT` | -| 71 | 0x47 | `CHIP_ERROR_INVALID_DESTINATION_NODE_ID` | -| 72 | 0x48 | `CHIP_ERROR_NOT_CONNECTED` | -| 73 | 0x49 | `CHIP_ERROR_NO_SW_UPDATE_AVAILABLE` | -| 74 | 0x4A | `CHIP_ERROR_CA_CERT_NOT_FOUND` | -| 75 | 0x4B | `CHIP_ERROR_CERT_PATH_LEN_CONSTRAINT_EXCEEDED` | -| 76 | 0x4C | `CHIP_ERROR_CERT_PATH_TOO_LONG` | -| 77 | 0x4D | `CHIP_ERROR_CERT_USAGE_NOT_ALLOWED` | -| 78 | 0x4E | `CHIP_ERROR_CERT_EXPIRED` | -| 79 | 0x4F | `CHIP_ERROR_CERT_NOT_VALID_YET` | -| 80 | 0x50 | `CHIP_ERROR_UNSUPPORTED_CERT_FORMAT` | -| 81 | 0x51 | `CHIP_ERROR_UNSUPPORTED_ELLIPTIC_CURVE` | -| 82 | 0x52 | `CHIP_ERROR_CERT_NOT_USED` | -| 83 | 0x53 | `CHIP_ERROR_CERT_NOT_FOUND` | -| 84 | 0x54 | `CHIP_ERROR_INVALID_CASE_PARAMETER` | -| 85 | 0x55 | `CHIP_ERROR_UNSUPPORTED_CASE_CONFIGURATION` | -| 86 | 0x56 | `CHIP_ERROR_CERT_LOAD_FAILED` | -| 87 | 0x57 | `CHIP_ERROR_CERT_NOT_TRUSTED` | -| 88 | 0x58 | `CHIP_ERROR_INVALID_ACCESS_TOKEN` | -| 89 | 0x59 | `CHIP_ERROR_WRONG_CERT_DN` | -| 90 | 0x5A | `CHIP_ERROR_INVALID_PROVISIONING_BUNDLE` | -| 91 | 0x5B | `CHIP_ERROR_PROVISIONING_BUNDLE_DECRYPTION_ERROR` | -| 92 | 0x5C | `CHIP_ERROR_WRONG_NODE_ID` | -| 93 | 0x5D | `CHIP_ERROR_CONN_ACCEPTED_ON_WRONG_PORT` | -| 94 | 0x5E | `CHIP_ERROR_CALLBACK_REPLACED` | -| 95 | 0x5F | `CHIP_ERROR_NO_CASE_AUTH_DELEGATE` | -| 96 | 0x60 | `CHIP_ERROR_DEVICE_LOCATE_TIMEOUT` | -| 97 | 0x61 | `CHIP_ERROR_DEVICE_CONNECT_TIMEOUT` | -| 98 | 0x62 | `CHIP_ERROR_DEVICE_AUTH_TIMEOUT` | -| 99 | 0x63 | `CHIP_ERROR_MESSAGE_NOT_ACKNOWLEDGED` | -| 100 | 0x64 | `CHIP_ERROR_RETRANS_TABLE_FULL` | -| 101 | 0x65 | `CHIP_ERROR_INVALID_ACK_MESSAGE_COUNTER` | -| 102 | 0x66 | `CHIP_ERROR_SEND_THROTTLED` | -| 103 | 0x67 | `CHIP_ERROR_WRONG_MSG_VERSION_FOR_EXCHANGE` | -| 104 | 0x68 | `CHIP_ERROR_TRANSACTION_CANCELED` | -| 105 | 0x69 | `CHIP_ERROR_LISTENER_ALREADY_STARTED` | -| 106 | 0x6A | `CHIP_ERROR_LISTENER_ALREADY_STOPPED` | -| 107 | 0x6B | `CHIP_ERROR_INVALID_SUBSCRIPTION` | -| 108 | 0x6C | `CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE` | -| 109 | 0x6D | `CHIP_ERROR_PASE_RECONFIGURE_REQUIRED` | -| 110 | 0x6E | `CHIP_ERROR_INVALID_PASE_CONFIGURATION` | -| 111 | 0x6F | `CHIP_ERROR_NO_COMMON_PASE_CONFIGURATIONS` | -| 112 | 0x70 | `CHIP_ERROR_UNSOLICITED_MSG_NO_ORIGINATOR` | -| 113 | 0x71 | `CHIP_ERROR_INVALID_FABRIC_INDEX` | -| 114 | 0x72 | `CHIP_ERROR_TOO_MANY_CONNECTIONS` | -| 115 | 0x73 | `CHIP_ERROR_SHUT_DOWN` | -| 116 | 0x74 | `CHIP_ERROR_CANCELLED` | -| 117 | 0x75 | `CHIP_ERROR_DRBG_ENTROPY_SOURCE_FAILED` | -| 118 | 0x76 | `CHIP_ERROR_TLV_TAG_NOT_FOUND` | -| 119 | 0x77 | `CHIP_ERROR_MISSING_SECURE_SESSION` | -| 120 | 0x78 | `CHIP_ERROR_INVALID_ADMIN_SUBJECT` | -| 121 | 0x79 | `CHIP_ERROR_INSUFFICIENT_PRIVILEGE` | -| 122 | 0x7A | `CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_IB` | -| 123 | 0x7B | `CHIP_ERROR_IM_MALFORMED_EVENT_STATUS_IB` | -| 124 | 0x7C | `CHIP_ERROR_IM_MALFORMED_STATUS_RESPONSE_MESSAGE` | -| 125 | 0x7D | `CHIP_ERROR_MESSAGE_COUNTER_EXHAUSTED` | -| 126 | 0x7E | `CHIP_ERROR_FABRIC_EXISTS` | -| 127 | 0x7F | `CHIP_ERROR_KEY_NOT_FOUND_FROM_PEER` | -| 128 | 0x80 | `CHIP_ERROR_WRONG_ENCRYPTION_TYPE_FROM_PEER` | -| 129 | 0x81 | `CHIP_ERROR_UNKNOWN_KEY_TYPE_FROM_PEER` | -| 130 | 0x82 | `CHIP_ERROR_INVALID_USE_OF_SESSION_KEY_FROM_PEER` | -| 131 | 0x83 | `CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE_FROM_PEER` | -| 132 | 0x84 | `CHIP_ERROR_INTERNAL_KEY_ERROR_FROM_PEER` | -| 133 | 0x85 | `CHIP_ERROR_INVALID_KEY_ID` | -| 134 | 0x86 | `CHIP_ERROR_INVALID_TIME` | -| 135 | 0x87 | `CHIP_ERROR_LOCKING_FAILURE` | -| 136 | 0x88 | `CHIP_ERROR_UNSUPPORTED_PASSCODE_CONFIG` | -| 137 | 0x89 | `CHIP_ERROR_PASSCODE_AUTHENTICATION_FAILED` | -| 138 | 0x8A | `CHIP_ERROR_PASSCODE_FINGERPRINT_FAILED` | -| 139 | 0x8B | `CHIP_ERROR_SERIALIZATION_ELEMENT_NULL` | -| 140 | 0x8C | `CHIP_ERROR_WRONG_CERT_SIGNATURE_ALGORITHM` | -| 141 | 0x8D | `CHIP_ERROR_WRONG_CHIP_SIGNATURE_ALGORITHM` | -| 142 | 0x8E | `CHIP_ERROR_SCHEMA_MISMATCH` | -| 143 | 0x8F | `CHIP_ERROR_INVALID_INTEGER_VALUE` | -| 144 | 0x90 | `CHIP_ERROR_CASE_RECONFIG_REQUIRED` | -| 145 | 0x91 | `CHIP_ERROR_TOO_MANY_CASE_RECONFIGURATIONS` | -| 146 | 0x92 | `CHIP_ERROR_BAD_REQUEST` | -| 147 | 0x93 | `CHIP_ERROR_INVALID_MESSAGE_FLAG` | -| 148 | 0x94 | `CHIP_ERROR_KEY_EXPORT_RECONFIGURE_REQUIRED` | -| 149 | 0x95 | `CHIP_ERROR_INVALID_KEY_EXPORT_CONFIGURATION` | -| 150 | 0x96 | `CHIP_ERROR_NO_COMMON_KEY_EXPORT_CONFIGURATIONS` | -| 151 | 0x97 | `CHIP_ERROR_NO_KEY_EXPORT_DELEGATE` | -| 152 | 0x98 | `CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_REQUEST` | -| 153 | 0x99 | `CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_RESPONSE` | -| 154 | 0x9A | `CHIP_ERROR_EXPORTED_KEY_AUTHENTICATION_FAILED` | -| 155 | 0x9B | `CHIP_ERROR_TOO_MANY_SHARED_SESSION_END_NODES` | -| 156 | 0x9C | `CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_DATA_IB` | -| 157 | 0x9D | `CHIP_ERROR_WRONG_CERT_TYPE` | -| 158 | 0x9E | `CHIP_ERROR_DEFAULT_EVENT_HANDLER_NOT_CALLED` | -| 159 | 0x9F | `CHIP_ERROR_PERSISTED_STORAGE_FAILED` | -| 160 | 0xA0 | `CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND` | -| 161 | 0xA1 | `CHIP_ERROR_IM_FABRIC_DELETED` | -| 162 | 0xA2 | `CHIP_ERROR_PROFILE_STRING_CONTEXT_NOT_REGISTERED` | -| 163 | 0xA3 | `CHIP_ERROR_INCOMPATIBLE_SCHEMA_VERSION` | -| 165 | 0xA5 | `CHIP_ERROR_ACCESS_DENIED` | -| 166 | 0xA6 | `CHIP_ERROR_UNKNOWN_RESOURCE_ID` | -| 167 | 0xA7 | `CHIP_ERROR_VERSION_MISMATCH` | -| 168 | 0xA8 | `CHIP_ERROR_UNSUPPORTED_THREAD_NETWORK_CREATE` | -| 169 | 0xA9 | `CHIP_ERROR_INCONSISTENT_CONDITIONALITY` | -| 170 | 0xAA | `CHIP_ERROR_LOCAL_DATA_INCONSISTENT` | -| 171 | 0xAB | `CHIP_ERROR_EVENT_ID_FOUND` | -| 172 | 0xAC | `CHIP_ERROR_INTERNAL` | -| 173 | 0xAD | `CHIP_ERROR_OPEN_FAILED` | -| 174 | 0xAE | `CHIP_ERROR_READ_FAILED` | -| 175 | 0xAF | `CHIP_ERROR_WRITE_FAILED` | -| 176 | 0xB0 | `CHIP_ERROR_DECODE_FAILED` | -| 177 | 0xB1 | `CHIP_ERROR_SESSION_KEY_SUSPENDED` | -| 178 | 0xB2 | `CHIP_ERROR_UNSUPPORTED_WIRELESS_REGULATORY_DOMAIN` | -| 179 | 0xB3 | `CHIP_ERROR_UNSUPPORTED_WIRELESS_OPERATING_LOCATION` | -| 180 | 0xB4 | `CHIP_ERROR_MDNS_COLLISION` | -| 181 | 0xB5 | `CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB` | -| 182 | 0xB6 | `CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB` | -| 183 | 0xB7 | `CHIP_ERROR_IM_MALFORMED_COMMAND_PATH_IB` | -| 184 | 0xB8 | `CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_STATUS_IB` | -| 185 | 0xB9 | `CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_IB` | -| 186 | 0xBA | `CHIP_ERROR_IM_MALFORMED_EVENT_DATA_IB` | -| 187 | 0xBB | `CHIP_ERROR_IM_MALFORMED_STATUS_IB` | -| 188 | 0xBC | `CHIP_ERROR_PEER_NODE_NOT_FOUND` | -| 189 | 0xBD | `CHIP_ERROR_HSM` | -| 190 | 0xBE | `CHIP_ERROR_INTERMEDIATE_CA_NOT_REQUIRED` | -| 191 | 0xBF | `CHIP_ERROR_REAL_TIME_NOT_SYNCED` | -| 192 | 0xC0 | `CHIP_ERROR_UNEXPECTED_EVENT` | -| 193 | 0xC1 | `CHIP_ERROR_ENDPOINT_POOL_FULL` | -| 194 | 0xC2 | `CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG` | -| 195 | 0xC3 | `CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG` | -| 196 | 0xC4 | `CHIP_ERROR_DUPLICATE_MESSAGE_RECEIVED` | -| 197 | 0xC5 | `CHIP_ERROR_INVALID_PUBLIC_KEY` | -| 198 | 0xC6 | `CHIP_ERROR_FABRIC_MISMATCH_ON_ICA` | -| 199 | 0xC7 | `CHIP_ERROR_MESSAGE_COUNTER_OUT_OF_WINDOW` | -| 200 | 0xC8 | `CHIP_ERROR_REBOOT_SIGNAL_RECEIVED` | -| 201 | 0xC9 | `CHIP_ERROR_NO_SHARED_TRUSTED_ROOT` | -| 202 | 0xCA | `CHIP_ERROR_IM_STATUS_CODE_RECEIVED` | -| 203 | 0xCB | `CHIP_ERROR_IM_MALFORMED_COMMAND_STATUS_IB` | -| 204 | 0xCC | `CHIP_ERROR_IM_MALFORMED_INVOKE_RESPONSE_IB` | -| 205 | 0xCD | `CHIP_ERROR_IM_MALFORMED_INVOKE_REQUEST_MESSAGE` | -| 206 | 0xCE | `CHIP_ERROR_IM_MALFORMED_INVOKE_RESPONSE_MESSAGE` | -| 207 | 0xCF | `CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_MESSAGE` | -| 208 | 0xD0 | `CHIP_ERROR_IM_MALFORMED_WRITE_REQUEST_MESSAGE` | -| 209 | 0xD1 | `CHIP_ERROR_IM_MALFORMED_EVENT_FILTER_IB` | -| 210 | 0xD2 | `CHIP_ERROR_IM_MALFORMED_READ_REQUEST_MESSAGE` | -| 211 | 0xD3 | `CHIP_ERROR_IM_MALFORMED_SUBSCRIBE_REQUEST_MESSAGE` | -| 212 | 0xD4 | `CHIP_ERROR_IM_MALFORMED_SUBSCRIBE_RESPONSE_MESSAGE` | -| 213 | 0xD5 | `CHIP_ERROR_IM_MALFORMED_EVENT_REPORT_IB` | -| 214 | 0xD6 | `CHIP_ERROR_IM_MALFORMED_CLUSTER_PATH_IB` | -| 215 | 0xD7 | `CHIP_ERROR_IM_MALFORMED_DATA_VERSION_FILTER_IB` | -| 216 | 0xD8 | `CHIP_ERROR_NOT_FOUND` | -| 217 | 0xD9 | `CHIP_ERROR_IM_MALFORMED_TIMED_REQUEST_MESSAGE` | -| 218 | 0xDA | `CHIP_ERROR_INVALID_FILE_IDENTIFIER` | -| 219 | 0xDB | `CHIP_ERROR_BUSY` | -| 220 | 0xDC | `CHIP_ERROR_MAX_RETRY_EXCEEDED` | -| 221 | 0xDD | `CHIP_ERROR_PROVIDER_LIST_EXHAUSTED` | -| 222 | 0xDE | `CHIP_ERROR_ANOTHER_COMMISSIONING_IN_PROGRESS` | -| 223 | 0xDF | `CHIP_ERROR_INVALID_SCHEME_PREFIX` | -| 224 | 0xE0 | `CHIP_ERROR_MISSING_URI_SEPARATOR` | +| Decimal | Hex | Name | +| ------- | ---- | -------------------------------------------------- | +| 0 | 0x00 | `CHIP_NO_ERROR` | +| 1 | 0x01 | `CHIP_ERROR_SENDING_BLOCKED` | +| 2 | 0x02 | `CHIP_ERROR_CONNECTION_ABORTED` | +| 3 | 0x03 | `CHIP_ERROR_INCORRECT_STATE` | +| 4 | 0x04 | `CHIP_ERROR_MESSAGE_TOO_LONG` | +| 5 | 0x05 | `CHIP_ERROR_UNSUPPORTED_EXCHANGE_VERSION` | +| 6 | 0x06 | `CHIP_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS` | +| 7 | 0x07 | `CHIP_ERROR_NO_UNSOLICITED_MESSAGE_HANDLER` | +| 8 | 0x08 | `CHIP_ERROR_NO_CONNECTION_HANDLER` | +| 9 | 0x09 | `CHIP_ERROR_TOO_MANY_PEER_NODES` | +| 10 | 0x0A | `CHIP_ERROR_SENTINEL` | +| 11 | 0x0B | `CHIP_ERROR_NO_MEMORY` | +| 12 | 0x0C | `CHIP_ERROR_NO_MESSAGE_HANDLER` | +| 13 | 0x0D | `CHIP_ERROR_MESSAGE_INCOMPLETE` | +| 14 | 0x0E | `CHIP_ERROR_DATA_NOT_ALIGNED` | +| 15 | 0x0F | `CHIP_ERROR_UNKNOWN_KEY_TYPE` | +| 16 | 0x10 | `CHIP_ERROR_KEY_NOT_FOUND` | +| 17 | 0x11 | `CHIP_ERROR_WRONG_ENCRYPTION_TYPE` | +| 19 | 0x13 | `CHIP_ERROR_INTEGRITY_CHECK_FAILED` | +| 20 | 0x14 | `CHIP_ERROR_INVALID_SIGNATURE` | +| 23 | 0x17 | `CHIP_ERROR_UNSUPPORTED_SIGNATURE_TYPE` | +| 24 | 0x18 | `CHIP_ERROR_INVALID_MESSAGE_LENGTH` | +| 25 | 0x19 | `CHIP_ERROR_BUFFER_TOO_SMALL` | +| 26 | 0x1A | `CHIP_ERROR_DUPLICATE_KEY_ID` | +| 27 | 0x1B | `CHIP_ERROR_WRONG_KEY_TYPE` | +| 28 | 0x1C | `CHIP_ERROR_WELL_UNINITIALIZED` | +| 29 | 0x1D | `CHIP_ERROR_WELL_EMPTY` | +| 30 | 0x1E | `CHIP_ERROR_INVALID_STRING_LENGTH` | +| 31 | 0x1F | `CHIP_ERROR_INVALID_LIST_LENGTH` | +| 33 | 0x21 | `CHIP_ERROR_END_OF_TLV` | +| 34 | 0x22 | `CHIP_ERROR_TLV_UNDERRUN` | +| 35 | 0x23 | `CHIP_ERROR_INVALID_TLV_ELEMENT` | +| 36 | 0x24 | `CHIP_ERROR_INVALID_TLV_TAG` | +| 37 | 0x25 | `CHIP_ERROR_UNKNOWN_IMPLICIT_TLV_TAG` | +| 38 | 0x26 | `CHIP_ERROR_WRONG_TLV_TYPE` | +| 39 | 0x27 | `CHIP_ERROR_TLV_CONTAINER_OPEN` | +| 42 | 0x2A | `CHIP_ERROR_INVALID_MESSAGE_TYPE` | +| 43 | 0x2B | `CHIP_ERROR_UNEXPECTED_TLV_ELEMENT` | +| 45 | 0x2D | `CHIP_ERROR_NOT_IMPLEMENTED` | +| 46 | 0x2E | `CHIP_ERROR_INVALID_ADDRESS` | +| 47 | 0x2F | `CHIP_ERROR_INVALID_ARGUMENT` | +| 48 | 0x30 | `CHIP_ERROR_INVALID_PATH_LIST` | +| 49 | 0x31 | `CHIP_ERROR_INVALID_DATA_LIST` | +| 50 | 0x32 | `CHIP_ERROR_TIMEOUT` | +| 51 | 0x33 | `CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR` | +| 53 | 0x35 | `CHIP_ERROR_END_OF_INPUT` | +| 56 | 0x38 | `CHIP_ERROR_INVALID_PASE_PARAMETER` | +| 59 | 0x3B | `CHIP_ERROR_INVALID_USE_OF_SESSION_KEY` | +| 60 | 0x3C | `CHIP_ERROR_CONNECTION_CLOSED_UNEXPECTEDLY` | +| 61 | 0x3D | `CHIP_ERROR_MISSING_TLV_ELEMENT` | +| 62 | 0x3E | `CHIP_ERROR_RANDOM_DATA_UNAVAILABLE` | +| 65 | 0x41 | `CHIP_ERROR_HOST_PORT_LIST_EMPTY` | +| 69 | 0x45 | `CHIP_ERROR_FORCED_RESET` | +| 70 | 0x46 | `CHIP_ERROR_NO_ENDPOINT` | +| 71 | 0x47 | `CHIP_ERROR_INVALID_DESTINATION_NODE_ID` | +| 72 | 0x48 | `CHIP_ERROR_NOT_CONNECTED` | +| 74 | 0x4A | `CHIP_ERROR_CA_CERT_NOT_FOUND` | +| 75 | 0x4B | `CHIP_ERROR_CERT_PATH_LEN_CONSTRAINT_EXCEEDED` | +| 76 | 0x4C | `CHIP_ERROR_CERT_PATH_TOO_LONG` | +| 77 | 0x4D | `CHIP_ERROR_CERT_USAGE_NOT_ALLOWED` | +| 78 | 0x4E | `CHIP_ERROR_CERT_EXPIRED` | +| 79 | 0x4F | `CHIP_ERROR_CERT_NOT_VALID_YET` | +| 80 | 0x50 | `CHIP_ERROR_UNSUPPORTED_CERT_FORMAT` | +| 81 | 0x51 | `CHIP_ERROR_UNSUPPORTED_ELLIPTIC_CURVE` | +| 83 | 0x53 | `CHIP_ERROR_CERT_NOT_FOUND` | +| 84 | 0x54 | `CHIP_ERROR_INVALID_CASE_PARAMETER` | +| 86 | 0x56 | `CHIP_ERROR_CERT_LOAD_FAILED` | +| 87 | 0x57 | `CHIP_ERROR_CERT_NOT_TRUSTED` | +| 89 | 0x59 | `CHIP_ERROR_WRONG_CERT_DN` | +| 92 | 0x5C | `CHIP_ERROR_WRONG_NODE_ID` | +| 100 | 0x64 | `CHIP_ERROR_RETRANS_TABLE_FULL` | +| 104 | 0x68 | `CHIP_ERROR_TRANSACTION_CANCELED` | +| 107 | 0x6B | `CHIP_ERROR_INVALID_SUBSCRIPTION` | +| 108 | 0x6C | `CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE` | +| 112 | 0x70 | `CHIP_ERROR_UNSOLICITED_MSG_NO_ORIGINATOR` | +| 113 | 0x71 | `CHIP_ERROR_INVALID_FABRIC_INDEX` | +| 114 | 0x72 | `CHIP_ERROR_TOO_MANY_CONNECTIONS` | +| 115 | 0x73 | `CHIP_ERROR_SHUT_DOWN` | +| 116 | 0x74 | `CHIP_ERROR_CANCELLED` | +| 118 | 0x76 | `CHIP_ERROR_TLV_TAG_NOT_FOUND` | +| 119 | 0x77 | `CHIP_ERROR_MISSING_SECURE_SESSION` | +| 120 | 0x78 | `CHIP_ERROR_INVALID_ADMIN_SUBJECT` | +| 121 | 0x79 | `CHIP_ERROR_INSUFFICIENT_PRIVILEGE` | +| 125 | 0x7D | `CHIP_ERROR_MESSAGE_COUNTER_EXHAUSTED` | +| 126 | 0x7E | `CHIP_ERROR_FABRIC_EXISTS` | +| 128 | 0x80 | `CHIP_ERROR_WRONG_ENCRYPTION_TYPE_FROM_PEER` | +| 133 | 0x85 | `CHIP_ERROR_INVALID_KEY_ID` | +| 134 | 0x86 | `CHIP_ERROR_INVALID_TIME` | +| 142 | 0x8E | `CHIP_ERROR_SCHEMA_MISMATCH` | +| 143 | 0x8F | `CHIP_ERROR_INVALID_INTEGER_VALUE` | +| 146 | 0x92 | `CHIP_ERROR_BAD_REQUEST` | +| 157 | 0x9D | `CHIP_ERROR_WRONG_CERT_TYPE` | +| 159 | 0x9F | `CHIP_ERROR_PERSISTED_STORAGE_FAILED` | +| 160 | 0xA0 | `CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND` | +| 161 | 0xA1 | `CHIP_ERROR_IM_FABRIC_DELETED` | +| 165 | 0xA5 | `CHIP_ERROR_ACCESS_DENIED` | +| 166 | 0xA6 | `CHIP_ERROR_UNKNOWN_RESOURCE_ID` | +| 167 | 0xA7 | `CHIP_ERROR_VERSION_MISMATCH` | +| 171 | 0xAB | `CHIP_ERROR_EVENT_ID_FOUND` | +| 172 | 0xAC | `CHIP_ERROR_INTERNAL` | +| 173 | 0xAD | `CHIP_ERROR_OPEN_FAILED` | +| 174 | 0xAE | `CHIP_ERROR_READ_FAILED` | +| 175 | 0xAF | `CHIP_ERROR_WRITE_FAILED` | +| 176 | 0xB0 | `CHIP_ERROR_DECODE_FAILED` | +| 180 | 0xB4 | `CHIP_ERROR_MDNS_COLLISION` | +| 181 | 0xB5 | `CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB` | +| 182 | 0xB6 | `CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB` | +| 185 | 0xB9 | `CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_IB` | +| 186 | 0xBA | `CHIP_ERROR_IM_MALFORMED_EVENT_DATA_IB` | +| 188 | 0xBC | `CHIP_ERROR_PEER_NODE_NOT_FOUND` | +| 189 | 0xBD | `CHIP_ERROR_HSM` | +| 191 | 0xBF | `CHIP_ERROR_REAL_TIME_NOT_SYNCED` | +| 192 | 0xC0 | `CHIP_ERROR_UNEXPECTED_EVENT` | +| 193 | 0xC1 | `CHIP_ERROR_ENDPOINT_POOL_FULL` | +| 194 | 0xC2 | `CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG` | +| 195 | 0xC3 | `CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG` | +| 196 | 0xC4 | `CHIP_ERROR_DUPLICATE_MESSAGE_RECEIVED` | +| 197 | 0xC5 | `CHIP_ERROR_INVALID_PUBLIC_KEY` | +| 198 | 0xC6 | `CHIP_ERROR_FABRIC_MISMATCH_ON_ICA` | +| 201 | 0xC9 | `CHIP_ERROR_NO_SHARED_TRUSTED_ROOT` | +| 202 | 0xCA | `CHIP_ERROR_IM_STATUS_CODE_RECEIVED` | +| 215 | 0xD7 | `CHIP_ERROR_IM_MALFORMED_DATA_VERSION_FILTER_IB` | +| 216 | 0xD8 | `CHIP_ERROR_NOT_FOUND` | +| 218 | 0xDA | `CHIP_ERROR_INVALID_FILE_IDENTIFIER` | +| 219 | 0xDB | `CHIP_ERROR_BUSY` | +| 220 | 0xDC | `CHIP_ERROR_MAX_RETRY_EXCEEDED` | +| 221 | 0xDD | `CHIP_ERROR_PROVIDER_LIST_EXHAUSTED` | +| 223 | 0xDF | `CHIP_ERROR_INVALID_SCHEME_PREFIX` | +| 224 | 0xE0 | `CHIP_ERROR_MISSING_URI_SEPARATOR` | +| 225 | 0xE1 | `CHIP_ERROR_HANDLER_NOT_SET` | ## SDK Inet Layer errors @@ -347,3 +255,5 @@ This file was **AUTOMATICALLY** generated by | 1481 | 0x5C9 | `TIMED_REQUEST_MISMATCH` | | 1482 | 0x5CA | `FAILSAFE_REQUIRED` | | 1520 | 0x5F0 | `WRITE_IGNORED` | + +[//]: # "end_ignore_spellcheck" diff --git a/src/lib/core/CHIPError.cpp b/src/lib/core/CHIPError.cpp index 2e35a3c9628e1b..87fdced8439852 100644 --- a/src/lib/core/CHIPError.cpp +++ b/src/lib/core/CHIPError.cpp @@ -113,21 +113,12 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_WRONG_ENCRYPTION_TYPE.AsInteger(): desc = "Wrong encryption type"; break; - case CHIP_ERROR_TOO_MANY_KEYS.AsInteger(): - desc = "Too many keys"; - break; case CHIP_ERROR_INTEGRITY_CHECK_FAILED.AsInteger(): desc = "Integrity check failed"; break; case CHIP_ERROR_INVALID_SIGNATURE.AsInteger(): desc = "Invalid signature"; break; - case CHIP_ERROR_UNSUPPORTED_MESSAGE_VERSION.AsInteger(): - desc = "Unsupported message version"; - break; - case CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE.AsInteger(): - desc = "Unsupported encryption type"; - break; case CHIP_ERROR_UNSUPPORTED_SIGNATURE_TYPE.AsInteger(): desc = "Unsupported signature type"; break; @@ -155,9 +146,6 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_INVALID_LIST_LENGTH.AsInteger(): desc = "invalid list length"; break; - case CHIP_ERROR_INVALID_INTEGRITY_TYPE.AsInteger(): - desc = "Invalid integrity type"; - break; case CHIP_END_OF_TLV.AsInteger(): desc = "End of TLV"; break; @@ -179,21 +167,12 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_TLV_CONTAINER_OPEN.AsInteger(): desc = "TLV container open"; break; - case CHIP_ERROR_INVALID_TRANSFER_MODE.AsInteger(): - desc = "Invalid transfer mode"; - break; - case CHIP_ERROR_INVALID_PROFILE_ID.AsInteger(): - desc = "Invalid profile id"; - break; case CHIP_ERROR_INVALID_MESSAGE_TYPE.AsInteger(): desc = "Invalid message type"; break; case CHIP_ERROR_UNEXPECTED_TLV_ELEMENT.AsInteger(): desc = "Unexpected TLV element"; break; - case CHIP_ERROR_STATUS_REPORT_RECEIVED.AsInteger(): - desc = "Status Report received from peer"; - break; case CHIP_ERROR_NOT_IMPLEMENTED.AsInteger(): desc = "Not Implemented"; break; @@ -215,18 +194,9 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_INSUFFICIENT_PRIVILEGE.AsInteger(): desc = "Required privilege was insufficient during an operation"; break; - case CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_IB.AsInteger(): - desc = "Malformed Interacton Model Attribute Report IB"; - break; case CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_IB.AsInteger(): desc = "Malformed Interacton Model Command Data IB"; break; - case CHIP_ERROR_IM_MALFORMED_EVENT_STATUS_IB.AsInteger(): - desc = "Malformed Interacton Model Event Status IB"; - break; - case CHIP_ERROR_IM_MALFORMED_STATUS_RESPONSE_MESSAGE.AsInteger(): - desc = "Malformed Interacton Model Status Response IB"; - break; case CHIP_ERROR_INVALID_PATH_LIST.AsInteger(): desc = "Invalid TLV path list"; break; @@ -236,12 +206,6 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_TRANSACTION_CANCELED.AsInteger(): desc = "Transaction canceled"; break; - case CHIP_ERROR_LISTENER_ALREADY_STARTED.AsInteger(): - desc = "Listener already started"; - break; - case CHIP_ERROR_LISTENER_ALREADY_STOPPED.AsInteger(): - desc = "Listener already stopped"; - break; case CHIP_ERROR_INVALID_SUBSCRIPTION.AsInteger(): desc = "Invalid Subscription Id"; break; @@ -251,33 +215,12 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR.AsInteger(): desc = "Invalid device descriptor"; break; - case CHIP_ERROR_UNSUPPORTED_DEVICE_DESCRIPTOR_VERSION.AsInteger(): - desc = "Unsupported device descriptor version"; - break; case CHIP_END_OF_INPUT.AsInteger(): desc = "End of input"; break; - case CHIP_ERROR_RATE_LIMIT_EXCEEDED.AsInteger(): - desc = "Rate limit exceeded"; - break; - case CHIP_ERROR_SECURITY_MANAGER_BUSY.AsInteger(): - desc = "Security manager busy"; - break; case CHIP_ERROR_INVALID_PASE_PARAMETER.AsInteger(): desc = "Invalid PASE parameter"; break; - case CHIP_ERROR_PASE_SUPPORTS_ONLY_CONFIG1.AsInteger(): - desc = "PASE supports only Config1"; - break; - case CHIP_ERROR_NO_COMMON_PASE_CONFIGURATIONS.AsInteger(): - desc = "No supported PASE configurations in common"; - break; - case CHIP_ERROR_INVALID_PASE_CONFIGURATION.AsInteger(): - desc = "Invalid PASE configuration"; - break; - case CHIP_ERROR_KEY_CONFIRMATION_FAILED.AsInteger(): - desc = "Key confirmation failed"; - break; case CHIP_ERROR_INVALID_USE_OF_SESSION_KEY.AsInteger(): desc = "Invalid use of session key"; break; @@ -290,24 +233,9 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_RANDOM_DATA_UNAVAILABLE.AsInteger(): desc = "Random data unavailable"; break; - case CHIP_ERROR_UNSUPPORTED_HOST_PORT_ELEMENT.AsInteger(): - desc = "Unsupported type in host/port list"; - break; - case CHIP_ERROR_INVALID_HOST_SUFFIX_INDEX.AsInteger(): - desc = "Invalid suffix index in host/port list"; - break; case CHIP_ERROR_HOST_PORT_LIST_EMPTY.AsInteger(): desc = "Host/port empty"; break; - case CHIP_ERROR_UNSUPPORTED_AUTH_MODE.AsInteger(): - desc = "Unsupported authentication mode"; - break; - case CHIP_ERROR_INVALID_SERVICE_EP.AsInteger(): - desc = "Invalid service endpoint"; - break; - case CHIP_ERROR_INVALID_DIRECTORY_ENTRY_TYPE.AsInteger(): - desc = "Invalid directory entry type"; - break; case CHIP_ERROR_FORCED_RESET.AsInteger(): desc = "Service manager forced reset"; break; @@ -320,9 +248,6 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_NOT_CONNECTED.AsInteger(): desc = "Not connected"; break; - case CHIP_ERROR_NO_SW_UPDATE_AVAILABLE.AsInteger(): - desc = "No SW update available"; - break; case CHIP_ERROR_CA_CERT_NOT_FOUND.AsInteger(): desc = "CA certificate not found"; break; @@ -347,75 +272,27 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_UNSUPPORTED_ELLIPTIC_CURVE.AsInteger(): desc = "Unsupported elliptic curve"; break; - case CHIP_CERT_NOT_USED.AsInteger(): - desc = "Certificate was not used in chain validation"; - break; case CHIP_ERROR_CERT_NOT_FOUND.AsInteger(): desc = "Certificate not found"; break; case CHIP_ERROR_INVALID_CASE_PARAMETER.AsInteger(): desc = "Invalid CASE parameter"; break; - case CHIP_ERROR_UNSUPPORTED_CASE_CONFIGURATION.AsInteger(): - desc = "Unsupported CASE configuration"; - break; case CHIP_ERROR_CERT_LOAD_FAILED.AsInteger(): desc = "Unable to load certificate"; break; case CHIP_ERROR_CERT_NOT_TRUSTED.AsInteger(): desc = "Certificate not trusted"; break; - case CHIP_ERROR_INVALID_ACCESS_TOKEN.AsInteger(): - desc = "Invalid access token"; - break; case CHIP_ERROR_WRONG_CERT_DN.AsInteger(): desc = "Wrong certificate distinguished name"; break; - case CHIP_ERROR_INVALID_PROVISIONING_BUNDLE.AsInteger(): - desc = "Invalid provisioning bundle"; - break; - case CHIP_ERROR_PROVISIONING_BUNDLE_DECRYPTION_ERROR.AsInteger(): - desc = "Provisioning bundle decryption error"; - break; - case CHIP_ERROR_PASE_RECONFIGURE_REQUIRED.AsInteger(): - desc = "PASE reconfiguration required"; - break; case CHIP_ERROR_WRONG_NODE_ID.AsInteger(): desc = "Wrong node ID"; break; - case CHIP_ERROR_CONN_ACCEPTED_ON_WRONG_PORT.AsInteger(): - desc = "Connection accepted on wrong port"; - break; - case CHIP_ERROR_CALLBACK_REPLACED.AsInteger(): - desc = "Application callback replaced"; - break; - case CHIP_ERROR_NO_CASE_AUTH_DELEGATE.AsInteger(): - desc = "No CASE auth delegate set"; - break; - case CHIP_ERROR_DEVICE_LOCATE_TIMEOUT.AsInteger(): - desc = "Timeout attempting to locate device"; - break; - case CHIP_ERROR_DEVICE_CONNECT_TIMEOUT.AsInteger(): - desc = "Timeout connecting to device"; - break; - case CHIP_ERROR_DEVICE_AUTH_TIMEOUT.AsInteger(): - desc = "Timeout authenticating device"; - break; - case CHIP_ERROR_MESSAGE_NOT_ACKNOWLEDGED.AsInteger(): - desc = "Message not acknowledged after max retries"; - break; case CHIP_ERROR_RETRANS_TABLE_FULL.AsInteger(): desc = "Retransmit Table is already full"; break; - case CHIP_ERROR_INVALID_ACK_MESSAGE_COUNTER.AsInteger(): - desc = "Invalid acknowledged message counter"; - break; - case CHIP_ERROR_SEND_THROTTLED.AsInteger(): - desc = "Sending to peer is throttled on this Exchange"; - break; - case CHIP_ERROR_WRONG_MSG_VERSION_FOR_EXCHANGE.AsInteger(): - desc = "Message version not supported by current exchange context"; - break; case CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE.AsInteger(): desc = "Required feature not supported by this configuration"; break; @@ -434,111 +311,33 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_CANCELLED.AsInteger(): desc = "The operation has been cancelled"; break; - case CHIP_ERROR_DRBG_ENTROPY_SOURCE_FAILED.AsInteger(): - desc = "DRBG entropy source failed to generate entropy data"; - break; case CHIP_ERROR_MESSAGE_COUNTER_EXHAUSTED.AsInteger(): desc = "Message counter exhausted"; break; case CHIP_ERROR_FABRIC_EXISTS.AsInteger(): desc = "Trying to add a NOC for a fabric that already exists"; break; - case CHIP_ERROR_KEY_NOT_FOUND_FROM_PEER.AsInteger(): - desc = "Key not found error code received from peer"; - break; case CHIP_ERROR_WRONG_ENCRYPTION_TYPE_FROM_PEER.AsInteger(): desc = "Wrong encryption type error code received from peer"; break; - case CHIP_ERROR_UNKNOWN_KEY_TYPE_FROM_PEER.AsInteger(): - desc = "Unknown key type error code received from peer"; - break; - case CHIP_ERROR_INVALID_USE_OF_SESSION_KEY_FROM_PEER.AsInteger(): - desc = "Invalid use of session key error code received from peer"; - break; - case CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE_FROM_PEER.AsInteger(): - desc = "Unsupported encryption type error code received from peer"; - break; - case CHIP_ERROR_INTERNAL_KEY_ERROR_FROM_PEER.AsInteger(): - desc = "Internal key error code received from peer"; - break; case CHIP_ERROR_INVALID_KEY_ID.AsInteger(): desc = "Invalid key identifier"; break; case CHIP_ERROR_INVALID_TIME.AsInteger(): desc = "Valid time value is not available"; break; - case CHIP_ERROR_LOCKING_FAILURE.AsInteger(): - desc = "Failure to lock/unlock OS-provided lock"; - break; - case CHIP_ERROR_UNSUPPORTED_PASSCODE_CONFIG.AsInteger(): - desc = "Unsupported passcode encryption configuration"; - break; - case CHIP_ERROR_PASSCODE_AUTHENTICATION_FAILED.AsInteger(): - desc = "Passcode authentication failed"; - break; - case CHIP_ERROR_PASSCODE_FINGERPRINT_FAILED.AsInteger(): - desc = "Passcode fingerprint failed"; - break; - case CHIP_ERROR_SERIALIZATION_ELEMENT_NULL.AsInteger(): - desc = "Element requested is null"; - break; - case CHIP_ERROR_WRONG_CERT_SIGNATURE_ALGORITHM.AsInteger(): - desc = "Certificate not signed with required signature algorithm"; - break; - case CHIP_ERROR_WRONG_CHIP_SIGNATURE_ALGORITHM.AsInteger(): - desc = "CHIP signature not signed with required signature algorithm"; - break; case CHIP_ERROR_SCHEMA_MISMATCH.AsInteger(): desc = "Schema mismatch"; break; case CHIP_ERROR_INVALID_INTEGER_VALUE.AsInteger(): desc = "Invalid integer value"; break; - case CHIP_ERROR_CASE_RECONFIG_REQUIRED.AsInteger(): - desc = "CASE reconfiguration required"; - break; - case CHIP_ERROR_TOO_MANY_CASE_RECONFIGURATIONS.AsInteger(): - desc = "Too many CASE reconfigurations were received"; - break; case CHIP_ERROR_BAD_REQUEST.AsInteger(): desc = "Request cannot be processed or fulfilled"; break; - case CHIP_ERROR_INVALID_MESSAGE_FLAG.AsInteger(): - desc = "Invalid message flag"; - break; - case CHIP_ERROR_KEY_EXPORT_RECONFIGURE_REQUIRED.AsInteger(): - desc = "Key export protocol required to reconfigure"; - break; - case CHIP_ERROR_NO_COMMON_KEY_EXPORT_CONFIGURATIONS.AsInteger(): - desc = "No supported key export protocol configurations in common"; - break; - case CHIP_ERROR_INVALID_KEY_EXPORT_CONFIGURATION.AsInteger(): - desc = "Invalid key export protocol configuration"; - break; - case CHIP_ERROR_NO_KEY_EXPORT_DELEGATE.AsInteger(): - desc = "No key export protocol delegate set"; - break; - case CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_REQUEST.AsInteger(): - desc = "Unauthorized key export request"; - break; - case CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_RESPONSE.AsInteger(): - desc = "Unauthorized key export response"; - break; - case CHIP_ERROR_EXPORTED_KEY_AUTHENTICATION_FAILED.AsInteger(): - desc = "Exported key authentication failed"; - break; - case CHIP_ERROR_TOO_MANY_SHARED_SESSION_END_NODES.AsInteger(): - desc = "Too many shared session end nodes"; - break; - case CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_DATA_IB.AsInteger(): - desc = "Malformed Interaction Model Attribute Data IB"; - break; case CHIP_ERROR_WRONG_CERT_TYPE.AsInteger(): desc = "Wrong certificate type"; break; - case CHIP_ERROR_DEFAULT_EVENT_HANDLER_NOT_CALLED.AsInteger(): - desc = "Default event handler not called"; - break; case CHIP_ERROR_PERSISTED_STORAGE_FAILED.AsInteger(): desc = "Persisted storage failed"; break; @@ -548,12 +347,6 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_IM_FABRIC_DELETED.AsInteger(): desc = "The fabric is deleted, and the corresponding IM resources are released"; break; - case CHIP_ERROR_PROFILE_STRING_CONTEXT_NOT_REGISTERED.AsInteger(): - desc = "String context not registered"; - break; - case CHIP_ERROR_INCOMPATIBLE_SCHEMA_VERSION.AsInteger(): - desc = "Incompatible data schema version"; - break; case CHIP_ERROR_ACCESS_DENIED.AsInteger(): desc = "The CHIP message is not granted access"; break; @@ -563,15 +356,6 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_VERSION_MISMATCH.AsInteger(): desc = "Version mismatch"; break; - case CHIP_ERROR_UNSUPPORTED_THREAD_NETWORK_CREATE.AsInteger(): - desc = "Legacy device doesn't support standalone Thread network creation"; - break; - case CHIP_ERROR_INCONSISTENT_CONDITIONALITY.AsInteger(): - desc = "The Trait Instance is already being updated with a different conditionality"; - break; - case CHIP_ERROR_LOCAL_DATA_INCONSISTENT.AsInteger(): - desc = "The local data does not match any known version of the Trait Instance"; - break; case CHIP_EVENT_ID_FOUND.AsInteger(): desc = "Event ID matching criteria was found"; break; @@ -590,15 +374,6 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_DECODE_FAILED.AsInteger(): desc = "Decoding failed"; break; - case CHIP_ERROR_SESSION_KEY_SUSPENDED.AsInteger(): - desc = "Session key suspended"; - break; - case CHIP_ERROR_UNSUPPORTED_WIRELESS_REGULATORY_DOMAIN.AsInteger(): - desc = "Unsupported wireless regulatory domain"; - break; - case CHIP_ERROR_UNSUPPORTED_WIRELESS_OPERATING_LOCATION.AsInteger(): - desc = "Unsupported wireless operating location"; - break; case CHIP_ERROR_MDNS_COLLISION.AsInteger(): desc = "mDNS collision"; break; @@ -608,27 +383,15 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB.AsInteger(): desc = "Malformed Interacton Model Event Path IB"; break; - case CHIP_ERROR_IM_MALFORMED_COMMAND_PATH_IB.AsInteger(): - desc = "Malformed Interacton Model Command Path IB"; - break; - case CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_STATUS_IB.AsInteger(): - desc = "Malformed Interacton Model Attribute Status IB"; - break; case CHIP_ERROR_IM_MALFORMED_EVENT_DATA_IB.AsInteger(): desc = "Malformed Interacton Model Event Data IB"; break; - case CHIP_ERROR_IM_MALFORMED_STATUS_IB.AsInteger(): - desc = "Malformed Interacton Model Status IB"; - break; case CHIP_ERROR_PEER_NODE_NOT_FOUND.AsInteger(): desc = "Unable to find the peer node"; break; case CHIP_ERROR_HSM.AsInteger(): desc = "Hardware security module"; break; - case CHIP_ERROR_INTERMEDIATE_CA_NOT_REQUIRED.AsInteger(): - desc = "Intermediate CA not required"; - break; case CHIP_ERROR_REAL_TIME_NOT_SYNCED.AsInteger(): desc = "Real time not synchronized"; break; @@ -653,63 +416,18 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_FABRIC_MISMATCH_ON_ICA.AsInteger(): desc = "Fabric mismatch on ICA"; break; - case CHIP_ERROR_MESSAGE_COUNTER_OUT_OF_WINDOW.AsInteger(): - desc = "Message id out of window"; - break; - case CHIP_ERROR_REBOOT_SIGNAL_RECEIVED.AsInteger(): - desc = "Termination signal is received"; - break; case CHIP_ERROR_NO_SHARED_TRUSTED_ROOT.AsInteger(): desc = "No shared trusted root"; break; case CHIP_ERROR_IM_STATUS_CODE_RECEIVED.AsInteger(): desc = "Interaction Model Error"; break; - case CHIP_ERROR_IM_MALFORMED_COMMAND_STATUS_IB.AsInteger(): - desc = "Malformed Interaction Model Command Status IB"; - break; - case CHIP_ERROR_IM_MALFORMED_INVOKE_RESPONSE_IB.AsInteger(): - desc = "Malformed Interaction Model Invoke Response IB"; - break; - case CHIP_ERROR_IM_MALFORMED_INVOKE_REQUEST_MESSAGE.AsInteger(): - desc = "Malformed Interaction Model Invoke Request Message"; - break; - case CHIP_ERROR_IM_MALFORMED_INVOKE_RESPONSE_MESSAGE.AsInteger(): - desc = "Malformed Interaction Model Invoke Response Message"; - break; - case CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_MESSAGE.AsInteger(): - desc = "Malformed Interaction Model Attribute Report Message"; - break; - case CHIP_ERROR_IM_MALFORMED_WRITE_REQUEST_MESSAGE.AsInteger(): - desc = "Malformed Interaction Model Write Request Message"; - break; - case CHIP_ERROR_IM_MALFORMED_EVENT_FILTER_IB.AsInteger(): - desc = "Malformed Interaction Model Event Filter IB"; - break; - case CHIP_ERROR_IM_MALFORMED_READ_REQUEST_MESSAGE.AsInteger(): - desc = "Malformed Interaction Model Read Request Message"; - break; - case CHIP_ERROR_IM_MALFORMED_SUBSCRIBE_REQUEST_MESSAGE.AsInteger(): - desc = "Malformed Interaction Model Subscribe Request Message"; - break; - case CHIP_ERROR_IM_MALFORMED_SUBSCRIBE_RESPONSE_MESSAGE.AsInteger(): - desc = "Malformed Interaction Model Subscribe Response Message"; - break; - case CHIP_ERROR_IM_MALFORMED_EVENT_REPORT_IB.AsInteger(): - desc = "Malformed Interaction Model Event Report IB"; - break; - case CHIP_ERROR_IM_MALFORMED_CLUSTER_PATH_IB.AsInteger(): - desc = "Malformed Interaction Model Cluster Path IB"; - break; case CHIP_ERROR_IM_MALFORMED_DATA_VERSION_FILTER_IB.AsInteger(): desc = "Malformed Interaction Model Data Version Filter IB"; break; case CHIP_ERROR_NOT_FOUND.AsInteger(): desc = "The item referenced in the function call was not found"; break; - case CHIP_ERROR_IM_MALFORMED_TIMED_REQUEST_MESSAGE.AsInteger(): - desc = "Malformed Interaction Model Timed Request Message"; - break; case CHIP_ERROR_INVALID_FILE_IDENTIFIER.AsInteger(): desc = "The file identifier, encoded in the first few bytes of a processed file, has unexpected value"; break; @@ -722,9 +440,6 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_PROVIDER_LIST_EXHAUSTED.AsInteger(): desc = "The provider list has been exhausted"; break; - case CHIP_ERROR_ANOTHER_COMMISSIONING_IN_PROGRESS.AsInteger(): - desc = "Another commissioning in progress"; - break; case CHIP_ERROR_INVALID_SCHEME_PREFIX.AsInteger(): desc = "The scheme field contains an invalid prefix"; break; diff --git a/src/lib/core/CHIPError.h b/src/lib/core/CHIPError.h index 0483c4d76abaed..eb5d0d04188e89 100644 --- a/src/lib/core/CHIPError.h +++ b/src/lib/core/CHIPError.h @@ -585,15 +585,7 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_WRONG_ENCRYPTION_TYPE CHIP_CORE_ERROR(0x11) -/** - * @def CHIP_ERROR_TOO_MANY_KEYS - * - * @brief - * The attempt to allocate a key failed because the number of active keys - * exceeds the maximum limit. - * - */ -#define CHIP_ERROR_TOO_MANY_KEYS CHIP_CORE_ERROR(0x12) +// AVAILABLE: 0x12 /** * @def CHIP_ERROR_INTEGRITY_CHECK_FAILED @@ -614,23 +606,8 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_INVALID_SIGNATURE CHIP_CORE_ERROR(0x14) -/** - * @def CHIP_ERROR_UNSUPPORTED_MESSAGE_VERSION - * - * @brief - * A message version is unsupported. - * - */ -#define CHIP_ERROR_UNSUPPORTED_MESSAGE_VERSION CHIP_CORE_ERROR(0x15) - -/** - * @def CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE - * - * @brief - * An encryption type is unsupported. - * - */ -#define CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE CHIP_CORE_ERROR(0x16) +// AVAILABLE: 0x15 +// AVAILABLE: 0x16 /** * @def CHIP_ERROR_UNSUPPORTED_SIGNATURE_TYPE @@ -713,14 +690,7 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_INVALID_LIST_LENGTH CHIP_CORE_ERROR(0x1f) -/** - * @def CHIP_ERROR_INVALID_INTEGRITY_TYPE - * - * @brief - * An integrity type is invalid. - * - */ -#define CHIP_ERROR_INVALID_INTEGRITY_TYPE CHIP_CORE_ERROR(0x20) +// AVAILABLE: 0x20 /** * @def CHIP_END_OF_TLV @@ -788,23 +758,8 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_TLV_CONTAINER_OPEN CHIP_CORE_ERROR(0x27) -/** - * @def CHIP_ERROR_INVALID_TRANSFER_MODE - * - * @brief - * A transfer mode is invalid. - * - */ -#define CHIP_ERROR_INVALID_TRANSFER_MODE CHIP_CORE_ERROR(0x28) - -/** - * @def CHIP_ERROR_INVALID_PROFILE_ID - * - * @brief - * A profile id is invalid. - * - */ -#define CHIP_ERROR_INVALID_PROFILE_ID CHIP_CORE_ERROR(0x29) +// AVAILABLE: 0x28 +// AVAILABLE: 0x29 /** * @def CHIP_ERROR_INVALID_MESSAGE_TYPE @@ -824,14 +779,7 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_UNEXPECTED_TLV_ELEMENT CHIP_CORE_ERROR(0x2b) -/** - * @def CHIP_ERROR_STATUS_REPORT_RECEIVED - * - * @brief - * A status report is received from a peer node. - * - */ -#define CHIP_ERROR_STATUS_REPORT_RECEIVED CHIP_CORE_ERROR(0x2c) +// AVAILABLE: 0x2c /** * @def CHIP_ERROR_NOT_IMPLEMENTED @@ -896,14 +844,7 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR CHIP_CORE_ERROR(0x33) -/** - * @def CHIP_ERROR_UNSUPPORTED_DEVICE_DESCRIPTOR_VERSION - * - * @brief - * A device descriptor version is unsupported. - * - */ -#define CHIP_ERROR_UNSUPPORTED_DEVICE_DESCRIPTOR_VERSION CHIP_CORE_ERROR(0x34) +// AVAILABLE: 0x34 /** * @def CHIP_END_OF_INPUT @@ -915,23 +856,8 @@ using CHIP_ERROR = ::chip::ChipError; #define CHIP_ERROR_END_OF_INPUT CHIP_CORE_ERROR(0x35) #define CHIP_END_OF_INPUT CHIP_ERROR_END_OF_INPUT -/** - * @def CHIP_ERROR_RATE_LIMIT_EXCEEDED - * - * @brief - * A rate limit is exceeded. - * - */ -#define CHIP_ERROR_RATE_LIMIT_EXCEEDED CHIP_CORE_ERROR(0x36) - -/** - * @def CHIP_ERROR_SECURITY_MANAGER_BUSY - * - * @brief - * A security manager is busy. - * - */ -#define CHIP_ERROR_SECURITY_MANAGER_BUSY CHIP_CORE_ERROR(0x37) +// AVAILABLE: 0x36 +// AVAILABLE: 0x37 /** * @def CHIP_ERROR_INVALID_PASE_PARAMETER @@ -942,23 +868,8 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_INVALID_PASE_PARAMETER CHIP_CORE_ERROR(0x38) -/** - * @def CHIP_ERROR_PASE_SUPPORTS_ONLY_CONFIG1 - * - * @brief - * PASE supports only config1. - * - */ -#define CHIP_ERROR_PASE_SUPPORTS_ONLY_CONFIG1 CHIP_CORE_ERROR(0x39) - -/** - * @def CHIP_ERROR_KEY_CONFIRMATION_FAILED - * - * @brief - * A key confirmation failed. - * - */ -#define CHIP_ERROR_KEY_CONFIRMATION_FAILED CHIP_CORE_ERROR(0x3a) +// AVAILABLE: 0x39 +// AVAILABLE: 0x3a /** * @def CHIP_ERROR_INVALID_USE_OF_SESSION_KEY @@ -996,23 +907,8 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_RANDOM_DATA_UNAVAILABLE CHIP_CORE_ERROR(0x3e) -/** - * @def CHIP_ERROR_UNSUPPORTED_HOST_PORT_ELEMENT - * - * @brief - * A type in host/port list is unsupported. - * - */ -#define CHIP_ERROR_UNSUPPORTED_HOST_PORT_ELEMENT CHIP_CORE_ERROR(0x3f) - -/** - * @def CHIP_ERROR_INVALID_HOST_SUFFIX_INDEX - * - * @brief - * A suffix index in host/port list is invalid. - * - */ -#define CHIP_ERROR_INVALID_HOST_SUFFIX_INDEX CHIP_CORE_ERROR(0x40) +// AVAILABLE: 0x3f +// AVAILABLE: 0x40 /** * @def CHIP_ERROR_HOST_PORT_LIST_EMPTY @@ -1023,32 +919,9 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_HOST_PORT_LIST_EMPTY CHIP_CORE_ERROR(0x41) -/** - * @def CHIP_ERROR_UNSUPPORTED_AUTH_MODE - * - * @brief - * An authentication mode is unsupported. - * - */ -#define CHIP_ERROR_UNSUPPORTED_AUTH_MODE CHIP_CORE_ERROR(0x42) - -/** - * @def CHIP_ERROR_INVALID_SERVICE_EP - * - * @brief - * A service endpoint is invalid. - * - */ -#define CHIP_ERROR_INVALID_SERVICE_EP CHIP_CORE_ERROR(0x43) - -/** - * @def CHIP_ERROR_INVALID_DIRECTORY_ENTRY_TYPE - * - * @brief - * A directory entry type is unknown. - * - */ -#define CHIP_ERROR_INVALID_DIRECTORY_ENTRY_TYPE CHIP_CORE_ERROR(0x44) +// AVAILABLE: 0x42 +// AVAILABLE: 0x43 +// AVAILABLE: 0x44 /** * @def CHIP_ERROR_FORCED_RESET @@ -1087,14 +960,7 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_NOT_CONNECTED CHIP_CORE_ERROR(0x48) -/** - * @def CHIP_ERROR_NO_SW_UPDATE_AVAILABLE - * - * @brief - * No software update is available. - * - */ -#define CHIP_ERROR_NO_SW_UPDATE_AVAILABLE CHIP_CORE_ERROR(0x49) +// AVAILABLE: 0x49 /** * @def CHIP_ERROR_CA_CERT_NOT_FOUND @@ -1168,15 +1034,7 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_UNSUPPORTED_ELLIPTIC_CURVE CHIP_CORE_ERROR(0x51) -/** - * @def CHIP_CERT_NOT_USED - * - * @brief - * A certificate was not used during the chain validation. - * - */ -#define CHIP_ERROR_CERT_NOT_USED CHIP_CORE_ERROR(0x52) -#define CHIP_CERT_NOT_USED CHIP_ERROR_CERT_NOT_USED +// AVAILABLE: 0x52 /** * @def CHIP_ERROR_CERT_NOT_FOUND @@ -1196,14 +1054,7 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_INVALID_CASE_PARAMETER CHIP_CORE_ERROR(0x54) -/** - * @def CHIP_ERROR_UNSUPPORTED_CASE_CONFIGURATION - * - * @brief - * A CASE configuration is unsupported. - * - */ -#define CHIP_ERROR_UNSUPPORTED_CASE_CONFIGURATION CHIP_CORE_ERROR(0x55) +// AVAILABLE: 0x55 /** * @def CHIP_ERROR_CERT_LOAD_FAILED @@ -1223,14 +1074,7 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_CERT_NOT_TRUSTED CHIP_CORE_ERROR(0x57) -/** - * @def CHIP_ERROR_INVALID_ACCESS_TOKEN - * - * @brief - * An access token is invalid. - * - */ -#define CHIP_ERROR_INVALID_ACCESS_TOKEN CHIP_CORE_ERROR(0x58) +// AVAILABLE: 0x58 /** * @def CHIP_ERROR_WRONG_CERT_DN @@ -1241,23 +1085,8 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_WRONG_CERT_DN CHIP_CORE_ERROR(0x59) -/** - * @def CHIP_ERROR_INVALID_PROVISIONING_BUNDLE - * - * @brief - * A provisioning bundle is invalid. - * - */ -#define CHIP_ERROR_INVALID_PROVISIONING_BUNDLE CHIP_CORE_ERROR(0x5a) - -/** - * @def CHIP_ERROR_PROVISIONING_BUNDLE_DECRYPTION_ERROR - * - * @brief - * A provision bundle encountered a decryption error. - * - */ -#define CHIP_ERROR_PROVISIONING_BUNDLE_DECRYPTION_ERROR CHIP_CORE_ERROR(0x5b) +// AVAILABLE: 0x5a +// AVAILABLE: 0x5b /** * @def CHIP_ERROR_WRONG_NODE_ID @@ -1268,68 +1097,13 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_WRONG_NODE_ID CHIP_CORE_ERROR(0x5c) -/** - * @def CHIP_ERROR_CONN_ACCEPTED_ON_WRONG_PORT - * - * @brief - * A connection is accepted on a wrong port. - * - */ -#define CHIP_ERROR_CONN_ACCEPTED_ON_WRONG_PORT CHIP_CORE_ERROR(0x5d) - -/** - * @def CHIP_ERROR_CALLBACK_REPLACED - * - * @brief - * An application callback has been replaced. - * - */ -#define CHIP_ERROR_CALLBACK_REPLACED CHIP_CORE_ERROR(0x5e) - -/** - * @def CHIP_ERROR_NO_CASE_AUTH_DELEGATE - * - * @brief - * No CASE authentication delegate is set. - * - */ -#define CHIP_ERROR_NO_CASE_AUTH_DELEGATE CHIP_CORE_ERROR(0x5f) - -/** - * @def CHIP_ERROR_DEVICE_LOCATE_TIMEOUT - * - * @brief - * The attempt to locate device timed out. - * - */ -#define CHIP_ERROR_DEVICE_LOCATE_TIMEOUT CHIP_CORE_ERROR(0x60) - -/** - * @def CHIP_ERROR_DEVICE_CONNECT_TIMEOUT - * - * @brief - * The attempt to connect device timed out. - * - */ -#define CHIP_ERROR_DEVICE_CONNECT_TIMEOUT CHIP_CORE_ERROR(0x61) - -/** - * @def CHIP_ERROR_DEVICE_AUTH_TIMEOUT - * - * @brief - * The attempt to authenticate device timed out. - * - */ -#define CHIP_ERROR_DEVICE_AUTH_TIMEOUT CHIP_CORE_ERROR(0x62) - -/** - * @def CHIP_ERROR_MESSAGE_NOT_ACKNOWLEDGED - * - * @brief - * A message is not acknowledged after max retries. - * - */ -#define CHIP_ERROR_MESSAGE_NOT_ACKNOWLEDGED CHIP_CORE_ERROR(0x63) +// AVAILABLE: 0x5d +// AVAILABLE: 0x5e +// AVAILABLE: 0x5f +// AVAILABLE: 0x60 +// AVAILABLE: 0x61 +// AVAILABLE: 0x62 +// AVAILABLE: 0x63 /** * @def CHIP_ERROR_RETRANS_TABLE_FULL @@ -1340,32 +1114,9 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_RETRANS_TABLE_FULL CHIP_CORE_ERROR(0x64) -/** - * @def CHIP_ERROR_INVALID_ACK_MESSAGE_COUNTER - * - * @brief - * An acknowledgment id is invalid. - * - */ -#define CHIP_ERROR_INVALID_ACK_MESSAGE_COUNTER CHIP_CORE_ERROR(0x65) - -/** - * @def CHIP_ERROR_SEND_THROTTLED - * - * @brief - * A send is throttled. - * - */ -#define CHIP_ERROR_SEND_THROTTLED CHIP_CORE_ERROR(0x66) - -/** - * @def CHIP_ERROR_WRONG_MSG_VERSION_FOR_EXCHANGE - * - * @brief - * A message version is not supported by the current exchange context. - * - */ -#define CHIP_ERROR_WRONG_MSG_VERSION_FOR_EXCHANGE CHIP_CORE_ERROR(0x67) +// AVAILABLE: 0x65 +// AVAILABLE: 0x66 +// AVAILABLE: 0x67 /** * @def CHIP_ERROR_TRANSACTION_CANCELED @@ -1376,23 +1127,8 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_TRANSACTION_CANCELED CHIP_CORE_ERROR(0x68) -/** - * @def CHIP_ERROR_LISTENER_ALREADY_STARTED - * - * @brief - * A listener has already started. - * - */ -#define CHIP_ERROR_LISTENER_ALREADY_STARTED CHIP_CORE_ERROR(0x69) - -/** - * @def CHIP_ERROR_LISTENER_ALREADY_STOPPED - * - * @brief - * A listener has already stopped. - * - */ -#define CHIP_ERROR_LISTENER_ALREADY_STOPPED CHIP_CORE_ERROR(0x6a) +// AVAILABLE: 0x69 +// AVAILABLE: 0x6a /** * @def CHIP_ERROR_INVALID_SUBSCRIPTION @@ -1412,33 +1148,6 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE CHIP_CORE_ERROR(0x6c) -/** - * @def CHIP_ERROR_PASE_RECONFIGURE_REQUIRED - * - * @brief - * PASE is required to reconfigure. - * - */ -#define CHIP_ERROR_PASE_RECONFIGURE_REQUIRED CHIP_CORE_ERROR(0x6d) - -/** - * @def CHIP_ERROR_INVALID_PASE_CONFIGURATION - * - * @brief - * A PASE configuration is invalid. - * - */ -#define CHIP_ERROR_INVALID_PASE_CONFIGURATION CHIP_CORE_ERROR(0x6e) - -/** - * @def CHIP_ERROR_NO_COMMON_PASE_CONFIGURATIONS - * - * @brief - * No PASE configuration is in common. - * - */ -#define CHIP_ERROR_NO_COMMON_PASE_CONFIGURATIONS CHIP_CORE_ERROR(0x6f) - /** * @def CHIP_ERROR_UNSOLICITED_MSG_NO_ORIGINATOR * @@ -1483,14 +1192,7 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_CANCELLED CHIP_CORE_ERROR(0x74) -/** - * @def CHIP_ERROR_DRBG_ENTROPY_SOURCE_FAILED - * - * @brief - * DRBG entropy source failed to generate entropy data. - * - */ -#define CHIP_ERROR_DRBG_ENTROPY_SOURCE_FAILED CHIP_CORE_ERROR(0x75) +// AVAILABLE: 0x75 /** * @def CHIP_ERROR_TLV_TAG_NOT_FOUND @@ -1528,32 +1230,9 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_INSUFFICIENT_PRIVILEGE CHIP_CORE_ERROR(0x79) -/** - * @def CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_IB - * - * @brief - * The Attribute Report IB is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_IB CHIP_CORE_ERROR(0x7a) - -/** - * @def CHIP_ERROR_IM_MALFORMED_EVENT_STATUS_IB - * - * @brief - * The Event Status IB is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_EVENT_STATUS_IB CHIP_CORE_ERROR(0x7b) - -/** - * @def CHIP_ERROR_IM_MALFORMED_STATUS_RESPONSE_MESSAGE - * - * @brief - * The Status Response Message is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_STATUS_RESPONSE_MESSAGE CHIP_CORE_ERROR(0x7c) +// AVAILABLE: 0x7a +// AVAILABLE: 0x7b +// AVAILABLE: 0x7c /** * @def CHIP_ERROR_MESSAGE_COUNTER_EXHAUSTED @@ -1572,14 +1251,7 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_FABRIC_EXISTS CHIP_CORE_ERROR(0x7e) -/** - * @def CHIP_ERROR_KEY_NOT_FOUND_FROM_PEER - * - * @brief - * The encryption key is not found error received from a peer node. - * - */ -#define CHIP_ERROR_KEY_NOT_FOUND_FROM_PEER CHIP_CORE_ERROR(0x7f) +// AVAILABLE: 0x7f /** * @def CHIP_ERROR_WRONG_ENCRYPTION_TYPE_FROM_PEER @@ -1590,258 +1262,77 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_WRONG_ENCRYPTION_TYPE_FROM_PEER CHIP_CORE_ERROR(0x80) +// AVAILABLE: 0x81 +// AVAILABLE: 0x82 +// AVAILABLE: 0x83 +// AVAILABLE: 0x84 + /** - * @def CHIP_ERROR_UNKNOWN_KEY_TYPE_FROM_PEER + * @def CHIP_ERROR_INVALID_KEY_ID * * @brief - * The unknown key type error received from a peer node. + * A key id is invalid. * */ -#define CHIP_ERROR_UNKNOWN_KEY_TYPE_FROM_PEER CHIP_CORE_ERROR(0x81) +#define CHIP_ERROR_INVALID_KEY_ID CHIP_CORE_ERROR(0x85) /** - * @def CHIP_ERROR_INVALID_USE_OF_SESSION_KEY_FROM_PEER + * @def CHIP_ERROR_INVALID_TIME * * @brief - * The invalid use of session key error received from a peer node. + * Time has invalid value. * */ -#define CHIP_ERROR_INVALID_USE_OF_SESSION_KEY_FROM_PEER CHIP_CORE_ERROR(0x82) +#define CHIP_ERROR_INVALID_TIME CHIP_CORE_ERROR(0x86) + +// AVAILABLE: 0x87 +// AVAILABLE: 0x88 +// AVAILABLE: 0x89 +// AVAILABLE: 0x8a +// AVAILABLE: 0x8b +// AVAILABLE: 0x8c +// AVAILABLE: 0x8d /** - * @def CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE_FROM_PEER + * @def CHIP_ERROR_SCHEMA_MISMATCH * * @brief - * An unsupported encryption type error received from a peer node. + * A mismatch in schema was encountered. * */ -#define CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE_FROM_PEER CHIP_CORE_ERROR(0x83) +#define CHIP_ERROR_SCHEMA_MISMATCH CHIP_CORE_ERROR(0x8e) /** - * @def CHIP_ERROR_INTERNAL_KEY_ERROR_FROM_PEER + * @def CHIP_ERROR_INVALID_INTEGER_VALUE * * @brief - * The internal key error received from a peer node. + * An integer does not have the kind of value we expect. * */ -#define CHIP_ERROR_INTERNAL_KEY_ERROR_FROM_PEER CHIP_CORE_ERROR(0x84) +#define CHIP_ERROR_INVALID_INTEGER_VALUE CHIP_CORE_ERROR(0x8f) + +// AVAILABLE: 0x90 +// AVAILABLE: 0x91 /** - * @def CHIP_ERROR_INVALID_KEY_ID + * @def CHIP_ERROR_BAD_REQUEST * * @brief - * A key id is invalid. - * - */ -#define CHIP_ERROR_INVALID_KEY_ID CHIP_CORE_ERROR(0x85) - -/** - * @def CHIP_ERROR_INVALID_TIME - * - * @brief - * Time has invalid value. - * - */ -#define CHIP_ERROR_INVALID_TIME CHIP_CORE_ERROR(0x86) - -/** - * @def CHIP_ERROR_LOCKING_FAILURE - * - * @brief - * Failure to acquire or release an OS provided mutex. - * - */ -#define CHIP_ERROR_LOCKING_FAILURE CHIP_CORE_ERROR(0x87) - -/** - * @def CHIP_ERROR_UNSUPPORTED_PASSCODE_CONFIG - * - * @brief - * A passcode encryption configuration is unsupported. - * - */ -#define CHIP_ERROR_UNSUPPORTED_PASSCODE_CONFIG CHIP_CORE_ERROR(0x88) - -/** - * @def CHIP_ERROR_PASSCODE_AUTHENTICATION_FAILED - * - * @brief - * The CHIP passcode authentication failed. - * - */ -#define CHIP_ERROR_PASSCODE_AUTHENTICATION_FAILED CHIP_CORE_ERROR(0x89) - -/** - * @def CHIP_ERROR_PASSCODE_FINGERPRINT_FAILED - * - * @brief - * The CHIP passcode fingerprint failed. - * - */ -#define CHIP_ERROR_PASSCODE_FINGERPRINT_FAILED CHIP_CORE_ERROR(0x8a) - -/** - * @def CHIP_ERROR_SERIALIZATION_ELEMENT_NULL - * - * @brief - * The element of the struct is null. - * - */ -#define CHIP_ERROR_SERIALIZATION_ELEMENT_NULL CHIP_CORE_ERROR(0x8b) - -/** - * @def CHIP_ERROR_WRONG_CERT_SIGNATURE_ALGORITHM - * - * @brief - * The certificate was not signed using the required signature algorithm. - * - */ -#define CHIP_ERROR_WRONG_CERT_SIGNATURE_ALGORITHM CHIP_CORE_ERROR(0x8c) - -/** - * @def CHIP_ERROR_WRONG_CHIP_SIGNATURE_ALGORITHM - * - * @brief - * The CHIP signature was not signed using the required signature algorithm. - * - */ -#define CHIP_ERROR_WRONG_CHIP_SIGNATURE_ALGORITHM CHIP_CORE_ERROR(0x8d) - -/** - * @def CHIP_ERROR_SCHEMA_MISMATCH - * - * @brief - * A mismatch in schema was encountered. - * - */ -#define CHIP_ERROR_SCHEMA_MISMATCH CHIP_CORE_ERROR(0x8e) - -/** - * @def CHIP_ERROR_INVALID_INTEGER_VALUE - * - * @brief - * An integer does not have the kind of value we expect. - * - */ -#define CHIP_ERROR_INVALID_INTEGER_VALUE CHIP_CORE_ERROR(0x8f) - -/** - * @def CHIP_ERROR_CASE_RECONFIG_REQUIRED - * - * @brief - * CASE is required to reconfigure. - * - */ -#define CHIP_ERROR_CASE_RECONFIG_REQUIRED CHIP_CORE_ERROR(0x90) - -/** - * @def CHIP_ERROR_TOO_MANY_CASE_RECONFIGURATIONS - * - * @brief - * Too many CASE reconfigurations were received. - * - */ -#define CHIP_ERROR_TOO_MANY_CASE_RECONFIGURATIONS CHIP_CORE_ERROR(0x91) - -/** - * @def CHIP_ERROR_BAD_REQUEST - * - * @brief - * The request cannot be processed or fulfilled + * The request cannot be processed or fulfilled * */ #define CHIP_ERROR_BAD_REQUEST CHIP_CORE_ERROR(0x92) -/** - * @def CHIP_ERROR_INVALID_MESSAGE_FLAG - * - * @brief - * One or more message flags have invalid value. - * - */ -#define CHIP_ERROR_INVALID_MESSAGE_FLAG CHIP_CORE_ERROR(0x93) - -/** - * @def CHIP_ERROR_KEY_EXPORT_RECONFIGURE_REQUIRED - * - * @brief - * Key export protocol required to reconfigure. - * - */ -#define CHIP_ERROR_KEY_EXPORT_RECONFIGURE_REQUIRED CHIP_CORE_ERROR(0x94) - -/** - * @def CHIP_ERROR_INVALID_KEY_EXPORT_CONFIGURATION - * - * @brief - * A key export protocol configuration is invalid. - * - */ -#define CHIP_ERROR_INVALID_KEY_EXPORT_CONFIGURATION CHIP_CORE_ERROR(0x95) - -/** - * @def CHIP_ERROR_NO_COMMON_KEY_EXPORT_CONFIGURATIONS - * - * @brief - * No key export protocol configuration is in common. - * - */ -#define CHIP_ERROR_NO_COMMON_KEY_EXPORT_CONFIGURATIONS CHIP_CORE_ERROR(0x96) - -/** - * @def CHIP_ERROR_NO_KEY_EXPORT_DELEGATE - * - * @brief - * No key export delegate is set. - * - */ -#define CHIP_ERROR_NO_KEY_EXPORT_DELEGATE CHIP_CORE_ERROR(0x97) - -/** - * @def CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_REQUEST - * - * @brief - * Unauthorized key export request. - * - */ -#define CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_REQUEST CHIP_CORE_ERROR(0x98) - -/** - * @def CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_RESPONSE - * - * @brief - * Unauthorized key export response. - * - */ -#define CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_RESPONSE CHIP_CORE_ERROR(0x99) - -/** - * @def CHIP_ERROR_EXPORTED_KEY_AUTHENTICATION_FAILED - * - * @brief - * The CHIP exported encrypted key authentication failed. - * - */ -#define CHIP_ERROR_EXPORTED_KEY_AUTHENTICATION_FAILED CHIP_CORE_ERROR(0x9a) - -/** - * @def CHIP_ERROR_TOO_MANY_SHARED_SESSION_END_NODES - * - * @brief - * The number of shared secure sessions end nodes exceeds - * the maximum limit. - * - */ -#define CHIP_ERROR_TOO_MANY_SHARED_SESSION_END_NODES CHIP_CORE_ERROR(0x9b) - -/** - * @def CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_DATA_IB - * - * @brief - * The Attribute Data IB is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_DATA_IB CHIP_CORE_ERROR(0x9c) +// AVAILABLE: 0x93 +// AVAILABLE: 0x94 +// AVAILABLE: 0x95 +// AVAILABLE: 0x96 +// AVAILABLE: 0x97 +// AVAILABLE: 0x98 +// AVAILABLE: 0x99 +// AVAILABLE: 0x9a +// AVAILABLE: 0x9b +// AVAILABLE: 0x9c /** * @def CHIP_ERROR_WRONG_CERT_TYPE @@ -1851,14 +1342,7 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_WRONG_CERT_TYPE CHIP_CORE_ERROR(0x9d) -/** - * @def CHIP_ERROR_DEFAULT_EVENT_HANDLER_NOT_CALLED - * - * @brief - * The application's event handler failed to call the default event handler function - * when presented with an unknown event. - */ -#define CHIP_ERROR_DEFAULT_EVENT_HANDLER_NOT_CALLED CHIP_CORE_ERROR(0x9e) +// AVAILABLE: 0x9e /** * @def CHIP_ERROR_PERSISTED_STORAGE_FAILED @@ -1886,22 +1370,9 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_IM_FABRIC_DELETED CHIP_CORE_ERROR(0xa1) -/** - * @def CHIP_ERROR_PROFILE_STRING_CONTEXT_NOT_REGISTERED - * - * @brief - * The specified profile string support context is not registered. - * - */ -#define CHIP_ERROR_PROFILE_STRING_CONTEXT_NOT_REGISTERED CHIP_CORE_ERROR(0xa2) - -/** - * @def CHIP_ERROR_INCOMPATIBLE_SCHEMA_VERSION - * - * @brief - * Encountered a mismatch in compatibility w.r.t to IDL schema version - */ -#define CHIP_ERROR_INCOMPATIBLE_SCHEMA_VERSION CHIP_CORE_ERROR(0xa3) +// AVAILABLE: 0xa2 +// AVAILABLE: 0xa3 +// AVAILABLE: 0xa4 /** * @def CHIP_ERROR_ACCESS_DENIED @@ -1930,37 +1401,9 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_VERSION_MISMATCH CHIP_CORE_ERROR(0xa7) -/** - * @def CHIP_ERROR_UNSUPPORTED_THREAD_NETWORK_CREATE - * - * @brief - * Device doesn't support standalone Thread network creation. - * On some legacy devices new Thread network can only be created - * together with CHIP Fabric using CrateFabric() message. - * - */ -#define CHIP_ERROR_UNSUPPORTED_THREAD_NETWORK_CREATE CHIP_CORE_ERROR(0xa8) - -/** - * @def CHIP_ERROR_INCONSISTENT_CONDITIONALITY - * - * @brief - * A TraitPath was declared updated with a conditionality that - * does not match that of other TraitPaths already updated in the - * same Trait Instance. - * - */ -#define CHIP_ERROR_INCONSISTENT_CONDITIONALITY CHIP_CORE_ERROR(0xa9) - -/** - * @def CHIP_ERROR_LOCAL_DATA_INCONSISTENT - * - * @brief - * The local data does not match any known version of the - * Trait Instance and cannot support the operation requested. - * - */ -#define CHIP_ERROR_LOCAL_DATA_INCONSISTENT CHIP_CORE_ERROR(0xaa) +// AVAILABLE: 0xa8 +// AVAILABLE: 0xa9 +// AVAILABLE: 0xaa /** * @def CHIP_EVENT_ID_FOUND @@ -2011,32 +1454,9 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_DECODE_FAILED CHIP_CORE_ERROR(0xb0) -/** - * @def CHIP_ERROR_SESSION_KEY_SUSPENDED - * - * @brief - * Use of the identified session key is suspended. - * - */ -#define CHIP_ERROR_SESSION_KEY_SUSPENDED CHIP_CORE_ERROR(0xb1) - -/** - * @def CHIP_ERROR_UNSUPPORTED_WIRELESS_REGULATORY_DOMAIN - * - * @brief - * The specified wireless regulatory domain is unsupported. - * - */ -#define CHIP_ERROR_UNSUPPORTED_WIRELESS_REGULATORY_DOMAIN CHIP_CORE_ERROR(0xb2) - -/** - * @def CHIP_ERROR_UNSUPPORTED_WIRELESS_OPERATING_LOCATION - * - * @brief - * The specified wireless operating location is unsupported. - * - */ -#define CHIP_ERROR_UNSUPPORTED_WIRELESS_OPERATING_LOCATION CHIP_CORE_ERROR(0xb3) +// AVAILABLE: 0xb1 +// AVAILABLE: 0xb2 +// AVAILABLE: 0xb3 /** * @def CHIP_ERROR_MDNS_COLLISION @@ -2065,23 +1485,8 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB CHIP_CORE_ERROR(0xb6) -/** - * @def CHIP_ERROR_IM_MALFORMED_COMMAND_PATH_IB - * - * @brief - * The Command Path IB is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_COMMAND_PATH_IB CHIP_CORE_ERROR(0xb7) - -/** - * @def CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_STATUS_IB - * - * @brief - * The Attribute Status IB is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_STATUS_IB CHIP_CORE_ERROR(0xb8) +// AVAILABLE: 0xb7 +// AVAILABLE: 0xb8 /** * @def CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_IB @@ -2101,14 +1506,7 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_IM_MALFORMED_EVENT_DATA_IB CHIP_CORE_ERROR(0xba) -/** - * @def CHIP_ERROR_IM_MALFORMED_STATUS_IB - * - * @brief - * The Attribute Data IB is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_STATUS_IB CHIP_CORE_ERROR(0xbb) +// AVAILABLE: 0xbb /** * @def CHIP_ERROR_PEER_NODE_NOT_FOUND @@ -2126,13 +1524,7 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_HSM CHIP_CORE_ERROR(0xbd) -/** - * @def CHIP_ERROR_INTERMEDIATE_CA_NOT_REQUIRED - * - * @brief - * The commissioner doesn't require an intermediate CA to sign the operational certificates. - */ -#define CHIP_ERROR_INTERMEDIATE_CA_NOT_REQUIRED CHIP_CORE_ERROR(0xbe) +// AVAILABLE: 0xbe /** * @def CHIP_ERROR_REAL_TIME_NOT_SYNCED @@ -2201,21 +1593,8 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_FABRIC_MISMATCH_ON_ICA CHIP_CORE_ERROR(0xc6) -/** - * @def CHIP_ERROR_MESSAGE_COUNTER_OUT_OF_WINDOW - * - * @brief - * The message counter of the received message is out of receiving window - */ -#define CHIP_ERROR_MESSAGE_COUNTER_OUT_OF_WINDOW CHIP_CORE_ERROR(0xc7) - -/** - * @def CHIP_ERROR_REBOOT_SIGNAL_RECEIVED - * - * @brief - * Termination signal is received - */ -#define CHIP_ERROR_REBOOT_SIGNAL_RECEIVED CHIP_CORE_ERROR(0xc8) +// AVAILABLE: 0xc7 +// AVAILABLE: 0xc8 /** * @def CHIP_ERROR_NO_SHARED_TRUSTED_ROOT @@ -2235,113 +1614,18 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_IM_STATUS_CODE_RECEIVED CHIP_CORE_ERROR(0xca) -/** - * @def CHIP_ERROR_IM_MALFORMED_COMMAND_STATUS_IB - * - * @brief - * The Command Status IB is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_COMMAND_STATUS_IB CHIP_CORE_ERROR(0xcb) - -/** - * @def CHIP_ERROR_IM_MALFORMED_INVOKE_RESPONSE_IB - * - * @brief - * The Invoke Response IB is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_INVOKE_RESPONSE_IB CHIP_CORE_ERROR(0xcc) - -/** - * @def CHIP_ERROR_IM_MALFORMED_INVOKE_REQUEST_MESSAGE - * - * @brief - * The Invoke Request Message is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_INVOKE_REQUEST_MESSAGE CHIP_CORE_ERROR(0xcd) - -/** - * @def CHIP_ERROR_IM_MALFORMED_INVOKE_RESPONSE_MESSAGE - * - * @brief - * The Invoke Response Message is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_INVOKE_RESPONSE_MESSAGE CHIP_CORE_ERROR(0xce) - -/** - * @def CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_MESSAGE - * - * @brief - * The Attribute Response Message is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_MESSAGE CHIP_CORE_ERROR(0xcf) - -/** - * @def CHIP_ERROR_IM_MALFORMED_WRITE_REQUEST_MESSAGE - * - * @brief - * The Write Request Message is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_WRITE_REQUEST_MESSAGE CHIP_CORE_ERROR(0xd0) - -/** - * @def CHIP_ERROR_IM_MALFORMED_EVENT_FILTER_IB - * - * @brief - * The Event Filter IB is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_EVENT_FILTER_IB CHIP_CORE_ERROR(0xd1) - -/** - * @def CHIP_ERROR_IM_MALFORMED_READ_REQUEST_MESSAGE - * - * @brief - * The Read Request Message is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_READ_REQUEST_MESSAGE CHIP_CORE_ERROR(0xd2) - -/** - * @def CHIP_ERROR_IM_MALFORMED_SUBSCRIBE_REQUEST_MESSAGE - * - * @brief - * The Subscribe Request Message is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_SUBSCRIBE_REQUEST_MESSAGE CHIP_CORE_ERROR(0xd3) - -/** - * @def CHIP_ERROR_IM_MALFORMED_SUBSCRIBE_RESPONSE_MESSAGE - * - * @brief - * The Subscribe Response Message is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_SUBSCRIBE_RESPONSE_MESSAGE CHIP_CORE_ERROR(0xd4) - -/** - * @def CHIP_ERROR_IM_MALFORMED_EVENT_REPORT_IB - * - * @brief - * The Event Report IB is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_EVENT_REPORT_IB CHIP_CORE_ERROR(0xd5) - -/** - * @def CHIP_ERROR_IM_MALFORMED_CLUSTER_PATH_IB - * - * @brief - * The Cluster Path IB is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_CLUSTER_PATH_IB CHIP_CORE_ERROR(0xd6) +// AVAILABLEL 0xcb +// AVAILABLEL 0xcc +// AVAILABLEL 0xcd +// AVAILABLEL 0xce +// AVAILABLEL 0xcf +// AVAILABLEL 0xd0 +// AVAILABLEL 0xd1 +// AVAILABLEL 0xd2 +// AVAILABLEL 0xd3 +// AVAILABLEL 0xd4 +// AVAILABLEL 0xd5 +// AVAILABLEL 0xd6 /** * @def CHIP_ERROR_IM_MALFORMED_DATA_VERSION_FILTER_IB @@ -2360,14 +1644,7 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_NOT_FOUND CHIP_CORE_ERROR(0xd8) -/** - * @def CHIP_ERROR_IM_MALFORMED_TIMED_REQUEST_MESSAGE - * - * @brief - * The Timed Request Message is malformed: it does not contain - * the required elements - */ -#define CHIP_ERROR_IM_MALFORMED_TIMED_REQUEST_MESSAGE CHIP_CORE_ERROR(0xd9) +// AVAILABLE: 0xd9 /** * @def CHIP_ERROR_INVALID_FILE_IDENTIFIER @@ -2402,14 +1679,7 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_PROVIDER_LIST_EXHAUSTED CHIP_CORE_ERROR(0xdd) -/* - * @def CHIP_ERROR_ANOTHER_COMMISSIONING_IN_PROGRESS - * - * @brief - * Indicates that the commissioning window on the device is already open, and another - * commissioning is in progress - */ -#define CHIP_ERROR_ANOTHER_COMMISSIONING_IN_PROGRESS CHIP_CORE_ERROR(0xde) +// AVAILABLE: 0xde /** * @def CHIP_ERROR_INVALID_SCHEME_PREFIX @@ -2435,6 +1705,8 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_HANDLER_NOT_SET CHIP_CORE_ERROR(0xe1) +// WHEN ADDING A NEW ERROR CODE: Look for "AVAILABLE" comments above and fill in gaps. + // clang-format on // !!!!! IMPORTANT !!!!! If you add new CHIP errors, please update the translation diff --git a/src/lib/core/tests/TestCHIPErrorStr.cpp b/src/lib/core/tests/TestCHIPErrorStr.cpp index 901dbf4e404a73..d731a47cdbf193 100644 --- a/src/lib/core/tests/TestCHIPErrorStr.cpp +++ b/src/lib/core/tests/TestCHIPErrorStr.cpp @@ -66,11 +66,8 @@ static const CHIP_ERROR kTestElements[] = CHIP_ERROR_UNKNOWN_KEY_TYPE, CHIP_ERROR_KEY_NOT_FOUND, CHIP_ERROR_WRONG_ENCRYPTION_TYPE, - CHIP_ERROR_TOO_MANY_KEYS, CHIP_ERROR_INTEGRITY_CHECK_FAILED, CHIP_ERROR_INVALID_SIGNATURE, - CHIP_ERROR_UNSUPPORTED_MESSAGE_VERSION, - CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE, CHIP_ERROR_UNSUPPORTED_SIGNATURE_TYPE, CHIP_ERROR_INVALID_MESSAGE_LENGTH, CHIP_ERROR_BUFFER_TOO_SMALL, @@ -80,7 +77,6 @@ static const CHIP_ERROR kTestElements[] = CHIP_ERROR_WELL_EMPTY, CHIP_ERROR_INVALID_STRING_LENGTH, CHIP_ERROR_INVALID_LIST_LENGTH, - CHIP_ERROR_INVALID_INTEGRITY_TYPE, CHIP_END_OF_TLV, CHIP_ERROR_TLV_UNDERRUN, CHIP_ERROR_INVALID_TLV_ELEMENT, @@ -88,11 +84,8 @@ static const CHIP_ERROR kTestElements[] = CHIP_ERROR_UNKNOWN_IMPLICIT_TLV_TAG, CHIP_ERROR_WRONG_TLV_TYPE, CHIP_ERROR_TLV_CONTAINER_OPEN, - CHIP_ERROR_INVALID_TRANSFER_MODE, - CHIP_ERROR_INVALID_PROFILE_ID, CHIP_ERROR_INVALID_MESSAGE_TYPE, CHIP_ERROR_UNEXPECTED_TLV_ELEMENT, - CHIP_ERROR_STATUS_REPORT_RECEIVED, CHIP_ERROR_NOT_IMPLEMENTED, CHIP_ERROR_INVALID_ADDRESS, CHIP_ERROR_INVALID_ARGUMENT, @@ -100,28 +93,17 @@ static const CHIP_ERROR kTestElements[] = CHIP_ERROR_INVALID_DATA_LIST, CHIP_ERROR_TIMEOUT, CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR, - CHIP_ERROR_UNSUPPORTED_DEVICE_DESCRIPTOR_VERSION, CHIP_END_OF_INPUT, - CHIP_ERROR_RATE_LIMIT_EXCEEDED, - CHIP_ERROR_SECURITY_MANAGER_BUSY, CHIP_ERROR_INVALID_PASE_PARAMETER, - CHIP_ERROR_PASE_SUPPORTS_ONLY_CONFIG1, - CHIP_ERROR_KEY_CONFIRMATION_FAILED, CHIP_ERROR_INVALID_USE_OF_SESSION_KEY, CHIP_ERROR_CONNECTION_CLOSED_UNEXPECTEDLY, CHIP_ERROR_MISSING_TLV_ELEMENT, CHIP_ERROR_RANDOM_DATA_UNAVAILABLE, - CHIP_ERROR_UNSUPPORTED_HOST_PORT_ELEMENT, - CHIP_ERROR_INVALID_HOST_SUFFIX_INDEX, CHIP_ERROR_HOST_PORT_LIST_EMPTY, - CHIP_ERROR_UNSUPPORTED_AUTH_MODE, - CHIP_ERROR_INVALID_SERVICE_EP, - CHIP_ERROR_INVALID_DIRECTORY_ENTRY_TYPE, CHIP_ERROR_FORCED_RESET, CHIP_ERROR_NO_ENDPOINT, CHIP_ERROR_INVALID_DESTINATION_NODE_ID, CHIP_ERROR_NOT_CONNECTED, - CHIP_ERROR_NO_SW_UPDATE_AVAILABLE, CHIP_ERROR_CA_CERT_NOT_FOUND, CHIP_ERROR_CERT_PATH_LEN_CONSTRAINT_EXCEEDED, CHIP_ERROR_CERT_PATH_TOO_LONG, @@ -130,142 +112,64 @@ static const CHIP_ERROR kTestElements[] = CHIP_ERROR_CERT_NOT_VALID_YET, CHIP_ERROR_UNSUPPORTED_CERT_FORMAT, CHIP_ERROR_UNSUPPORTED_ELLIPTIC_CURVE, - CHIP_CERT_NOT_USED, CHIP_ERROR_CERT_NOT_FOUND, CHIP_ERROR_INVALID_CASE_PARAMETER, - CHIP_ERROR_UNSUPPORTED_CASE_CONFIGURATION, CHIP_ERROR_CERT_LOAD_FAILED, CHIP_ERROR_CERT_NOT_TRUSTED, - CHIP_ERROR_INVALID_ACCESS_TOKEN, CHIP_ERROR_WRONG_CERT_DN, - CHIP_ERROR_INVALID_PROVISIONING_BUNDLE, - CHIP_ERROR_PROVISIONING_BUNDLE_DECRYPTION_ERROR, CHIP_ERROR_WRONG_NODE_ID, - CHIP_ERROR_CONN_ACCEPTED_ON_WRONG_PORT, - CHIP_ERROR_CALLBACK_REPLACED, - CHIP_ERROR_NO_CASE_AUTH_DELEGATE, - CHIP_ERROR_DEVICE_LOCATE_TIMEOUT, - CHIP_ERROR_DEVICE_CONNECT_TIMEOUT, - CHIP_ERROR_DEVICE_AUTH_TIMEOUT, - CHIP_ERROR_MESSAGE_NOT_ACKNOWLEDGED, CHIP_ERROR_RETRANS_TABLE_FULL, - CHIP_ERROR_INVALID_ACK_MESSAGE_COUNTER, - CHIP_ERROR_SEND_THROTTLED, - CHIP_ERROR_WRONG_MSG_VERSION_FOR_EXCHANGE, CHIP_ERROR_TRANSACTION_CANCELED, - CHIP_ERROR_LISTENER_ALREADY_STARTED, - CHIP_ERROR_LISTENER_ALREADY_STOPPED, CHIP_ERROR_INVALID_SUBSCRIPTION, CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE, - CHIP_ERROR_PASE_RECONFIGURE_REQUIRED, - CHIP_ERROR_INVALID_PASE_CONFIGURATION, - CHIP_ERROR_NO_COMMON_PASE_CONFIGURATIONS, CHIP_ERROR_UNSOLICITED_MSG_NO_ORIGINATOR, CHIP_ERROR_INVALID_FABRIC_INDEX, CHIP_ERROR_TOO_MANY_CONNECTIONS, CHIP_ERROR_SHUT_DOWN, CHIP_ERROR_CANCELLED, - CHIP_ERROR_DRBG_ENTROPY_SOURCE_FAILED, CHIP_ERROR_TLV_TAG_NOT_FOUND, CHIP_ERROR_MISSING_SECURE_SESSION, CHIP_ERROR_INVALID_ADMIN_SUBJECT, CHIP_ERROR_INSUFFICIENT_PRIVILEGE, - CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_IB, - CHIP_ERROR_IM_MALFORMED_EVENT_STATUS_IB, - CHIP_ERROR_IM_MALFORMED_STATUS_RESPONSE_MESSAGE, CHIP_ERROR_MESSAGE_COUNTER_EXHAUSTED, CHIP_ERROR_FABRIC_EXISTS, - CHIP_ERROR_KEY_NOT_FOUND_FROM_PEER, CHIP_ERROR_WRONG_ENCRYPTION_TYPE_FROM_PEER, - CHIP_ERROR_UNKNOWN_KEY_TYPE_FROM_PEER, - CHIP_ERROR_INVALID_USE_OF_SESSION_KEY_FROM_PEER, - CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE_FROM_PEER, - CHIP_ERROR_INTERNAL_KEY_ERROR_FROM_PEER, CHIP_ERROR_INVALID_KEY_ID, CHIP_ERROR_INVALID_TIME, - CHIP_ERROR_LOCKING_FAILURE, - CHIP_ERROR_UNSUPPORTED_PASSCODE_CONFIG, - CHIP_ERROR_PASSCODE_AUTHENTICATION_FAILED, - CHIP_ERROR_PASSCODE_FINGERPRINT_FAILED, - CHIP_ERROR_SERIALIZATION_ELEMENT_NULL, - CHIP_ERROR_WRONG_CERT_SIGNATURE_ALGORITHM, - CHIP_ERROR_WRONG_CHIP_SIGNATURE_ALGORITHM, CHIP_ERROR_SCHEMA_MISMATCH, CHIP_ERROR_INVALID_INTEGER_VALUE, - CHIP_ERROR_CASE_RECONFIG_REQUIRED, - CHIP_ERROR_TOO_MANY_CASE_RECONFIGURATIONS, CHIP_ERROR_BAD_REQUEST, - CHIP_ERROR_INVALID_MESSAGE_FLAG, - CHIP_ERROR_KEY_EXPORT_RECONFIGURE_REQUIRED, - CHIP_ERROR_INVALID_KEY_EXPORT_CONFIGURATION, - CHIP_ERROR_NO_COMMON_KEY_EXPORT_CONFIGURATIONS, - CHIP_ERROR_NO_KEY_EXPORT_DELEGATE, - CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_REQUEST, - CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_RESPONSE, - CHIP_ERROR_EXPORTED_KEY_AUTHENTICATION_FAILED, - CHIP_ERROR_TOO_MANY_SHARED_SESSION_END_NODES, - CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_DATA_IB, CHIP_ERROR_WRONG_CERT_TYPE, - CHIP_ERROR_DEFAULT_EVENT_HANDLER_NOT_CALLED, CHIP_ERROR_PERSISTED_STORAGE_FAILED, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND, CHIP_ERROR_IM_FABRIC_DELETED, - CHIP_ERROR_PROFILE_STRING_CONTEXT_NOT_REGISTERED, - CHIP_ERROR_INCOMPATIBLE_SCHEMA_VERSION, CHIP_ERROR_ACCESS_DENIED, CHIP_ERROR_UNKNOWN_RESOURCE_ID, CHIP_ERROR_VERSION_MISMATCH, - CHIP_ERROR_UNSUPPORTED_THREAD_NETWORK_CREATE, - CHIP_ERROR_INCONSISTENT_CONDITIONALITY, - CHIP_ERROR_LOCAL_DATA_INCONSISTENT, CHIP_EVENT_ID_FOUND, CHIP_ERROR_INTERNAL, CHIP_ERROR_OPEN_FAILED, CHIP_ERROR_READ_FAILED, CHIP_ERROR_WRITE_FAILED, CHIP_ERROR_DECODE_FAILED, - CHIP_ERROR_SESSION_KEY_SUSPENDED, - CHIP_ERROR_UNSUPPORTED_WIRELESS_REGULATORY_DOMAIN, - CHIP_ERROR_UNSUPPORTED_WIRELESS_OPERATING_LOCATION, CHIP_ERROR_MDNS_COLLISION, CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB, CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB, - CHIP_ERROR_IM_MALFORMED_COMMAND_PATH_IB, - CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_STATUS_IB, CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_IB, CHIP_ERROR_IM_MALFORMED_EVENT_DATA_IB, - CHIP_ERROR_IM_MALFORMED_STATUS_IB, CHIP_ERROR_PEER_NODE_NOT_FOUND, CHIP_ERROR_HSM, CHIP_ERROR_IM_STATUS_CODE_RECEIVED, - CHIP_ERROR_IM_MALFORMED_COMMAND_STATUS_IB, - CHIP_ERROR_IM_MALFORMED_INVOKE_RESPONSE_IB, - CHIP_ERROR_IM_MALFORMED_INVOKE_REQUEST_MESSAGE, - CHIP_ERROR_IM_MALFORMED_INVOKE_RESPONSE_MESSAGE, - CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_MESSAGE, - CHIP_ERROR_IM_MALFORMED_WRITE_REQUEST_MESSAGE, - CHIP_ERROR_IM_MALFORMED_EVENT_FILTER_IB, - CHIP_ERROR_IM_MALFORMED_READ_REQUEST_MESSAGE, - CHIP_ERROR_IM_MALFORMED_SUBSCRIBE_REQUEST_MESSAGE, - CHIP_ERROR_IM_MALFORMED_SUBSCRIBE_RESPONSE_MESSAGE, - CHIP_ERROR_IM_MALFORMED_EVENT_REPORT_IB, - CHIP_ERROR_IM_MALFORMED_CLUSTER_PATH_IB, CHIP_ERROR_IM_MALFORMED_DATA_VERSION_FILTER_IB, CHIP_ERROR_NOT_FOUND, - CHIP_ERROR_IM_MALFORMED_TIMED_REQUEST_MESSAGE, CHIP_ERROR_INVALID_FILE_IDENTIFIER, CHIP_ERROR_BUSY, CHIP_ERROR_MAX_RETRY_EXCEEDED, CHIP_ERROR_PROVIDER_LIST_EXHAUSTED, - CHIP_ERROR_ANOTHER_COMMISSIONING_IN_PROGRESS, CHIP_ERROR_INVALID_SCHEME_PREFIX, CHIP_ERROR_MISSING_URI_SEPARATOR, - CHIP_ERROR_IM_MALFORMED_STATUS_RESPONSE_MESSAGE, - CHIP_ERROR_IM_MALFORMED_TIMED_REQUEST_MESSAGE, CHIP_ERROR_INVALID_FILE_IDENTIFIER, CHIP_ERROR_BUSY, - CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_IB, - CHIP_ERROR_IM_MALFORMED_EVENT_STATUS_IB, CHIP_ERROR_HANDLER_NOT_SET, }; // clang-format on diff --git a/src/messaging/ExchangeContext.h b/src/messaging/ExchangeContext.h index 6d6c9e58acf148..e30cf0593b3ed9 100644 --- a/src/messaging/ExchangeContext.h +++ b/src/messaging/ExchangeContext.h @@ -104,8 +104,6 @@ class DLL_EXPORT ExchangeContext : public ReliableMessageContext, * @param[in] sendFlags Flags set by the application for the CHIP message being sent. * * @retval #CHIP_ERROR_INVALID_ARGUMENT if an invalid argument was passed to this SendMessage API. - * @retval #CHIP_ERROR_WRONG_MSG_VERSION_FOR_EXCHANGE if there is a mismatch in the specific send operation and the - * CHIP message protocol version that is supported. * @retval #CHIP_ERROR_NOT_CONNECTED if the context was associated with a connection that is now * closed. * @retval #CHIP_ERROR_INCORRECT_STATE if the state of the exchange context is incorrect. From 5a1b37123dd58371c3a078bee8a0440f2c064e83 Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Thu, 30 Mar 2023 08:21:01 -0400 Subject: [PATCH 028/158] silabs_uart_hotfix (#25890) --- examples/platform/silabs/efr32/uart.cpp | 97 ++++++++++++------- .../silabs/efr32/ThreadStackManagerImpl.cpp | 2 +- 2 files changed, 61 insertions(+), 38 deletions(-) diff --git a/examples/platform/silabs/efr32/uart.cpp b/examples/platform/silabs/efr32/uart.cpp index 34a3a25ff52269..c9c81f74b40c0d 100644 --- a/examples/platform/silabs/efr32/uart.cpp +++ b/examples/platform/silabs/efr32/uart.cpp @@ -116,9 +116,9 @@ static uint16_t lastCount; // Nb of bytes already processed from the active dmaB #define UART_TX_MAX_BUF_LEN (258) #endif -TaskHandle_t sUartTaskHandle; -StackType_t uartStack[UART_TASK_SIZE * sizeof(StackType_t)]; -StaticTask_t uartTaskStruct; +static TaskHandle_t sUartTaskHandle; +static StackType_t uartStack[UART_TASK_SIZE * sizeof(StackType_t)]; +static StaticTask_t uartTaskStruct; typedef struct { @@ -127,19 +127,19 @@ typedef struct } UartTxStruct_t; uint8_t sUartTxQueueBuffer[UART_MAX_QUEUE_SIZE * sizeof(UartTxStruct_t)]; -StaticQueue_t sUartTxQueueStruct; -QueueHandle_t sUartTxQueue; +static StaticQueue_t sUartTxQueueStruct; +static QueueHandle_t sUartTxQueue; -EventGroupHandle_t sUartEventGroup; -StaticEventGroup_t sUartEventGroupStruct; +static EventGroupHandle_t sUartEventGroup; +static StaticEventGroup_t sUartEventGroupStruct; // Rx buffer for the receive Fifo static uint8_t sRxFifoBuffer[MAX_BUFFER_SIZE]; static Fifo_t sReceiveFifo; static void UART_rx_callback(UARTDRV_Handle_t handle, Ecode_t transferStatus, uint8_t * data, UARTDRV_Count_t transferCount); -static void UART_tx_callback(struct UARTDRV_HandleData * handle, Ecode_t transferStatus, uint8_t * data, - UARTDRV_Count_t transferCount); +// static void UART_tx_callback(struct UARTDRV_HandleData * handle, Ecode_t transferStatus, uint8_t * data, +// UARTDRV_Count_t transferCount); static void uartSendBytes(uint8_t * buffer, uint16_t nbOfBytes); static bool InitFifo(Fifo_t * fifo, uint8_t * pDataBuffer, uint16_t bufferSize) @@ -252,6 +252,12 @@ static uint16_t RetrieveFromFifo(Fifo_t * fifo, uint8_t * pData, uint16_t SizeTo */ void uartConsoleInit(void) { + if (sUartTaskHandle != NULL) + { + // Init was already done + return; + } + sl_board_enable_vcom(); // Init a fifo for the data received on the uart InitFifo(&sReceiveFifo, sRxFifoBuffer, MAX_BUFFER_SIZE); @@ -260,6 +266,19 @@ void uartConsoleInit(void) UARTDRV_Receive(vcom_handle, sRxDmaBuffer, MAX_DMA_BUFFER_SIZE, UART_rx_callback); UARTDRV_Receive(vcom_handle, sRxDmaBuffer2, MAX_DMA_BUFFER_SIZE, UART_rx_callback); + uint32_t struct_size = sizeof(UartTxStruct_t); + + sUartTxQueue = xQueueCreateStatic(UART_MAX_QUEUE_SIZE, struct_size, sUartTxQueueBuffer, &sUartTxQueueStruct); + + sUartEventGroup = xEventGroupCreateStatic(&sUartEventGroupStruct); + + // Start App task. + sUartTaskHandle = xTaskCreateStatic(uartMainLoop, UART_TASK_NAME, UART_TASK_SIZE, nullptr, 30, uartStack, &uartTaskStruct); + + assert(sUartTaskHandle); + assert(sUartEventGroup); + assert(sUartTxQueue); + // Enable USART0/EUSART0 interrupt to wake OT task when data arrives NVIC_ClearPendingIRQ(USART_IRQ); NVIC_EnableIRQ(USART_IRQ); @@ -276,28 +295,12 @@ void uartConsoleInit(void) #else USART_IntEnable(SL_UARTDRV_USART_VCOM_PERIPHERAL, USART_IF_RXDATAV); #endif // EFR32MG24 - - uint32_t struct_size = sizeof(UartTxStruct_t); - - sUartTxQueue = xQueueCreateStatic(UART_MAX_QUEUE_SIZE, struct_size, sUartTxQueueBuffer, &sUartTxQueueStruct); - - sUartEventGroup = xEventGroupCreateStatic(&sUartEventGroupStruct); - - // Start App task. - sUartTaskHandle = xTaskCreateStatic(uartMainLoop, UART_TASK_NAME, UART_TASK_SIZE, nullptr, 30, uartStack, &uartTaskStruct); - - assert(sUartTaskHandle); - assert(sUartEventGroup); - assert(sUartTxQueue); } void USART_IRQHandler(void) { #ifdef ENABLE_CHIP_SHELL chip::NotifyShellProcessFromISR(); -#endif -#if defined(SL_WIFI) - /* TODO */ #elif !defined(PW_RPC_ENABLED) otSysEventSignalPending(); #endif @@ -318,7 +321,7 @@ void USART_IRQHandler(void) void UART_tx_callback(struct UARTDRV_HandleData * handle, Ecode_t transferStatus, uint8_t * data, UARTDRV_Count_t transferCount) { BaseType_t xHigherPriorityTaskWoken; - /* Was the message posted successfully? */ + if (xEventGroupSetBitsFromISR(sUartEventGroup, UART_TX_COMPLETE_BIT, &xHigherPriorityTaskWoken) == pdPASS) { portYIELD_FROM_ISR(xHigherPriorityTaskWoken); @@ -343,9 +346,6 @@ static void UART_rx_callback(UARTDRV_Handle_t handle, Ecode_t transferStatus, ui #ifdef ENABLE_CHIP_SHELL chip::NotifyShellProcessFromISR(); -#endif -#if defined(SL_WIFI) - /* TODO */ #elif !defined(PW_RPC_ENABLED) otSysEventSignalPending(); #endif @@ -364,16 +364,25 @@ int16_t uartConsoleWrite(const char * Buf, uint16_t BufLength) { return UART_CONSOLE_ERR; } - // Do NOT wait for logs. Better to lost some logging than block - // an unknow task that might be critical. + UartTxStruct_t workBuffer; memcpy(workBuffer.data, Buf, BufLength); workBuffer.length = BufLength; - if (pdTRUE == xQueueSend(sUartTxQueue, &workBuffer, 0)) + if (xPortIsInsideInterrupt()) { + BaseType_t xHigherPriorityTaskWoken; + xQueueSendFromISR(sUartTxQueue, &workBuffer, &xHigherPriorityTaskWoken); + portYIELD_FROM_ISR(xHigherPriorityTaskWoken); return BufLength; } + else + { + if (pdTRUE == xQueueSend(sUartTxQueue, &workBuffer, portMAX_DELAY)) + { + return BufLength; + } + } return UART_CONSOLE_ERR; } @@ -397,10 +406,20 @@ int16_t uartLogWrite(const char * log, uint16_t length) memcpy(workBuffer.data + length, "\r\n", 2); workBuffer.length = length + 2; - if (pdTRUE == xQueueSend(sUartTxQueue, &workBuffer, 0)) + if (xPortIsInsideInterrupt()) { + BaseType_t xHigherPriorityTaskWoken; + xQueueSendFromISR(sUartTxQueue, &workBuffer, &xHigherPriorityTaskWoken); + portYIELD_FROM_ISR(xHigherPriorityTaskWoken); return length; } + else + { + if (pdTRUE == xQueueSend(sUartTxQueue, &workBuffer, 0)) + { + return length; + } + } return UART_CONSOLE_ERR; } @@ -439,9 +458,12 @@ void uartMainLoop(void * args) while (1) { - while (pdTRUE == xQueueReceive(sUartTxQueue, &workBuffer, portMAX_DELAY)) + + BaseType_t eventReceived = xQueueReceive(sUartTxQueue, &workBuffer, portMAX_DELAY); + while (eventReceived == pdTRUE) { uartSendBytes(workBuffer.data, workBuffer.length); + eventReceived = xQueueReceive(sUartTxQueue, &workBuffer, 0); } } } @@ -454,6 +476,7 @@ void uartMainLoop(void * args) */ void uartSendBytes(uint8_t * buffer, uint16_t nbOfBytes) { + #if defined(SL_CATALOG_POWER_MANAGER_PRESENT) sl_power_manager_add_em_requirement(SL_POWER_MANAGER_EM1); #endif @@ -462,7 +485,9 @@ void uartSendBytes(uint8_t * buffer, uint16_t nbOfBytes) pre_uart_transfer(); #endif /* EFR32MG24 && WF200_WIFI */ - UARTDRV_Transmit(vcom_handle, (uint8_t *) buffer, nbOfBytes, UART_tx_callback); + // TODO FIXME Swap to iostream driver since UARTDRV is deprecated. + // TODO Do no use blocking transmit (hotfix). + UARTDRV_TransmitB(vcom_handle, (uint8_t *) buffer, nbOfBytes); #if (defined(EFR32MG24) && defined(WF200_WIFI)) post_uart_transfer(); @@ -471,8 +496,6 @@ void uartSendBytes(uint8_t * buffer, uint16_t nbOfBytes) #if defined(SL_CATALOG_POWER_MANAGER_PRESENT) sl_power_manager_remove_em_requirement(SL_POWER_MANAGER_EM1); #endif - - xEventGroupWaitBits(sUartEventGroup, UART_TX_COMPLETE_BIT, pdTRUE, pdFALSE, portMAX_DELAY); } #ifdef __cplusplus diff --git a/src/platform/silabs/efr32/ThreadStackManagerImpl.cpp b/src/platform/silabs/efr32/ThreadStackManagerImpl.cpp index 1de363c0a56e07..aa4add21323c52 100644 --- a/src/platform/silabs/efr32/ThreadStackManagerImpl.cpp +++ b/src/platform/silabs/efr32/ThreadStackManagerImpl.cpp @@ -153,7 +153,7 @@ extern "C" void efr32UartProcess(void) #if !defined(PW_RPC_ENABLED) && !defined(ENABLE_CHIP_SHELL) uint8_t tempBuf[128] = { 0 }; // will read the data available up to 128bytes - uint16_t count = uartConsoleRead((char *) tempBuf, 128); + int16_t count = uartConsoleRead((char *) tempBuf, 128); if (count > 0) { // ot process Received data for CLI cmds From 3a80f8a29c6c1c2fcf05a3446fc7face78cacf95 Mon Sep 17 00:00:00 2001 From: cpagravel Date: Thu, 30 Mar 2023 05:49:08 -0700 Subject: [PATCH 029/158] Chef - Don't use metadata for hash generation in naming convention (#25885) --- examples/chef/BUILD.gn | 2 +- examples/chef/chef.py | 2 +- examples/chef/dockerfile | 2 +- examples/chef/sample_app_util/README.md | 29 +++++----- .../chef/sample_app_util/sample_app_util.py | 12 ++--- ...ashmeta.yaml => sample_zap_file_meta.yaml} | 0 .../sample_app_util/test_zap_file_parser.py | 27 ++++++---- .../chef/sample_app_util/zap_file_parser.py | 54 ++++--------------- examples/chef/setup.cfg | 2 +- 9 files changed, 48 insertions(+), 82 deletions(-) rename examples/chef/sample_app_util/test_files/{sample_zap_file_hashmeta.yaml => sample_zap_file_meta.yaml} (100%) diff --git a/examples/chef/BUILD.gn b/examples/chef/BUILD.gn index 4fb787d5909df1..f5d7b256aa92bc 100644 --- a/examples/chef/BUILD.gn +++ b/examples/chef/BUILD.gn @@ -27,7 +27,7 @@ pw_python_package("chef") { inputs = [ "sample_app_util/test_files/sample_zap_file.zap", - "sample_app_util/test_files/sample_zap_file_hashmeta.yaml", + "sample_app_util/test_files/sample_zap_file_meta.yaml", ] sources = [ diff --git a/examples/chef/chef.py b/examples/chef/chef.py index bc4c820974ed83..e69d3418fa021d 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -161,7 +161,7 @@ def bundle(platform: str, device_name: str) -> None: dest_item = os.path.join(_CD_STAGING_DIR, matter_file) shutil.copy(src_item, dest_item) flush_print(f"Generating metadata for {device_name}") - metadata_file = zap_file_parser.generate_hash_metadata_file(zap_file) + metadata_file = zap_file_parser.generate_metadata_file(zap_file) metadata_dest = os.path.join(_CD_STAGING_DIR, os.path.basename(metadata_file)) shutil.copy(metadata_file, metadata_dest) diff --git a/examples/chef/dockerfile b/examples/chef/dockerfile index f69d79be19ba20..fb61266da5dd89 100644 --- a/examples/chef/dockerfile +++ b/examples/chef/dockerfile @@ -11,7 +11,7 @@ RUN apt-get update && \ COPY out/${DEVICE_NAME} /chef_device COPY out/${DEVICE_NAME}.map /chef_device.map COPY out/${DEVICE_NAME}.matter /chef_device.matter -COPY out/${DEVICE_NAME}_hashmeta.yaml /chef_device_hashmeta.yaml +COPY out/${DEVICE_NAME}_meta.yaml /chef_device_meta.yaml ENV DBUS_SYSTEM_BUS_ADDRESS="unix:path=/var/run/dbus/system_bus_socket" diff --git a/examples/chef/sample_app_util/README.md b/examples/chef/sample_app_util/README.md index 9ed7be36a6bd11..9e10419ff39cc0 100644 --- a/examples/chef/sample_app_util/README.md +++ b/examples/chef/sample_app_util/README.md @@ -33,7 +33,10 @@ should rarely happen. Sample apps should be named by concatenating the name of all endpoints in the order of their index. Endpoint names are separated by underscores (`_`) and a 10 -character hash[^hash_note] of the sample app metadata is appended to the end. +character hash[^hash_note] which is randomly generated. + +The naming convention tool should be used for every newly created app. The name +should only need to be updated if the endpoints of the app are changed. Valid sample app names conform to the following format: @@ -62,16 +65,12 @@ bridgednode_temperaturesensor_onofflight_onoffpluginunit_MI9DSdkH8H [^hash_note]: - The 10 character hash is a base64 encoding of the md5 hash generated by - digesting the JSON string encoding of the metadata information. The code for - generating the hash can be found in `generate_hash` in - [zap_file_parser](zap_file_parser.py) There are some notable details - here: 1) The full base64 encoded hash is 16 characters, but only 10 are - used. This still gives us a sufficiently low probability of collision (~1.2 - x 10^-8). 2) `_` and `-` are replaced in the base64 encoding because they - have other uses in the naming. 3) Platform specific information is omitted - from the hash. E.g. the networking_commissioning cluster is excluded. This - is to make the hashes platform agnostic. + The 10 character hash used to be generated by consuming the JSON encoded + metadata. This is no longer the case. It was found that the hash encoding + only served to differentiate one app from another (the initial goal) and + there was little value in tying the generated hash to the config data + because there wasn't a use case for decoding it as long as the config file + was packaged with the generated app. ### Sample App Build Naming Convention @@ -139,12 +138,8 @@ The metadata files have a structure as follows: ``` For an example, see -[sample_zap_file_hashmeta.yaml](test_files/sample_zap_file_hashmeta.yaml) which -was generated from [sample_zap_file.zap](test_files/sample_zap_file.zap). - -Note that it is more readable in `yaml` format. Since hashes are generated from -the metadata info, additional conventions are needed to ensure consistency for -the metadata structure. +[sample_zap_file_meta.yaml](test_files/sample_zap_file_meta.yaml) which was +generated from [sample_zap_file.zap](test_files/sample_zap_file.zap). The following conventions are used: diff --git a/examples/chef/sample_app_util/sample_app_util.py b/examples/chef/sample_app_util/sample_app_util.py index 8c856f29814324..f2752fa28f1812 100755 --- a/examples/chef/sample_app_util/sample_app_util.py +++ b/examples/chef/sample_app_util/sample_app_util.py @@ -32,8 +32,8 @@ def zap_cmd_handler(args: argparse.Namespace) -> None: output_path = os.path.join(dirpath, f"{name}.zap") shutil.move(zap_file_path, output_path) print(f"Renamed from: {zap_file_path} to {output_path}") - elif args.generate_hash_metadata: - created_file = zap_file_parser.generate_hash_metadata_file(zap_file_path) + elif args.generate_metadata: + created_file = zap_file_parser.generate_metadata_file(zap_file_path) print(f"Created {created_file}") @@ -41,7 +41,8 @@ def zap_cmd_handler(args: argparse.Namespace) -> None: subparsers = parser.add_subparsers(dest="command") subparsers.required = True -zap_cmd_parser = subparsers.add_parser("zap", help="Command to operate on zap files.") +zap_cmd_parser = subparsers.add_parser( + "zap", help="Command to operate on zap files.") zap_cmd_parser.add_argument( "zap_file", metavar="ZAP_FILE", type=str, help="Zap file to generate name for.") @@ -53,10 +54,9 @@ def zap_cmd_handler(args: argparse.Namespace) -> None: ) zap_cmd_parser.add_argument( - "--generate-hash-metadata", action="store_true", + "--generate-metadata", action="store_true", help=( - "Generate the hash metadata file which provide information about what was included in " - "the hash digest.") + "Generate the metadata file which provides summary information about the app.") ) zap_cmd_group.add_argument( diff --git a/examples/chef/sample_app_util/test_files/sample_zap_file_hashmeta.yaml b/examples/chef/sample_app_util/test_files/sample_zap_file_meta.yaml similarity index 100% rename from examples/chef/sample_app_util/test_files/sample_zap_file_hashmeta.yaml rename to examples/chef/sample_app_util/test_files/sample_zap_file_meta.yaml diff --git a/examples/chef/sample_app_util/test_zap_file_parser.py b/examples/chef/sample_app_util/test_zap_file_parser.py index 5ef9fbdb8d721c..e929adb637be62 100644 --- a/examples/chef/sample_app_util/test_zap_file_parser.py +++ b/examples/chef/sample_app_util/test_zap_file_parser.py @@ -8,6 +8,8 @@ import shutil import tempfile import unittest +import uuid +from unittest import mock import zap_file_parser @@ -20,7 +22,7 @@ _HERE = os.path.abspath(os.path.dirname(__file__)) _TEST_FILE = os.path.join(_HERE, "test_files", "sample_zap_file.zap") -_TEST_METADATA = os.path.join(_HERE, "test_files", "sample_zap_file_hashmeta.yaml") +_TEST_METADATA = os.path.join(_HERE, "test_files", "sample_zap_file_meta.yaml") class TestZapFileParser(unittest.TestCase): @@ -28,12 +30,14 @@ class TestZapFileParser(unittest.TestCase): def test_generate_hash(self): """Tests generate_hash function.""" - hash_string = zap_file_parser.generate_hash(_TEST_FILE) - self.assertEqual(hash_string, "Xir1gEfjij", "Hash is incorrectly generated.") + with mock.patch.object(uuid, "uuid4", return_value="Xir1gEfjij"): + hash_string = zap_file_parser.generate_hash() + self.assertEqual(hash_string, "Xir1gEfjij", + "Hash is incorrectly generated.") def test_generate_metadata(self): """Tests generate_metadata.""" - generated_metadata = zap_file_parser.generate_hash_metadata(_TEST_FILE) + generated_metadata = zap_file_parser.generate_metadata(_TEST_FILE) with open(_TEST_METADATA) as f: expected_metadata = yaml.load(f.read(), Loader=yaml.FullLoader) self.assertEqual( @@ -43,11 +47,12 @@ def test_generate_metadata_file(self): """Tests generate_metadata_file.""" with tempfile.TemporaryDirectory(dir=os.path.dirname(_HERE)) as dir: zap_file = os.path.join(dir, "test_file.zap") - hashmeta_file = os.path.join(dir, "test_file_hashmeta.yaml") + meta_file = os.path.join(dir, "test_file_meta.yaml") shutil.copy(_TEST_FILE, zap_file) - zap_file_parser.generate_hash_metadata_file(zap_file) - with open(hashmeta_file) as f: - generated_metadata = yaml.load(f.read(), Loader=yaml.FullLoader) + zap_file_parser.generate_metadata_file(zap_file) + with open(meta_file) as f: + generated_metadata = yaml.load( + f.read(), Loader=yaml.FullLoader) with open(_TEST_METADATA) as f: expected_metadata = yaml.load(f.read(), Loader=yaml.FullLoader) self.assertEqual( @@ -55,8 +60,10 @@ def test_generate_metadata_file(self): def test_generate_name(self): """Tests generate_name.""" - name = zap_file_parser.generate_name(_TEST_FILE) - self.assertEqual(name, "rootnode_dimmablelight_Xir1gEfjij", "Name incorrectly generated.") + with mock.patch.object(uuid, "uuid4", return_value="Xir1gEfjij"): + name = zap_file_parser.generate_name(_TEST_FILE) + self.assertEqual( + name, "rootnode_dimmablelight_Xir1gEfjij", "Name incorrectly generated.") if __name__ == "__main__": diff --git a/examples/chef/sample_app_util/zap_file_parser.py b/examples/chef/sample_app_util/zap_file_parser.py index 6f186e86e27155..4c6abae775aac0 100644 --- a/examples/chef/sample_app_util/zap_file_parser.py +++ b/examples/chef/sample_app_util/zap_file_parser.py @@ -29,12 +29,11 @@ available. - Add support for .matter files. """ -import base64 import copy -import hashlib import json import os import re +import uuid from typing import Dict, List, Optional, Sequence, TypedDict, Union try: @@ -64,19 +63,6 @@ class EndpointType(TypedDict): server_clusters: Dict[str, ClusterType] -def _b64encode(input_data: bytes) -> bytes: - """Returns urlsafe base64 encoded with padding removed.""" - return base64.urlsafe_b64encode(input_data).strip(b"=") - - -def _b64decode(input_data: bytes) -> bytes: - """Returns urlsafe base64 decoded with padding added.""" - # "=" is padding character that doesn't carry info. - # Adding 2x "=" will handle all edge cases where there may be - # incorrect number of bytes. - return base64.urlsafe_b64decode(input_data + b"==") - - def _convert_metadata_name(name: str, code: Union[int, str]) -> str: """Converts a name for use in a metadata file - CamelCaseName/ID.""" # Preserve camel case if it's already there @@ -181,35 +167,13 @@ def _get_id(name): return name.split("/")[-1] -def generate_hash(zap_file_path: str) -> str: +def generate_hash() -> str: """Generates a hash for a zap file. - Args: - zap_file_path: Path to the zap file. - Returns: - MD5 hash of the metadata generated from the zap file. - This is converted to base64 and then the first 10 characters are used. + A 10 character alphanumeric hash. """ - parsed = generate_hash_metadata(zap_file_path) - # Use json.dumps to produce a consistent output for the object passed into it. - digestible_content = _convert_metadata_to_hashable_digest(parsed) - md5_hash = hashlib.md5(digestible_content.encode("utf-8")).digest() - output = str(_b64encode(md5_hash), encoding="utf-8")[:10] - # Replace "-" and "_" with "a" and "b". - # The reason for doing this is to allow the generated name to be parsed by splitting on "_". - # Replacing "-" makes the name easier to parse visually. - # This increases likelihood of hash collisions, but minimally so. See module docstring. - return output.replace("-", "a").replace("_", "b") - - -def generate_hash_metadata(zap_file_path: str) -> List[Dict[str, EndpointType]]: - """Generates metadata for hash digest consumption.""" - return generate_metadata( - zap_file_path=zap_file_path, - attribute_allow_list=_ATTRIBUTE_ALLOW_LIST, - include_commands=False, - include_platform_specific_info=False) + return str(uuid.uuid4())[-10:] def generate_metadata( @@ -320,21 +284,21 @@ def generate_metadata( return return_obj -def generate_hash_metadata_file(zap_file_path: str) -> str: - """Generates hash metadata file for a zap file input. +def generate_metadata_file(zap_file_path: str) -> str: + """Generates metadata file for a zap file. The purpose of this file is to inform the user what data was included in the hash digest. Args: zap_file_path: Path to the zap file to parse for generating the metadata file. """ - parsed = generate_hash_metadata(zap_file_path) + parsed = generate_metadata(zap_file_path) output = yaml.dump(parsed, indent=4, sort_keys=True) dirname, filename = os.path.split(zap_file_path) filename = os.path.splitext(filename)[0] - output_file_path = os.path.join(dirname, f"{filename}_hashmeta.yaml") + output_file_path = os.path.join(dirname, f"{filename}_meta.yaml") with open(output_file_path, "w") as f: f.write(output) return output_file_path @@ -354,5 +318,5 @@ def generate_name(zap_file_path: str) -> str: for endpoint in parsed: name = next(iter(endpoint)) names.append(_convert_filename(name)) - hash_string = generate_hash(zap_file_path) + hash_string = generate_hash() return "_".join(names) + f"_{hash_string}" diff --git a/examples/chef/setup.cfg b/examples/chef/setup.cfg index cc1e5b19f4a732..20232653fbbbf2 100644 --- a/examples/chef/setup.cfg +++ b/examples/chef/setup.cfg @@ -24,7 +24,7 @@ zip_safe = False [options.package_data] sample_app_util = test_files/sample_zap_file.zap - test_files/sample_zap_file_hashmeta.yaml + test_files/sample_zap_file_meta.yaml [options.entry_points] console_scripts = chef = chef:main \ No newline at end of file From d43179144fa266de249ea753a4cc3d734af658b4 Mon Sep 17 00:00:00 2001 From: Grzegorz Ferenc <41291385+greg-fer@users.noreply.github.com> Date: Thu, 30 Mar 2023 14:50:12 +0200 Subject: [PATCH 030/158] Fix doc build issue in ERROR_CODES.md (#25894) * edit_table.py: fix issue breaking SDK doc build Removed period from the ASN.1 entry as it is breaking markdown formatting and the whole SDK doc build. Checked against headers in src\lib\asn1, which allow ASN1 without the period. Signed-off-by: Grzegorz Ferenc * error_table.py: remove lines creating Myst issue Removed lines that caused the docbuild to fail with "src/ERROR_CODES.md:259: WARNING: Duplicate reference definition: // [myst.duplicate_def]" issue. These lines excluded ERROR_CODES.md from spellchecking, but this exclusion is already ensured by line 68 in .spellcheck.yml. Signed-off-by: Grzegorz Ferenc * Restyled by autopep8 * doc: Fix dependancy version Fix version of dependancy pydata-sphinx-theme to 0.13.1 since v0.13.2 introduced breaking changes. Signed-off-by: Gaute Svanes Lunde --------- Signed-off-by: Grzegorz Ferenc Signed-off-by: Gaute Svanes Lunde Co-authored-by: Restyled.io Co-authored-by: Gaute Svanes Lunde --- docs/ERROR_CODES.md | 8 ++------ docs/requirements.txt | 1 + scripts/error_table.py | 7 +------ 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/docs/ERROR_CODES.md b/docs/ERROR_CODES.md index 17f4ff6ba83a5a..694208e93b82ce 100644 --- a/docs/ERROR_CODES.md +++ b/docs/ERROR_CODES.md @@ -1,5 +1,3 @@ -[//]: # "start_ignore_spellcheck" - # Matter SDK `CHIP_ERROR` enums values This file was **AUTOMATICALLY** generated by @@ -10,7 +8,7 @@ This file was **AUTOMATICALLY** generated by - [SDK Core errors: range `0x000..0x0FF`](#sdk-core-errors) - [SDK Inet Layer errors: range `0x100..0x1FF`](#sdk-inet-layer-errors) - [SDK Device Layer errors: range `0x200..0x2FF`](#sdk-device-layer-errors) -- [ASN.1 Layer errors: range `0x300..0x3FF`](#asn-1-layer-errors) +- [ASN1 Layer errors: range `0x300..0x3FF`](#asn1-layer-errors) - [BLE Layer errors: range `0x400..0x4FF`](#ble-layer-errors) - [IM Global errors errors: range `0x500..0x5FF`](#im-global-errors-errors) @@ -179,7 +177,7 @@ This file was **AUTOMATICALLY** generated by | 515 | 0x203 | `CHIP_DEVICE_ERROR_SOFTWARE_UPDATE_ABORTED` | | 516 | 0x204 | `CHIP_DEVICE_ERROR_SOFTWARE_UPDATE_IGNORED` | -## ASN.1 Layer errors +## ASN1 Layer errors | Decimal | Hex | Name | | ------- | ----- | --------------------------------- | @@ -255,5 +253,3 @@ This file was **AUTOMATICALLY** generated by | 1481 | 0x5C9 | `TIMED_REQUEST_MISMATCH` | | 1482 | 0x5CA | `FAILSAFE_REQUIRED` | | 1520 | 0x5F0 | `WRITE_IGNORED` | - -[//]: # "end_ignore_spellcheck" diff --git a/docs/requirements.txt b/docs/requirements.txt index 988f0b3f668058..8ec13856113df5 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -3,3 +3,4 @@ Sphinx>=4.5 sphinx-book-theme myst-parser breathe>=4.34 +pydata-sphinx-theme==0.13.1 diff --git a/scripts/error_table.py b/scripts/error_table.py index c8e5c1040affe9..4f5dc13a22939d 100644 --- a/scripts/error_table.py +++ b/scripts/error_table.py @@ -134,14 +134,11 @@ def main(): "src/lib/core/CHIPError.h": ErrorDescriptor(section="SDK Core", code_range=0x000, macro_regex=r"^#define\s+(?P[_A-Z0-9]+)\s+CHIP(_CORE)?_ERROR[(](?P(0x[a-fA-F0-9]+)|\d+)[)]"), "src/inet/InetError.h": ErrorDescriptor(section="SDK Inet Layer", code_range=0x100, macro_regex=r"^#define\s+(?P[_A-Z0-9]+)\s+CHIP_INET_ERROR[(](?P(0x[a-fA-F0-9]+)|\d+)[)]"), "src/include/platform/CHIPDeviceError.h": ErrorDescriptor(section="SDK Device Layer", code_range=0x200, macro_regex=r"^#define\s+(?P[_A-Z0-9]+)\s+CHIP_DEVICE_ERROR[(](?P(0x[a-fA-F0-9]+)|\d+)[)]"), - "src/lib/asn1/ASN1Error.h": ErrorDescriptor(section="ASN.1 Layer", code_range=0x300, macro_regex=r"^#define\s+(?P[_A-Z0-9]+)\s+CHIP_ASN1_ERROR[(](?P(0x[a-fA-F0-9]+)|\d+)[)]"), + "src/lib/asn1/ASN1Error.h": ErrorDescriptor(section="ASN1 Layer", code_range=0x300, macro_regex=r"^#define\s+(?P[_A-Z0-9]+)\s+CHIP_ASN1_ERROR[(](?P(0x[a-fA-F0-9]+)|\d+)[)]"), "src/ble/BleError.h": ErrorDescriptor(section="BLE Layer", code_range=0x400, macro_regex=r"^#define\s+(?P[_A-Z0-9]+)\s+CHIP_BLE_ERROR[(](?P(0x[a-fA-F0-9]+)|\d+)[)]"), "src/protocols/interaction_model/StatusCodeList.h": ErrorDescriptor(section="IM Global errors", code_range=0x500, macro_regex=r"^CHIP_IM_STATUS_CODE[(][A-Za-z0-9_]+\s*,\s*(?P[A-Z0-9_]+)\s*,\s*(?P(0x[a-fA-F0-9]+)|\d+)[)]"), } - print() - print("[//]: # (start_ignore_spellcheck)") - print() print("# Matter SDK `CHIP_ERROR` enums values") print() print("This file was **AUTOMATICALLY** generated by `python scripts/error_table.py > docs/ERROR_CODES.md`.") @@ -157,8 +154,6 @@ def main(): for filename, descriptor in descriptors.items(): dump_table(Path(filename), descriptor) - print("[//]: # (end_ignore_spellcheck)") - if __name__ == "__main__": main() From 35b1fc15d88110535a80c990bee871c4948187e6 Mon Sep 17 00:00:00 2001 From: Gaute Svanes Lunde Date: Thu, 30 Mar 2023 14:51:22 +0200 Subject: [PATCH 031/158] doc: Fix dependancy version (#25893) Fix version of dependancy pydata-sphinx-theme to 0.13.1 since v0.13.2 introduced breaking changes. Signed-off-by: Gaute Svanes Lunde From ae17dc1d5af8556c7a71ed537da6311270eafadd Mon Sep 17 00:00:00 2001 From: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com> Date: Thu, 30 Mar 2023 09:21:19 -0400 Subject: [PATCH 032/158] Remove unused error code check. This error value can't be returned (#25882) --- src/platform/silabs/SilabsConfig.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/platform/silabs/SilabsConfig.cpp b/src/platform/silabs/SilabsConfig.cpp index c887e6f2d0ac8c..d07b9ced36cfc0 100644 --- a/src/platform/silabs/SilabsConfig.cpp +++ b/src/platform/silabs/SilabsConfig.cpp @@ -435,12 +435,6 @@ CHIP_ERROR SilabsConfig::FactoryResetConfig(void) return err2; }); - // Return success at end of iterations. - if (err == CHIP_END_OF_INPUT) - { - err = CHIP_NO_ERROR; - } - return err; } From f70f8e5d6f0d832e140e5183573bf0644557531e Mon Sep 17 00:00:00 2001 From: chirag-silabs <100861685+chirag-silabs@users.noreply.github.com> Date: Thu, 30 Mar 2023 20:01:19 +0530 Subject: [PATCH 033/158] [Silabs] Updating matter support submodule pointer (#25848) * updating matter support pointer * updating to the latest commit --- third_party/silabs/matter_support | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index 4178eee819f0bf..060f2a7bd92b4a 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit 4178eee819f0bf117a2dd35a6d666cb199a8d882 +Subproject commit 060f2a7bd92b4ac42a90415e59a07d25bf4dab42 From 8d1023e3ce070ff23f6782f4b086bef947b6e74b Mon Sep 17 00:00:00 2001 From: Marc Lepage <67919234+mlepage-google@users.noreply.github.com> Date: Thu, 30 Mar 2023 11:07:04 -0400 Subject: [PATCH 034/158] Clean up the menus on the M5Stack (#25886) * Clean up the menus on the M5Stack No longer need screen to demonstrate custom drawing (QR Code screen does this) or non-functional menu items to demonstrate menu scrolling (other menus are now long enough to scroll). * Restyle --- .../esp32/main/DeviceWithDisplay.cpp | 30 +++---------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp index 0694c091cb3787..cf5a5aa1cb1980 100644 --- a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp @@ -545,18 +545,6 @@ class SetupListModel : public TouchesMatterStackModel private: std::vector options; }; -class CustomScreen : public Screen -{ -public: - virtual void Display() - { - TFT_drawCircle(0.3 * DisplayWidth, 0.3 * DisplayHeight, 8, TFT_BLUE); - TFT_drawCircle(0.7 * DisplayWidth, 0.3 * DisplayHeight, 8, TFT_BLUE); - TFT_drawLine(0.2 * DisplayWidth, 0.6 * DisplayHeight, 0.3 * DisplayWidth, 0.7 * DisplayHeight, TFT_BLUE); - TFT_drawLine(0.3 * DisplayWidth, 0.7 * DisplayHeight, 0.7 * DisplayWidth, 0.7 * DisplayHeight, TFT_BLUE); - TFT_drawLine(0.7 * DisplayWidth, 0.7 * DisplayHeight, 0.8 * DisplayWidth, 0.6 * DisplayHeight, TFT_BLUE); - } -}; void SetupPretendDevices() { @@ -729,20 +717,10 @@ esp_err_t InitM5Stack(std::string qrCodeText) ESP_LOGI(TAG, "Opening Setup list"); ScreenManager::PushScreen(chip::Platform::New(chip::Platform::New())); }) - ->Item("Status", - [=]() { - ESP_LOGI(TAG, "Opening Status screen"); - ScreenManager::PushScreen(chip::Platform::New()); - }) - ->Item("Custom", - []() { - ESP_LOGI(TAG, "Opening custom screen"); - ScreenManager::PushScreen(chip::Platform::New()); - }) - ->Item("More") - ->Item("Items") - ->Item("For") - ->Item("Demo"))); + ->Item("Status", [=]() { + ESP_LOGI(TAG, "Opening Status screen"); + ScreenManager::PushScreen(chip::Platform::New()); + }))); return ESP_OK; } #endif From 21aa4d65295b47326eb03a1036407c46ea2c745a Mon Sep 17 00:00:00 2001 From: wyhong <30567533+wy-hh@users.noreply.github.com> Date: Fri, 31 Mar 2023 00:24:24 +0800 Subject: [PATCH 035/158] [Bouffalolab] Add data model/zap for Wi-Fi and Thread separately in lighting-app (#25839) * update lighting app data model * correct feature value of network commissioning for wifi * fix restyle * update matter files --- .../lighting-app/bouffalolab/bl602/BUILD.gn | 11 +- .../lighting-app/bouffalolab/bl702/BUILD.gn | 11 +- .../lighting-app/bouffalolab/common/AppTask.h | 2 - .../data_model/lighting-app-thread.matter | 2082 ++++ .../data_model/lighting-app-thread.zap | 8345 ++++++++++++++++ .../data_model/lighting-app-wifi.matter | 1943 ++++ .../data_model/lighting-app-wifi.zap | 8378 +++++++++++++++++ 7 files changed, 20768 insertions(+), 4 deletions(-) create mode 100644 examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter create mode 100644 examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap create mode 100644 examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter create mode 100644 examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap diff --git a/examples/lighting-app/bouffalolab/bl602/BUILD.gn b/examples/lighting-app/bouffalolab/bl602/BUILD.gn index ef0424f16ed10d..d5233ec407fa46 100644 --- a/examples/lighting-app/bouffalolab/bl602/BUILD.gn +++ b/examples/lighting-app/bouffalolab/bl602/BUILD.gn @@ -22,6 +22,8 @@ import("${build_root}/config/defaults.gni") import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") import("${chip_root}/src/platform/device.gni") +import("${chip_root}/src/app/chip_data_model.gni") + if (chip_enable_pw_rpc) { import("//build_overrides/pigweed.gni") import("$dir_pw_build/target_types.gni") @@ -78,6 +80,13 @@ bl_iot_sdk("sdk") { } } +chip_data_model("bouffalolab-lighting") { + zap_file = "${example_dir}/../data_model/lighting-app-wifi.zap" + + zap_pregenerated_dir = "${chip_root}/zzz_generated/lighting-app/zap-generated" + is_server = true +} + bouffalolab_executable("lighting_app") { output_name = "chip-bl602-lighting-example.out" @@ -116,9 +125,9 @@ bouffalolab_executable("lighting_app") { ] deps = [ + ":bouffalolab-lighting", ":sdk", "${chip_root}/examples/common/QRCode", - "${chip_root}/examples/lighting-app/lighting-common", "${chip_root}/examples/providers:device_info_provider", "${chip_root}/src/lib", "${chip_root}/src/setup_payload", diff --git a/examples/lighting-app/bouffalolab/bl702/BUILD.gn b/examples/lighting-app/bouffalolab/bl702/BUILD.gn index 75eeba1aaf569d..4e6319dac88dc7 100644 --- a/examples/lighting-app/bouffalolab/bl702/BUILD.gn +++ b/examples/lighting-app/bouffalolab/bl702/BUILD.gn @@ -22,6 +22,8 @@ import("${build_root}/config/defaults.gni") import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") import("${chip_root}/src/platform/device.gni") +import("${chip_root}/src/app/chip_data_model.gni") + if (chip_enable_pw_rpc) { import("//build_overrides/pigweed.gni") import("$dir_pw_build/target_types.gni") @@ -93,6 +95,13 @@ bl_iot_sdk("sdk") { } } +chip_data_model("bouffalolab-lighting") { + zap_file = "${example_dir}/../data_model/lighting-app-thread.zap" + + zap_pregenerated_dir = "${chip_root}/zzz_generated/lighting-app/zap-generated" + is_server = true +} + bouffalolab_executable("lighting_app") { output_name = "chip-bl702-lighting-example.out" bl_plat_name = "bl702" @@ -135,8 +144,8 @@ bouffalolab_executable("lighting_app") { ] deps = [ + ":bouffalolab-lighting", ":sdk", - "${chip_root}/examples/lighting-app/lighting-common", "${chip_root}/examples/providers:device_info_provider", "${chip_root}/src/lib", "${chip_root}/src/setup_payload", diff --git a/examples/lighting-app/bouffalolab/common/AppTask.h b/examples/lighting-app/bouffalolab/common/AppTask.h index fd69a0ab14a2aa..dc16c63d26c4bc 100644 --- a/examples/lighting-app/bouffalolab/common/AppTask.h +++ b/examples/lighting-app/bouffalolab/common/AppTask.h @@ -21,8 +21,6 @@ #include #include -// #include "AppEvent.h" - #include "FreeRTOS.h" #include "timers.h" #include diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter new file mode 100644 index 00000000000000..5da1e8f78cf1d9 --- /dev/null +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -0,0 +1,2082 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; +} + +server cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute enum8 identifyType = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + request struct TriggerEffectRequest { + IdentifyEffectIdentifier effectIdentifier = 0; + IdentifyEffectVariant effectVariant = 1; + } + + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +server cluster Groups = 4 { + bitmap GroupClusterFeature : BITMAP32 { + kGroupNames = 0x1; + } + + readonly attribute bitmap8 nameSupport = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : ENUM8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : ENUM8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + enum OnOffStartUpOnOff : ENUM8 { + kOff = 0; + kOn = 1; + kTogglePreviousOnOff = 2; + } + + bitmap OnOffControl : BITMAP8 { + kAcceptOnlyWhenOn = 0x1; + } + + bitmap OnOffFeature : BITMAP32 { + kLighting = 0x1; + } + + readonly attribute boolean onOff = 0; + readonly attribute boolean globalSceneControl = 16384; + attribute int16u onTime = 16385; + attribute int16u offWaitTime = 16386; + attribute access(write: manage) nullable OnOffStartUpOnOff startUpOnOff = 16387; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OffWithEffectRequest { + OnOffEffectIdentifier effectIdentifier = 0; + int8u effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControl onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + bitmap LevelControlFeature : BITMAP32 { + kOnOff = 0x1; + kLighting = 0x2; + kFrequency = 0x4; + } + + bitmap LevelControlOptions : BITMAP8 { + kExecuteIfOff = 0x1; + kCoupleColorTempToLevel = 0x2; + } + + readonly attribute nullable int8u currentLevel = 0; + readonly attribute int16u remainingTime = 1; + readonly attribute int8u minLevel = 2; + readonly attribute int8u maxLevel = 3; + readonly attribute int16u currentFrequency = 4; + readonly attribute int16u minFrequency = 5; + readonly attribute int16u maxFrequency = 6; + attribute LevelControlOptions options = 15; + attribute int16u onOffTransitionTime = 16; + attribute nullable int8u onLevel = 17; + attribute nullable int16u onTransitionTime = 18; + attribute nullable int16u offTransitionTime = 19; + attribute nullable int8u defaultMoveRate = 20; + attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct MoveToLevelRequest { + INT8U level = 0; + nullable INT16U transitionTime = 1; + LevelControlOptions optionsMask = 2; + LevelControlOptions optionsOverride = 3; + } + + request struct MoveRequest { + MoveMode moveMode = 0; + nullable INT8U rate = 1; + LevelControlOptions optionsMask = 2; + LevelControlOptions optionsOverride = 3; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + nullable INT16U transitionTime = 2; + LevelControlOptions optionsMask = 3; + LevelControlOptions optionsOverride = 4; + } + + request struct StopRequest { + LevelControlOptions optionsMask = 0; + LevelControlOptions optionsOverride = 1; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + nullable INT16U transitionTime = 1; + LevelControlOptions optionsMask = 2; + LevelControlOptions optionsOverride = 3; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + nullable INT8U rate = 1; + LevelControlOptions optionsMask = 2; + LevelControlOptions optionsOverride = 3; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + nullable INT16U transitionTime = 2; + LevelControlOptions optionsMask = 3; + LevelControlOptions optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + LevelControlOptions optionsMask = 0; + LevelControlOptions optionsOverride = 1; + } + + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command Move(MoveRequest): DefaultSuccess = 1; + command Step(StepRequest): DefaultSuccess = 2; + command Stop(StopRequest): DefaultSuccess = 3; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; +} + +server cluster Descriptor = 29 { + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster AccessControl = 31 { + enum AccessControlEntryAuthModeEnum : ENUM8 { + kPase = 1; + kCase = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : ENUM8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive Target targets[] = 4; + fabric_idx fabricIndex = 254; + } + + struct Target { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster BasicInformation = 40 { + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; + attribute access(write: manage) boolean localConfigDisabled = 16; + readonly attribute boolean reachable = 17; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +client cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct QueryImageRequest { + vendor_id vendorID = 0; + INT16U productID = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING<2> location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING<512> metadataForProvider = 7; + } + + response struct QueryImageResponse = 1 { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING<256> imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING<64> softwareVersionString = 4; + optional OCTET_STRING<32> updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING<512> metadataForRequestor = 7; + } + + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + + response struct ApplyUpdateResponse = 3 { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + + command QueryImage(QueryImageRequest): QueryImageResponse = 0; + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; +} + +server cluster OtaSoftwareUpdateRequestor = 42 { + enum OTAAnnouncementReason : ENUM8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum OTAChangeReasonEnum : ENUM8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum OTAUpdateStateEnum : ENUM8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + fabric_scoped struct ProviderLocation { + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + fabric_idx fabricIndex = 254; + } + + info event StateTransition = 0 { + OTAUpdateStateEnum previousState = 0; + OTAUpdateStateEnum newState = 1; + OTAChangeReasonEnum reason = 2; + nullable INT32U targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + INT32U softwareVersion = 0; + INT16U productID = 1; + } + + info event DownloadError = 2 { + INT32U softwareVersion = 0; + INT64U bytesDownloaded = 1; + nullable INT8U progressPercent = 2; + nullable INT64S platformCode = 3; + } + + attribute ProviderLocation defaultOTAProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute OTAUpdateStateEnum updateState = 2; + readonly attribute nullable int8u updateStateProgress = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AnnounceOTAProviderRequest { + node_id providerNodeID = 0; + vendor_id vendorID = 1; + OTAAnnouncementReason announcementReason = 2; + optional OCTET_STRING<512> metadataForNode = 3; + endpoint_no endpoint = 4; + } + + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; +} + +server cluster LocalizationConfiguration = 43 { + attribute char_string<35> activeLocale = 0; + readonly attribute CHAR_STRING supportedLocales[] = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster TimeFormatLocalization = 44 { + enum CalendarTypeEnum : ENUM8 { + kBuddhist = 0; + kChinese = 1; + kCoptic = 2; + kEthiopian = 3; + kGregorian = 4; + kHebrew = 5; + kIndian = 6; + kIslamic = 7; + kJapanese = 8; + kKorean = 9; + kPersian = 10; + kTaiwanese = 11; + } + + enum HourFormatEnum : ENUM8 { + k12hr = 0; + k24hr = 1; + } + + attribute HourFormatEnum hourFormat = 0; + attribute CalendarTypeEnum activeCalendarType = 1; + readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum CommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationType regulatoryConfig = 2; + readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType newRegulatoryConfig = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + bitmap NetworkCommissioningFeature : BITMAP32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + } + + bitmap WiFiSecurity : BITMAP8 { + kUnencrypted = 0x1; + kWep = 0x2; + kWpaPersonal = 0x4; + kWpa2Personal = 0x8; + kWpa3Personal = 0x10; + } + + struct NetworkInfo { + octet_string<32> networkID = 0; + boolean connected = 1; + } + + struct WiFiInterfaceScanResult { + WiFiSecurity security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBand wiFiBand = 4; + int8s rssi = 5; + } + + struct ThreadInterfaceScanResult { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ScanNetworksRequest { + optional nullable OCTET_STRING<32> ssid = 0; + optional INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING<32> ssid = 0; + OCTET_STRING<64> credentials = 1; + optional INT64U breadcrumb = 2; + } + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING<254> operationalDataset = 0; + optional INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ConnectNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING<32> networkID = 0; + INT8U networkIndex = 1; + optional INT64U breadcrumb = 2; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatus networkingStatus = 0; + optional CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatus networkingStatus = 0; + optional CHAR_STRING<512> debugText = 1; + optional INT8U networkIndex = 2; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatus networkingStatus = 0; + optional CHAR_STRING debugText = 1; + nullable INT32S errorValue = 2; + } + + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; +} + +server cluster DiagnosticLogs = 50 { + enum IntentEnum : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional CHAR_STRING<32> transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonEnum : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct TestEventTriggerRequest { + OCTET_STRING<16> enableKey = 0; + INT64U eventTrigger = 1; + } + + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; +} + +server cluster SoftwareDiagnostics = 52 { + bitmap SoftwareDiagnosticsFeature : BITMAP32 { + kWaterMarks = 0x1; + } + + struct ThreadMetricsStruct { + int64u id = 0; + optional char_string<8> name = 1; + optional int32u stackFreeCurrent = 2; + optional int32u stackFreeMinimum = 3; + optional int32u stackSize = 4; + } + + info event SoftwareFault = 0 { + INT64U id = 0; + optional CHAR_STRING name = 1; + optional OCTET_STRING faultRecording = 2; + } + + readonly attribute ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute int64u currentHeapFree = 1; + readonly attribute int64u currentHeapUsed = 2; + readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command ResetWatermarks(): DefaultSuccess = 0; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + bitmap ThreadNetworkDiagnosticsFeature : BITMAP32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + kMLECounts = 0x4; + kMACCounts = 0x8; + } + + struct NeighborTable { + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + nullable int8s averageRssi = 6; + nullable int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; + } + + struct RouteTable { + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; + } + + struct SecurityPolicy { + int16u rotationTime = 0; + int16u flags = 1; + } + + struct OperationalDatasetComponents { + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; + } + + info event ConnectionStatus = 0 { + ConnectionStatusEnum connectionStatus = 0; + } + + info event NetworkFaultChange = 1 { + NetworkFault current[] = 0; + NetworkFault previous[] = 1; + } + + readonly attribute nullable int16u channel = 0; + readonly attribute nullable RoutingRole routingRole = 1; + readonly attribute nullable char_string<16> networkName = 2; + readonly attribute nullable int16u panId = 3; + readonly attribute nullable int64u extendedPanId = 4; + readonly attribute nullable octet_string<17> meshLocalPrefix = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute NeighborTable neighborTable[] = 7; + readonly attribute RouteTable routeTable[] = 8; + readonly attribute nullable int32u partitionId = 9; + readonly attribute nullable int8u weighting = 10; + readonly attribute nullable int8u dataVersion = 11; + readonly attribute nullable int8u stableDataVersion = 12; + readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute int16u detachedRoleCount = 14; + readonly attribute int16u childRoleCount = 15; + readonly attribute int16u routerRoleCount = 16; + readonly attribute int16u leaderRoleCount = 17; + readonly attribute int16u attachAttemptCount = 18; + readonly attribute int16u partitionIdChangeCount = 19; + readonly attribute int16u betterPartitionAttachAttemptCount = 20; + readonly attribute int16u parentChangeCount = 21; + readonly attribute int32u txTotalCount = 22; + readonly attribute int32u txUnicastCount = 23; + readonly attribute int32u txBroadcastCount = 24; + readonly attribute int32u txAckRequestedCount = 25; + readonly attribute int32u txAckedCount = 26; + readonly attribute int32u txNoAckRequestedCount = 27; + readonly attribute int32u txDataCount = 28; + readonly attribute int32u txDataPollCount = 29; + readonly attribute int32u txBeaconCount = 30; + readonly attribute int32u txBeaconRequestCount = 31; + readonly attribute int32u txOtherCount = 32; + readonly attribute int32u txRetryCount = 33; + readonly attribute int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute int32u txErrCcaCount = 36; + readonly attribute int32u txErrAbortCount = 37; + readonly attribute int32u txErrBusyChannelCount = 38; + readonly attribute int32u rxTotalCount = 39; + readonly attribute int32u rxUnicastCount = 40; + readonly attribute int32u rxBroadcastCount = 41; + readonly attribute int32u rxDataCount = 42; + readonly attribute int32u rxDataPollCount = 43; + readonly attribute int32u rxBeaconCount = 44; + readonly attribute int32u rxBeaconRequestCount = 45; + readonly attribute int32u rxOtherCount = 46; + readonly attribute int32u rxAddressFilteredCount = 47; + readonly attribute int32u rxDestAddrFilteredCount = 48; + readonly attribute int32u rxDuplicatedCount = 49; + readonly attribute int32u rxErrNoFrameCount = 50; + readonly attribute int32u rxErrUnknownNeighborCount = 51; + readonly attribute int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute int32u rxErrSecCount = 53; + readonly attribute int32u rxErrFcsCount = 54; + readonly attribute int32u rxErrOtherCount = 55; + readonly attribute nullable int64u activeTimestamp = 56; + readonly attribute nullable int64u pendingTimestamp = 57; + readonly attribute nullable int32u delay = 58; + readonly attribute nullable SecurityPolicy securityPolicy = 59; + readonly attribute nullable octet_string<4> channelPage0Mask = 60; + readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; + readonly attribute NetworkFault activeNetworkFaultsList[] = 62; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U previousPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatusEnum : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable int16u adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEPasscodeVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster OperationalCredentials = 62 { + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; + readonly attribute FabricDescriptorStruct fabrics[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + request struct CSRRequestRequest { + OCTET_STRING CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + Int64u caseAdminSubject = 3; + VENDOR_ID adminVendorId = 4; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCACertificate = 0; + } + + response struct AttestationResponse = 1 { + OCTET_STRING attestationElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct CertificateChainResponse = 3 { + OCTET_STRING certificate = 0; + } + + response struct CSRResponse = 5 { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional CHAR_STRING debugText = 2; + } + + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicyEnum : ENUM8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetReadRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetReadAllIndicesRequest { + INT16U groupKeySetIDs[] = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + INT16U groupKeySetIDs[] = 0; + } + + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; +} + +server cluster FixedLabel = 64 { + readonly attribute LabelStruct labelList[] = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute access(write: manage) LabelStruct labelList[] = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster ColorControl = 768 { + enum ColorLoopAction : ENUM8 { + kDeactivate = 0; + kActivateFromColorLoopStartEnhancedHue = 1; + kActivateFromEnhancedCurrentHue = 2; + } + + enum ColorLoopDirection : ENUM8 { + kDecrementHue = 0; + kIncrementHue = 1; + } + + enum ColorMode : ENUM8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperature = 2; + } + + enum HueDirection : ENUM8 { + kShortestDistance = 0; + kLongestDistance = 1; + kUp = 2; + kDown = 3; + } + + enum HueMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum HueStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + enum SaturationMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum SaturationStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + bitmap ColorCapabilities : BITMAP16 { + kHueSaturationSupported = 0x1; + kEnhancedHueSupported = 0x2; + kColorLoopSupported = 0x4; + kXYAttributesSupported = 0x8; + kColorTemperatureSupported = 0x10; + } + + bitmap ColorControlFeature : BITMAP32 { + kHueAndSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXy = 0x8; + kColorTemperature = 0x10; + } + + bitmap ColorLoopUpdateFlags : BITMAP8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + + readonly attribute int8u currentHue = 0; + readonly attribute int8u currentSaturation = 1; + readonly attribute int16u remainingTime = 2; + readonly attribute int16u currentX = 3; + readonly attribute int16u currentY = 4; + readonly attribute int16u colorTemperatureMireds = 7; + readonly attribute enum8 colorMode = 8; + attribute bitmap8 options = 15; + readonly attribute nullable int8u numberOfPrimaries = 16; + readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute int8u colorLoopActive = 16386; + readonly attribute int8u colorLoopDirection = 16387; + readonly attribute int16u colorLoopTime = 16388; + readonly attribute int16u colorLoopStartEnhancedHue = 16389; + readonly attribute int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute int16u colorTempPhysicalMinMireds = 16395; + readonly attribute int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct MoveToHueRequest { + INT8U hue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveHueRequest { + HueMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct StepHueRequest { + HueStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToSaturationRequest { + INT8U saturation = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveSaturationRequest { + SaturationMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct StepSaturationRequest { + SaturationStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToHueAndSaturationRequest { + INT8U hue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToColorRequest { + INT16U colorX = 0; + INT16U colorY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveColorRequest { + INT16S rateX = 0; + INT16S rateY = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct StepColorRequest { + INT16S stepX = 0; + INT16S stepY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToColorTemperatureRequest { + INT16U colorTemperatureMireds = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct EnhancedMoveToHueRequest { + INT16U enhancedHue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct EnhancedMoveHueRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct EnhancedStepHueRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct EnhancedMoveToHueAndSaturationRequest { + INT16U enhancedHue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct ColorLoopSetRequest { + ColorLoopUpdateFlags updateFlags = 0; + ColorLoopAction action = 1; + ColorLoopDirection direction = 2; + INT16U time = 3; + INT16U startHue = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + request struct StopMoveStepRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; + } + + request struct MoveColorTemperatureRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + INT16U colorTemperatureMinimumMireds = 2; + INT16U colorTemperatureMaximumMireds = 3; + BITMAP8 optionsMask = 4; + BITMAP8 optionsOverride = 5; + } + + request struct StepColorTemperatureRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + INT16U colorTemperatureMinimumMireds = 3; + INT16U colorTemperatureMaximumMireds = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + command MoveHue(MoveHueRequest): DefaultSuccess = 1; + command StepHue(StepHueRequest): DefaultSuccess = 2; + command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + command StepColor(StepColorRequest): DefaultSuccess = 9; + command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; +} + +server cluster OccupancySensing = 1030 { + enum OccupancySensorTypeEnum : ENUM8 { + kPir = 0; + kUltrasonic = 1; + kPIRAndUltrasonic = 2; + kPhysicalContact = 3; + } + + bitmap OccupancyBitmap : BITMAP8 { + kOccupied = 0x1; + } + + bitmap OccupancySensorTypeBitmap : BITMAP8 { + kPir = 0x1; + kUltrasonic = 0x2; + kPhysicalContact = 0x4; + } + + readonly attribute OccupancyBitmap occupancy = 0; + readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; + readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +endpoint 0 { + device type rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; + + server cluster Groups { + ram attribute nameSupport; + ram attribute featureMap; + ram attribute clusterRevision default = 4; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap; + callback attribute clusterRevision default = 1; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry default = 4; + callback attribute targetsPerAccessControlEntry default = 3; + callback attribute accessControlEntriesPerFabric default = 4; + callback attribute attributeList; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision default = 10; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location default = "XX"; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + callback attribute manufacturingDate default = "20210614123456ZZ"; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled; + ram attribute reachable default = 1; + callback attribute uniqueID; + callback attribute capabilityMinima; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster OtaSoftwareUpdateRequestor { + emits event StateTransition; + emits event VersionApplied; + emits event DownloadError; + callback attribute defaultOTAProviders; + ram attribute updatePossible default = 1; + ram attribute updateState; + ram attribute updateStateProgress; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster LocalizationConfiguration { + persist attribute activeLocale default = "en-US"; + callback attribute supportedLocales; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster TimeFormatLocalization { + persist attribute hourFormat; + persist attribute activeCalendarType; + callback attribute supportedCalendarTypes; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig; + callback attribute locationCapability; + callback attribute supportsConcurrentConnection default = 1; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + } + + server cluster DiagnosticLogs { + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + emits event HardwareFaultChange; + emits event RadioFaultChange; + emits event NetworkFaultChange; + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + callback attribute totalOperationalHours; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster SoftwareDiagnostics { + callback attribute threadMetrics; + callback attribute currentHeapFree; + callback attribute currentHeapUsed; + callback attribute currentHeapHighWatermark; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 1; + } + + server cluster ThreadNetworkDiagnostics { + callback attribute channel; + callback attribute routingRole; + callback attribute networkName; + callback attribute panId; + callback attribute extendedPanId; + callback attribute meshLocalPrefix; + callback attribute overrunCount; + callback attribute neighborTable; + callback attribute routeTable; + callback attribute partitionId; + callback attribute weighting; + callback attribute dataVersion; + callback attribute stableDataVersion; + callback attribute leaderRouterId; + callback attribute detachedRoleCount; + callback attribute childRoleCount; + callback attribute routerRoleCount; + callback attribute leaderRoleCount; + callback attribute attachAttemptCount; + callback attribute partitionIdChangeCount; + callback attribute betterPartitionAttachAttemptCount; + callback attribute parentChangeCount; + callback attribute txTotalCount; + callback attribute txUnicastCount; + callback attribute txBroadcastCount; + callback attribute txAckRequestedCount; + callback attribute txAckedCount; + callback attribute txNoAckRequestedCount; + callback attribute txDataCount; + callback attribute txDataPollCount; + callback attribute txBeaconCount; + callback attribute txBeaconRequestCount; + callback attribute txOtherCount; + callback attribute txRetryCount; + callback attribute txDirectMaxRetryExpiryCount; + callback attribute txIndirectMaxRetryExpiryCount; + callback attribute txErrCcaCount; + callback attribute txErrAbortCount; + callback attribute txErrBusyChannelCount; + callback attribute rxTotalCount; + callback attribute rxUnicastCount; + callback attribute rxBroadcastCount; + callback attribute rxDataCount; + callback attribute rxDataPollCount; + callback attribute rxBeaconCount; + callback attribute rxBeaconRequestCount; + callback attribute rxOtherCount; + callback attribute rxAddressFilteredCount; + callback attribute rxDestAddrFilteredCount; + callback attribute rxDuplicatedCount; + callback attribute rxErrNoFrameCount; + callback attribute rxErrUnknownNeighborCount; + callback attribute rxErrInvalidSrcAddrCount; + callback attribute rxErrSecCount; + callback attribute rxErrFcsCount; + callback attribute rxErrOtherCount; + callback attribute activeTimestamp; + callback attribute pendingTimestamp; + callback attribute delay; + callback attribute securityPolicy; + callback attribute channelPage0Mask; + callback attribute operationalDatasetComponents; + callback attribute activeNetworkFaultsList; + ram attribute featureMap default = 0x000F; + ram attribute clusterRevision default = 1; + } + + server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster FixedLabel { + callback attribute labelList; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster UserLabel { + callback attribute labelList; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } +} +endpoint 1 { + device type dimmablelight = 257, version 1; + + server cluster Identify { + ram attribute identifyTime; + ram attribute identifyType; + ram attribute featureMap; + ram attribute clusterRevision default = 4; + } + + server cluster Groups { + ram attribute nameSupport; + ram attribute featureMap; + ram attribute clusterRevision default = 4; + } + + server cluster OnOff { + persist attribute onOff; + ram attribute globalSceneControl default = 0x01; + ram attribute onTime; + ram attribute offWaitTime; + persist attribute startUpOnOff default = 0xFF; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 4; + } + + server cluster LevelControl { + persist attribute currentLevel default = 0x01; + ram attribute remainingTime; + ram attribute minLevel default = 0x01; + ram attribute maxLevel default = 0xFE; + ram attribute currentFrequency; + ram attribute minFrequency; + ram attribute maxFrequency; + ram attribute options; + ram attribute onOffTransitionTime; + ram attribute onLevel default = 0xFF; + ram attribute onTransitionTime; + ram attribute offTransitionTime; + ram attribute defaultMoveRate default = 50; + persist attribute startUpCurrentLevel default = 255; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 5; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap; + callback attribute clusterRevision default = 1; + } + + server cluster ColorControl { + ram attribute currentHue; + ram attribute currentSaturation; + ram attribute remainingTime; + ram attribute currentX default = 0x616B; + ram attribute currentY default = 0x607D; + ram attribute colorTemperatureMireds default = 0x00FA; + ram attribute colorMode default = 0x01; + ram attribute options; + ram attribute numberOfPrimaries; + ram attribute enhancedCurrentHue; + ram attribute enhancedColorMode default = 0x01; + ram attribute colorLoopActive; + ram attribute colorLoopDirection; + ram attribute colorLoopTime default = 0x0019; + ram attribute colorLoopStartEnhancedHue default = 0x2300; + ram attribute colorLoopStoredEnhancedHue; + ram attribute colorCapabilities default = 0x1F; + ram attribute colorTempPhysicalMinMireds; + ram attribute colorTempPhysicalMaxMireds default = 0xFEFF; + ram attribute coupleColorTempToLevelMinMireds; + ram attribute startUpColorTemperatureMireds; + ram attribute featureMap default = 0x1F; + ram attribute clusterRevision default = 5; + } + + server cluster OccupancySensing { + ram attribute occupancy; + ram attribute occupancySensorType; + ram attribute occupancySensorTypeBitmap; + ram attribute featureMap; + ram attribute clusterRevision default = 3; + } +} + + diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap new file mode 100644 index 00000000000000..84e31ba4ae3212 --- /dev/null +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap @@ -0,0 +1,8345 @@ +{ + "featureLevel": 92, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "name": "MA-rootdevice", + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "switch type", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "switch actions", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "XX", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OTAUpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StateTransition", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "VersionApplied", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "DownloadError", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "en-US", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "HourFormatEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "CalendarTypeEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 0, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationType", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationType", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatus", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "HardwareFaultChange", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "RadioFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "NetworkFaultChange", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRole", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouteTable", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChildRoleCount", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouterRoleCount", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRoleCount", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AttachAttemptCount", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionIdChangeCount", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BetterPartitionAttachAttemptCount", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ParentChangeCount", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxTotalCount", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxUnicastCount", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBroadcastCount", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckRequestedCount", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckedCount", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxNoAckRequestedCount", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataCount", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataPollCount", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconCount", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconRequestCount", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxOtherCount", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxRetryCount", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCcaCount", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrAbortCount", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrBusyChannelCount", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxTotalCount", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxUnicastCount", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBroadcastCount", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataCount", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataPollCount", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconCount", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconRequestCount", + "code": 45, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxOtherCount", + "code": 46, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxAddressFilteredCount", + "code": 47, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDestAddrFilteredCount", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDuplicatedCount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrNoFrameCount", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrUnknownNeighborCount", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrInvalidSrcAddrCount", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrSecCount", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrFcsCount", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrOtherCount", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelPage0Mask", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x000F", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "PHYRate", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PHYRateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FullDuplex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketRxCount", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketTxCount", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCount", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CollisionCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSinceReset", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "name": "MA-dimmablelight", + "deviceTypeName": "MA-dimmablelight", + "deviceTypeCode": 257, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedAddScene", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedViewScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CopyScene", + "code": 66, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "OffWithEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "OnWithRecallGlobalScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "OnWithTimedOff", + "code": 66, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MinLevel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentFrequency", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinFrequency", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxFrequency", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "LevelControlOptions", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OnOffTransitionTime", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnLevel", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTransitionTime", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffTransitionTime", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultMoveRate", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "50", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "255", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "XX", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToHue", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToColor", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColor", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColor", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColorTemperature", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedMoveToHue", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedMoveHue", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedStepHue", + "code": 66, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedMoveToHueAndSaturation", + "code": 67, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ColorLoopSet", + "code": 68, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopMoveStep", + "code": 71, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveColorTemperature", + "code": 75, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepColorTemperature", + "code": 76, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "CurrentHue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentSaturation", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentX", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x616B", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentY", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x607D", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DriftCompensation", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CompensationText", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorTemperatureMireds", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00FA", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorMode", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NumberOfPrimaries", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Primary1X", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Y", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Intensity", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2X", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Y", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Intensity", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3X", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Y", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Intensity", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4X", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Y", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Intensity", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5X", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Y", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Intensity", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6X", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Y", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Intensity", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointX", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointY", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRX", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRY", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRIntensity", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGX", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGY", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGIntensity", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBX", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBY", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBIntensity", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedCurrentHue", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "EnhancedColorMode", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopActive", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopDirection", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopTime", + "code": 16388, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0019", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopStartEnhancedHue", + "code": 16389, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x2300", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopStoredEnhancedHue", + "code": 16390, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorCapabilities", + "code": 16394, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1F", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMinMireds", + "code": 16395, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMaxMireds", + "code": 16396, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFEFF", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CoupleColorTempToLevelMinMireds", + "code": 16397, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartUpColorTemperatureMireds", + "code": 16400, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1F", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Occupancy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "OccupancyBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 22 + }, + { + "endpointTypeName": "MA-dimmablelight", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 257 + } + ] +} \ No newline at end of file diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter new file mode 100644 index 00000000000000..5d9e7700f0d100 --- /dev/null +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -0,0 +1,1943 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; +} + +server cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute enum8 identifyType = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + request struct TriggerEffectRequest { + IdentifyEffectIdentifier effectIdentifier = 0; + IdentifyEffectVariant effectVariant = 1; + } + + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +server cluster Groups = 4 { + bitmap GroupClusterFeature : BITMAP32 { + kGroupNames = 0x1; + } + + readonly attribute bitmap8 nameSupport = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : ENUM8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : ENUM8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + enum OnOffStartUpOnOff : ENUM8 { + kOff = 0; + kOn = 1; + kTogglePreviousOnOff = 2; + } + + bitmap OnOffControl : BITMAP8 { + kAcceptOnlyWhenOn = 0x1; + } + + bitmap OnOffFeature : BITMAP32 { + kLighting = 0x1; + } + + readonly attribute boolean onOff = 0; + readonly attribute boolean globalSceneControl = 16384; + attribute int16u onTime = 16385; + attribute int16u offWaitTime = 16386; + attribute access(write: manage) nullable OnOffStartUpOnOff startUpOnOff = 16387; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OffWithEffectRequest { + OnOffEffectIdentifier effectIdentifier = 0; + int8u effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControl onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + bitmap LevelControlFeature : BITMAP32 { + kOnOff = 0x1; + kLighting = 0x2; + kFrequency = 0x4; + } + + bitmap LevelControlOptions : BITMAP8 { + kExecuteIfOff = 0x1; + kCoupleColorTempToLevel = 0x2; + } + + readonly attribute nullable int8u currentLevel = 0; + readonly attribute int16u remainingTime = 1; + readonly attribute int8u minLevel = 2; + readonly attribute int8u maxLevel = 3; + readonly attribute int16u currentFrequency = 4; + readonly attribute int16u minFrequency = 5; + readonly attribute int16u maxFrequency = 6; + attribute LevelControlOptions options = 15; + attribute int16u onOffTransitionTime = 16; + attribute nullable int8u onLevel = 17; + attribute nullable int16u onTransitionTime = 18; + attribute nullable int16u offTransitionTime = 19; + attribute nullable int8u defaultMoveRate = 20; + attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct MoveToLevelRequest { + INT8U level = 0; + nullable INT16U transitionTime = 1; + LevelControlOptions optionsMask = 2; + LevelControlOptions optionsOverride = 3; + } + + request struct MoveRequest { + MoveMode moveMode = 0; + nullable INT8U rate = 1; + LevelControlOptions optionsMask = 2; + LevelControlOptions optionsOverride = 3; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + nullable INT16U transitionTime = 2; + LevelControlOptions optionsMask = 3; + LevelControlOptions optionsOverride = 4; + } + + request struct StopRequest { + LevelControlOptions optionsMask = 0; + LevelControlOptions optionsOverride = 1; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + nullable INT16U transitionTime = 1; + LevelControlOptions optionsMask = 2; + LevelControlOptions optionsOverride = 3; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + nullable INT8U rate = 1; + LevelControlOptions optionsMask = 2; + LevelControlOptions optionsOverride = 3; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + nullable INT16U transitionTime = 2; + LevelControlOptions optionsMask = 3; + LevelControlOptions optionsOverride = 4; + } + + request struct StopWithOnOffRequest { + LevelControlOptions optionsMask = 0; + LevelControlOptions optionsOverride = 1; + } + + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command Move(MoveRequest): DefaultSuccess = 1; + command Step(StepRequest): DefaultSuccess = 2; + command Stop(StopRequest): DefaultSuccess = 3; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; +} + +server cluster Descriptor = 29 { + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster AccessControl = 31 { + enum AccessControlEntryAuthModeEnum : ENUM8 { + kPase = 1; + kCase = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : ENUM8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive Target targets[] = 4; + fabric_idx fabricIndex = 254; + } + + struct Target { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster BasicInformation = 40 { + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; + attribute access(write: manage) boolean localConfigDisabled = 16; + readonly attribute boolean reachable = 17; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +client cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct QueryImageRequest { + vendor_id vendorID = 0; + INT16U productID = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING<2> location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING<512> metadataForProvider = 7; + } + + response struct QueryImageResponse = 1 { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING<256> imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING<64> softwareVersionString = 4; + optional OCTET_STRING<32> updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING<512> metadataForRequestor = 7; + } + + request struct ApplyUpdateRequestRequest { + OCTET_STRING<32> updateToken = 0; + INT32U newVersion = 1; + } + + response struct ApplyUpdateResponse = 3 { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + + command QueryImage(QueryImageRequest): QueryImageResponse = 0; + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; +} + +server cluster OtaSoftwareUpdateRequestor = 42 { + enum OTAAnnouncementReason : ENUM8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum OTAChangeReasonEnum : ENUM8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum OTAUpdateStateEnum : ENUM8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + fabric_scoped struct ProviderLocation { + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + fabric_idx fabricIndex = 254; + } + + info event StateTransition = 0 { + OTAUpdateStateEnum previousState = 0; + OTAUpdateStateEnum newState = 1; + OTAChangeReasonEnum reason = 2; + nullable INT32U targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + INT32U softwareVersion = 0; + INT16U productID = 1; + } + + info event DownloadError = 2 { + INT32U softwareVersion = 0; + INT64U bytesDownloaded = 1; + nullable INT8U progressPercent = 2; + nullable INT64S platformCode = 3; + } + + attribute ProviderLocation defaultOTAProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute OTAUpdateStateEnum updateState = 2; + readonly attribute nullable int8u updateStateProgress = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AnnounceOTAProviderRequest { + node_id providerNodeID = 0; + vendor_id vendorID = 1; + OTAAnnouncementReason announcementReason = 2; + optional OCTET_STRING<512> metadataForNode = 3; + endpoint_no endpoint = 4; + } + + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; +} + +server cluster LocalizationConfiguration = 43 { + attribute char_string<35> activeLocale = 0; + readonly attribute CHAR_STRING supportedLocales[] = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster TimeFormatLocalization = 44 { + enum CalendarTypeEnum : ENUM8 { + kBuddhist = 0; + kChinese = 1; + kCoptic = 2; + kEthiopian = 3; + kGregorian = 4; + kHebrew = 5; + kIndian = 6; + kIslamic = 7; + kJapanese = 8; + kKorean = 9; + kPersian = 10; + kTaiwanese = 11; + } + + enum HourFormatEnum : ENUM8 { + k12hr = 0; + k24hr = 1; + } + + attribute HourFormatEnum hourFormat = 0; + attribute CalendarTypeEnum activeCalendarType = 1; + readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum CommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationType regulatoryConfig = 2; + readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType newRegulatoryConfig = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + bitmap NetworkCommissioningFeature : BITMAP32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + } + + bitmap WiFiSecurity : BITMAP8 { + kUnencrypted = 0x1; + kWep = 0x2; + kWpaPersonal = 0x4; + kWpa2Personal = 0x8; + kWpa3Personal = 0x10; + } + + struct NetworkInfo { + octet_string<32> networkID = 0; + boolean connected = 1; + } + + struct WiFiInterfaceScanResult { + WiFiSecurity security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBand wiFiBand = 4; + int8s rssi = 5; + } + + struct ThreadInterfaceScanResult { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ScanNetworksRequest { + optional nullable OCTET_STRING<32> ssid = 0; + optional INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING<32> ssid = 0; + OCTET_STRING<64> credentials = 1; + optional INT64U breadcrumb = 2; + } + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING<254> operationalDataset = 0; + optional INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ConnectNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING<32> networkID = 0; + INT8U networkIndex = 1; + optional INT64U breadcrumb = 2; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatus networkingStatus = 0; + optional CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatus networkingStatus = 0; + optional CHAR_STRING<512> debugText = 1; + optional INT8U networkIndex = 2; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatus networkingStatus = 0; + optional CHAR_STRING debugText = 1; + nullable INT32S errorValue = 2; + } + + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; +} + +server cluster DiagnosticLogs = 50 { + enum IntentEnum : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional CHAR_STRING<32> transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonEnum : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct TestEventTriggerRequest { + OCTET_STRING<16> enableKey = 0; + INT64U eventTrigger = 1; + } + + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; +} + +server cluster SoftwareDiagnostics = 52 { + bitmap SoftwareDiagnosticsFeature : BITMAP32 { + kWaterMarks = 0x1; + } + + struct ThreadMetricsStruct { + int64u id = 0; + optional char_string<8> name = 1; + optional int32u stackFreeCurrent = 2; + optional int32u stackFreeMinimum = 3; + optional int32u stackSize = 4; + } + + info event SoftwareFault = 0 { + INT64U id = 0; + optional CHAR_STRING name = 1; + optional OCTET_STRING faultRecording = 2; + } + + readonly attribute ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute int64u currentHeapFree = 1; + readonly attribute int64u currentHeapUsed = 2; + readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command ResetWatermarks(): DefaultSuccess = 0; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCauseEnum : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum SecurityTypeEnum : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiVersionEnum : ENUM8 { + kA = 0; + kB = 1; + kG = 2; + kN = 3; + kAc = 4; + kAx = 5; + } + + bitmap WiFiNetworkDiagnosticsFeature : BITMAP32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCauseEnum associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + ConnectionStatusEnum connectionStatus = 0; + } + + readonly attribute nullable octet_string<6> bssid = 0; + 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; + readonly attribute nullable int32u beaconRxCount = 6; + readonly attribute nullable int32u packetMulticastRxCount = 7; + readonly attribute nullable int32u packetMulticastTxCount = 8; + readonly attribute nullable int32u packetUnicastRxCount = 9; + readonly attribute nullable int32u packetUnicastTxCount = 10; + readonly attribute nullable int64u currentMaxRate = 11; + readonly attribute nullable int64u overrunCount = 12; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U previousPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatusEnum : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable int16u adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEPasscodeVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster OperationalCredentials = 62 { + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; + readonly attribute FabricDescriptorStruct fabrics[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + request struct CSRRequestRequest { + OCTET_STRING CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + Int64u caseAdminSubject = 3; + VENDOR_ID adminVendorId = 4; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCACertificate = 0; + } + + response struct AttestationResponse = 1 { + OCTET_STRING attestationElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct CertificateChainResponse = 3 { + OCTET_STRING certificate = 0; + } + + response struct CSRResponse = 5 { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional CHAR_STRING debugText = 2; + } + + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicyEnum : ENUM8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetReadRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetReadAllIndicesRequest { + INT16U groupKeySetIDs[] = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + INT16U groupKeySetIDs[] = 0; + } + + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; +} + +server cluster FixedLabel = 64 { + readonly attribute LabelStruct labelList[] = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute access(write: manage) LabelStruct labelList[] = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +server cluster ColorControl = 768 { + enum ColorLoopAction : ENUM8 { + kDeactivate = 0; + kActivateFromColorLoopStartEnhancedHue = 1; + kActivateFromEnhancedCurrentHue = 2; + } + + enum ColorLoopDirection : ENUM8 { + kDecrementHue = 0; + kIncrementHue = 1; + } + + enum ColorMode : ENUM8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperature = 2; + } + + enum HueDirection : ENUM8 { + kShortestDistance = 0; + kLongestDistance = 1; + kUp = 2; + kDown = 3; + } + + enum HueMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum HueStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + enum SaturationMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum SaturationStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + bitmap ColorCapabilities : BITMAP16 { + kHueSaturationSupported = 0x1; + kEnhancedHueSupported = 0x2; + kColorLoopSupported = 0x4; + kXYAttributesSupported = 0x8; + kColorTemperatureSupported = 0x10; + } + + bitmap ColorControlFeature : BITMAP32 { + kHueAndSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXy = 0x8; + kColorTemperature = 0x10; + } + + bitmap ColorLoopUpdateFlags : BITMAP8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + + readonly attribute int8u currentHue = 0; + readonly attribute int8u currentSaturation = 1; + readonly attribute int16u remainingTime = 2; + readonly attribute int16u currentX = 3; + readonly attribute int16u currentY = 4; + readonly attribute int16u colorTemperatureMireds = 7; + readonly attribute enum8 colorMode = 8; + attribute bitmap8 options = 15; + readonly attribute nullable int8u numberOfPrimaries = 16; + readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute int8u colorLoopActive = 16386; + readonly attribute int8u colorLoopDirection = 16387; + readonly attribute int16u colorLoopTime = 16388; + readonly attribute int16u colorLoopStartEnhancedHue = 16389; + readonly attribute int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute int16u colorTempPhysicalMinMireds = 16395; + readonly attribute int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct MoveToHueRequest { + INT8U hue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveHueRequest { + HueMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct StepHueRequest { + HueStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToSaturationRequest { + INT8U saturation = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveSaturationRequest { + SaturationMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct StepSaturationRequest { + SaturationStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToHueAndSaturationRequest { + INT8U hue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToColorRequest { + INT16U colorX = 0; + INT16U colorY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveColorRequest { + INT16S rateX = 0; + INT16S rateY = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct StepColorRequest { + INT16S stepX = 0; + INT16S stepY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToColorTemperatureRequest { + INT16U colorTemperatureMireds = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct EnhancedMoveToHueRequest { + INT16U enhancedHue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct EnhancedMoveHueRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct EnhancedStepHueRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct EnhancedMoveToHueAndSaturationRequest { + INT16U enhancedHue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct ColorLoopSetRequest { + ColorLoopUpdateFlags updateFlags = 0; + ColorLoopAction action = 1; + ColorLoopDirection direction = 2; + INT16U time = 3; + INT16U startHue = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + request struct StopMoveStepRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; + } + + request struct MoveColorTemperatureRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + INT16U colorTemperatureMinimumMireds = 2; + INT16U colorTemperatureMaximumMireds = 3; + BITMAP8 optionsMask = 4; + BITMAP8 optionsOverride = 5; + } + + request struct StepColorTemperatureRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + INT16U colorTemperatureMinimumMireds = 3; + INT16U colorTemperatureMaximumMireds = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + command MoveHue(MoveHueRequest): DefaultSuccess = 1; + command StepHue(StepHueRequest): DefaultSuccess = 2; + command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + command StepColor(StepColorRequest): DefaultSuccess = 9; + command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; +} + +server cluster OccupancySensing = 1030 { + enum OccupancySensorTypeEnum : ENUM8 { + kPir = 0; + kUltrasonic = 1; + kPIRAndUltrasonic = 2; + kPhysicalContact = 3; + } + + bitmap OccupancyBitmap : BITMAP8 { + kOccupied = 0x1; + } + + bitmap OccupancySensorTypeBitmap : BITMAP8 { + kPir = 0x1; + kUltrasonic = 0x2; + kPhysicalContact = 0x4; + } + + readonly attribute OccupancyBitmap occupancy = 0; + readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; + readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +endpoint 0 { + device type rootdevice = 22, version 1; + binding cluster OtaSoftwareUpdateProvider; + + server cluster Groups { + ram attribute nameSupport; + ram attribute featureMap; + ram attribute clusterRevision default = 4; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap; + callback attribute clusterRevision default = 1; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry default = 4; + callback attribute targetsPerAccessControlEntry default = 3; + callback attribute accessControlEntriesPerFabric default = 4; + callback attribute attributeList; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision default = 10; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location default = "XX"; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + callback attribute manufacturingDate default = "20210614123456ZZ"; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled; + ram attribute reachable default = 1; + callback attribute uniqueID; + callback attribute capabilityMinima; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster OtaSoftwareUpdateRequestor { + emits event StateTransition; + emits event VersionApplied; + emits event DownloadError; + callback attribute defaultOTAProviders; + ram attribute updatePossible default = 1; + ram attribute updateState; + ram attribute updateStateProgress; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster LocalizationConfiguration { + persist attribute activeLocale default = "en-US"; + callback attribute supportedLocales; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster TimeFormatLocalization { + persist attribute hourFormat; + persist attribute activeCalendarType; + callback attribute supportedCalendarTypes; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig; + callback attribute locationCapability; + callback attribute supportsConcurrentConnection default = 1; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 1; + } + + server cluster DiagnosticLogs { + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + emits event HardwareFaultChange; + emits event RadioFaultChange; + emits event NetworkFaultChange; + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + callback attribute totalOperationalHours; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster SoftwareDiagnostics { + callback attribute threadMetrics; + callback attribute currentHeapFree; + callback attribute currentHeapUsed; + callback attribute currentHeapHighWatermark; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 1; + } + + server cluster WiFiNetworkDiagnostics { + emits event Disconnection; + emits event AssociationFailure; + emits event ConnectionStatus; + callback attribute bssid; + callback attribute securityType; + callback attribute wiFiVersion; + callback attribute channelNumber; + callback attribute rssi; + callback attribute beaconLostCount; + callback attribute beaconRxCount; + callback attribute packetMulticastRxCount; + callback attribute packetMulticastTxCount; + callback attribute packetUnicastRxCount; + callback attribute packetUnicastTxCount; + callback attribute currentMaxRate; + callback attribute overrunCount; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + } + + server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster FixedLabel { + callback attribute labelList; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster UserLabel { + callback attribute labelList; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } +} +endpoint 1 { + device type dimmablelight = 257, version 1; + + server cluster Identify { + ram attribute identifyTime; + ram attribute identifyType; + ram attribute featureMap; + ram attribute clusterRevision default = 4; + } + + server cluster Groups { + ram attribute nameSupport; + ram attribute featureMap; + ram attribute clusterRevision default = 4; + } + + server cluster OnOff { + persist attribute onOff; + ram attribute globalSceneControl default = 0x01; + ram attribute onTime; + ram attribute offWaitTime; + persist attribute startUpOnOff default = 0xFF; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 4; + } + + server cluster LevelControl { + persist attribute currentLevel default = 0x01; + ram attribute remainingTime; + ram attribute minLevel default = 0x01; + ram attribute maxLevel default = 0xFE; + ram attribute currentFrequency; + ram attribute minFrequency; + ram attribute maxFrequency; + ram attribute options; + ram attribute onOffTransitionTime; + ram attribute onLevel default = 0xFF; + ram attribute onTransitionTime; + ram attribute offTransitionTime; + ram attribute defaultMoveRate default = 50; + persist attribute startUpCurrentLevel default = 255; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 5; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap; + callback attribute clusterRevision default = 1; + } + + server cluster ColorControl { + ram attribute currentHue; + ram attribute currentSaturation; + ram attribute remainingTime; + ram attribute currentX default = 0x616B; + ram attribute currentY default = 0x607D; + ram attribute colorTemperatureMireds default = 0x00FA; + ram attribute colorMode default = 0x01; + ram attribute options; + ram attribute numberOfPrimaries; + ram attribute enhancedCurrentHue; + ram attribute enhancedColorMode default = 0x01; + ram attribute colorLoopActive; + ram attribute colorLoopDirection; + ram attribute colorLoopTime default = 0x0019; + ram attribute colorLoopStartEnhancedHue default = 0x2300; + ram attribute colorLoopStoredEnhancedHue; + ram attribute colorCapabilities default = 0x1F; + ram attribute colorTempPhysicalMinMireds; + ram attribute colorTempPhysicalMaxMireds default = 0xFEFF; + ram attribute coupleColorTempToLevelMinMireds; + ram attribute startUpColorTemperatureMireds; + ram attribute featureMap default = 0x1F; + ram attribute clusterRevision default = 5; + } + + server cluster OccupancySensing { + ram attribute occupancy; + ram attribute occupancySensorType; + ram attribute occupancySensorTypeBitmap; + ram attribute featureMap; + ram attribute clusterRevision default = 3; + } +} + + diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap new file mode 100644 index 00000000000000..fc2348e2cee121 --- /dev/null +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap @@ -0,0 +1,8378 @@ +{ + "featureLevel": 94, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "name": "MA-rootdevice", + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "switch type", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "switch actions", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "XX", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OTAUpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StateTransition", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "VersionApplied", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "DownloadError", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "en-US", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "HourFormatEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "CalendarTypeEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 0, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationType", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationType", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatus", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "HardwareFaultChange", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "RadioFaultChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "NetworkFaultChange", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRole", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouteTable", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChildRoleCount", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouterRoleCount", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRoleCount", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AttachAttemptCount", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionIdChangeCount", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BetterPartitionAttachAttemptCount", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ParentChangeCount", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxTotalCount", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxUnicastCount", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBroadcastCount", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckRequestedCount", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckedCount", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxNoAckRequestedCount", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataCount", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataPollCount", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconCount", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconRequestCount", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxOtherCount", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxRetryCount", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCcaCount", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrAbortCount", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrBusyChannelCount", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxTotalCount", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxUnicastCount", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBroadcastCount", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataCount", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataPollCount", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconCount", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconRequestCount", + "code": 45, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxOtherCount", + "code": 46, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxAddressFilteredCount", + "code": 47, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDestAddrFilteredCount", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDuplicatedCount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrNoFrameCount", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrUnknownNeighborCount", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrInvalidSrcAddrCount", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrSecCount", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrFcsCount", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrOtherCount", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelPage0Mask", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x000F", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 1, + "bounded": 1, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "PHYRate", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PHYRateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FullDuplex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketRxCount", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketTxCount", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCount", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CollisionCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSinceReset", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "name": "MA-dimmablelight", + "deviceTypeName": "MA-dimmablelight", + "deviceTypeCode": 257, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedAddScene", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedViewScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CopyScene", + "code": 66, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "OffWithEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "OnWithRecallGlobalScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "OnWithTimedOff", + "code": 66, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MinLevel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentFrequency", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinFrequency", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxFrequency", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "LevelControlOptions", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OnOffTransitionTime", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnLevel", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTransitionTime", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffTransitionTime", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultMoveRate", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "50", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "255", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "XX", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToHue", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToColor", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColor", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColor", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColorTemperature", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedMoveToHue", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedMoveHue", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedStepHue", + "code": 66, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "EnhancedMoveToHueAndSaturation", + "code": 67, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ColorLoopSet", + "code": 68, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopMoveStep", + "code": 71, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveColorTemperature", + "code": 75, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepColorTemperature", + "code": 76, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "CurrentHue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentSaturation", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentX", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x616B", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentY", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x607D", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DriftCompensation", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CompensationText", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorTemperatureMireds", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00FA", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorMode", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NumberOfPrimaries", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Primary1X", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Y", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Intensity", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2X", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Y", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Intensity", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3X", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Y", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Intensity", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4X", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Y", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Intensity", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5X", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Y", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Intensity", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6X", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Y", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Intensity", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointX", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointY", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRX", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRY", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRIntensity", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGX", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGY", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGIntensity", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBX", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBY", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBIntensity", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedCurrentHue", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "EnhancedColorMode", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopActive", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopDirection", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopTime", + "code": 16388, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0019", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopStartEnhancedHue", + "code": 16389, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x2300", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorLoopStoredEnhancedHue", + "code": 16390, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorCapabilities", + "code": 16394, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1F", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMinMireds", + "code": 16395, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMaxMireds", + "code": 16396, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFEFF", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CoupleColorTempToLevelMinMireds", + "code": 16397, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartUpColorTemperatureMireds", + "code": 16400, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1F", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Occupancy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "OccupancyBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 22 + }, + { + "endpointTypeName": "MA-dimmablelight", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 257 + } + ], + "log": [] +} \ No newline at end of file From ca5deb3b8ed102b9ae672eacc7962b781019d265 Mon Sep 17 00:00:00 2001 From: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Date: Fri, 31 Mar 2023 06:34:02 +1300 Subject: [PATCH 036/158] Make restyle-diff pick a better base to restyle against (#25887) - Default to upstream/master if upstream exists - Use --merge-base to restrict to files changes on current branch --- scripts/helpers/restyle-diff.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/helpers/restyle-diff.sh b/scripts/helpers/restyle-diff.sh index bf428dc1ea7a17..6b5f25cd259400 100755 --- a/scripts/helpers/restyle-diff.sh +++ b/scripts/helpers/restyle-diff.sh @@ -23,7 +23,7 @@ # Usage: # restyle-diff.sh [ref] # -# if unspecified, ref defaults to "master" +# if unspecified, ref defaults to upstream/master (or master) # here=${0%/*} @@ -31,6 +31,7 @@ here=${0%/*} set -e CHIP_ROOT=$(cd "$here/../.." && pwd) +cd "$CHIP_ROOT" restyle-paths() { if hash restyle-path 2>/dev/null; then @@ -41,7 +42,11 @@ restyle-paths() { fi } -cd "$CHIP_ROOT" -declare -a paths="($(git diff --ignore-submodules --name-only "${1:-master}"))" +ref="$1" +if [[ -z "$ref" ]]; then + ref="master" + git remote | grep -qxF upstream && ref="upstream/master" +fi +declare -a paths="($(git diff --ignore-submodules --name-only --merge-base "$ref"))" restyle-paths "${paths[@]}" From f7977bcb6e745c3db115c9432801fe2c16cd030d Mon Sep 17 00:00:00 2001 From: Matthew Swartwout Date: Thu, 30 Mar 2023 10:37:22 -0700 Subject: [PATCH 037/158] Update Android SDK to 26 (#25856) * Remove support for Android versions less than 24 Matter requires RIO, which is not supported on versions < 26. * Raise Android API version from 21 to 26 * Use 0.6.51 vscode image for android builds --------- Co-authored-by: Andrei Litvin --- .github/workflows/full-android.yaml | 2 +- .github/workflows/smoketest-android.yaml | 2 +- build/config/android/config.gni | 2 +- examples/tv-app/android/BUILD.gn | 4 +- examples/tv-casting-app/android/BUILD.gn | 4 +- gn_build.sh | 2 +- integrations/cloudbuild/build-all.yaml | 6 +- integrations/cloudbuild/chef.yaml | 6 +- integrations/cloudbuild/smoke-test.yaml | 14 +-- src/app/server/java/BUILD.gn | 4 +- src/controller/java/BUILD.gn | 8 +- src/inet/InetInterface.cpp | 145 ----------------------- src/messaging/tests/java/BUILD.gn | 4 +- src/platform/android/BUILD.gn | 2 +- src/setup_payload/java/BUILD.gn | 2 +- 15 files changed, 31 insertions(+), 176 deletions(-) diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index d28d3fb1679b2d..886a9462de9673 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-android:0.6.47 + image: connectedhomeip/chip-build-android:0.6.51 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index 90987df038cb79..3664cc46aa9de1 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-android:0.6.47 + image: connectedhomeip/chip-build-android:0.6.51 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/build/config/android/config.gni b/build/config/android/config.gni index 508543144bc0f0..ca2b0afc9a8171 100644 --- a/build/config/android/config.gni +++ b/build/config/android/config.gni @@ -20,5 +20,5 @@ declare_args() { android_ndk_root = "" # Version of the Android SDK. - android_sdk_version = 21 + android_sdk_version = 26 } diff --git a/examples/tv-app/android/BUILD.gn b/examples/tv-app/android/BUILD.gn index 9d4993c89e2d2d..b414dd4d593746 100644 --- a/examples/tv-app/android/BUILD.gn +++ b/examples/tv-app/android/BUILD.gn @@ -151,11 +151,11 @@ android_library("java") { javac_flags = [ "-Xlint:deprecation" ] # TODO: add classpath support (we likely need to add something like - # ..../platforms/android-21/android.jar to access BLE items) + # ..../platforms/android-26/android.jar to access BLE items) } java_prebuilt("android") { - jar_path = "${android_sdk_root}/platforms/android-21/android.jar" + jar_path = "${android_sdk_root}/platforms/android-26/android.jar" } group("default") { diff --git a/examples/tv-casting-app/android/BUILD.gn b/examples/tv-casting-app/android/BUILD.gn index 033ff3aff14e53..35a77c84e027f3 100644 --- a/examples/tv-casting-app/android/BUILD.gn +++ b/examples/tv-casting-app/android/BUILD.gn @@ -86,11 +86,11 @@ android_library("java") { javac_flags = [ "-Xlint:deprecation" ] # TODO: add classpath support (we likely need to add something like - # ..../platforms/android-21/android.jar to access BLE items) + # ..../platforms/android-26/android.jar to access BLE items) } java_prebuilt("android") { - jar_path = "${android_sdk_root}/platforms/android-21/android.jar" + jar_path = "${android_sdk_root}/platforms/android-26/android.jar" } group("default") { diff --git a/gn_build.sh b/gn_build.sh index 18473f34f6d517..9f6c76571da593 100755 --- a/gn_build.sh +++ b/gn_build.sh @@ -126,7 +126,7 @@ else echo echo "Hint: Set \$ANDROID_HOME and \$ANDROID_NDK_HOME to enable building for Android" echo " The required android sdk platform version is 21. It can be obtained from" - echo " https://dl.google.com/android/repository/android-21_r02.zip" + echo " https://dl.google.com/android/repository/platform-26_r02.zip" fi echo diff --git a/integrations/cloudbuild/build-all.yaml b/integrations/cloudbuild/build-all.yaml index 09a7f34edda33f..8bee7b8b446e88 100644 --- a/integrations/cloudbuild/build-all.yaml +++ b/integrations/cloudbuild/build-all.yaml @@ -6,7 +6,7 @@ steps: - "--init" - "--recursive" id: Submodules - - name: "connectedhomeip/chip-build-vscode:0.6.48" + - name: "connectedhomeip/chip-build-vscode:0.6.51" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -21,7 +21,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.6.48" + - name: "connectedhomeip/chip-build-vscode:0.6.51" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -76,7 +76,7 @@ steps: --target k32w-shell build --create-archives /workspace/artifacts/ - - name: "connectedhomeip/chip-build-vscode:0.6.48" + - name: "connectedhomeip/chip-build-vscode:0.6.51" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index a2b209ebf1fc94..576b1e128aae96 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.6.48" + - name: "connectedhomeip/chip-build-vscode:0.6.51" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 2700s - - name: "connectedhomeip/chip-build-vscode:0.6.48" + - name: "connectedhomeip/chip-build-vscode:0.6.51" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -26,7 +26,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.6.48" + - name: "connectedhomeip/chip-build-vscode:0.6.51" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 25232f3d742ab1..77c6c02ca7695d 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.6.48" + - name: "connectedhomeip/chip-build-vscode:0.6.51" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" git submodule update --init --recursive id: Submodules - - name: "connectedhomeip/chip-build-vscode:0.6.48" + - name: "connectedhomeip/chip-build-vscode:0.6.51" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -22,7 +22,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.6.48" + - name: "connectedhomeip/chip-build-vscode:0.6.51" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -41,7 +41,7 @@ steps: volumes: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.6.48" + - name: "connectedhomeip/chip-build-vscode:0.6.51" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -62,7 +62,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.6.48" + - name: "connectedhomeip/chip-build-vscode:0.6.51" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -84,7 +84,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.6.48" + - name: "connectedhomeip/chip-build-vscode:0.6.51" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -144,7 +144,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.6.48" + - name: "connectedhomeip/chip-build-vscode:0.6.51" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/src/app/server/java/BUILD.gn b/src/app/server/java/BUILD.gn index fa3a49f8be2737..a99d98ebb842fd 100644 --- a/src/app/server/java/BUILD.gn +++ b/src/app/server/java/BUILD.gn @@ -70,9 +70,9 @@ android_library("java") { javac_flags = [ "-Xlint:deprecation" ] # TODO: add classpath support (we likely need to add something like - # ..../platforms/android-21/android.jar to access BLE items) + # ..../platforms/android-26/android.jar to access BLE items) } java_prebuilt("android") { - jar_path = "${android_sdk_root}/platforms/android-21/android.jar" + jar_path = "${android_sdk_root}/platforms/android-26/android.jar" } diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index ce113422854bcb..60427564a26525 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -286,7 +286,7 @@ android_library("java") { ] # TODO: add classpath support (we likely need to add something like - # ..../platforms/android-21/android.jar to access BLE items) + # ..../platforms/android-26/android.jar to access BLE items) } if (chip_link_tests) { @@ -318,7 +318,7 @@ if (chip_link_tests) { javac_flags = [ "-Xlint:deprecation" ] # TODO: add classpath support (we likely need to add something like - # ..../platforms/android-21/android.jar to access BLE items) + # ..../platforms/android-26/android.jar to access BLE items) } android_library("tests") { @@ -353,12 +353,12 @@ if (chip_link_tests) { javac_flags = [ "-Xlint:deprecation" ] # TODO: add classpath support (we likely need to add something like - # ..../platforms/android-21/android.jar to access BLE items) + # ..../platforms/android-26/android.jar to access BLE items) } } if (!build_java_matter_controller) { java_prebuilt("android") { - jar_path = "${android_sdk_root}/platforms/android-21/android.jar" + jar_path = "${android_sdk_root}/platforms/android-26/android.jar" } } diff --git a/src/inet/InetInterface.cpp b/src/inet/InetInterface.cpp index 88c2176f9bb32c..7c09c9f12edd61 100644 --- a/src/inet/InetInterface.cpp +++ b/src/inet/InetInterface.cpp @@ -507,143 +507,6 @@ void CloseIOCTLSocket() } } -#if __ANDROID__ && __ANDROID_API__ < 24 - -static struct if_nameindex * backport_if_nameindex(void); -static void backport_if_freenameindex(struct if_nameindex *); - -static void backport_if_freenameindex(struct if_nameindex * inArray) -{ - if (inArray == NULL) - { - return; - } - - for (size_t i = 0; inArray[i].if_index != 0; i++) - { - if (inArray[i].if_name != NULL) - { - Platform::MemoryFree(inArray[i].if_name); - } - } - - Platform::MemoryFree(inArray); -} - -static struct if_nameindex * backport_if_nameindex(void) -{ - int err; - unsigned index; - size_t intfIter = 0; - size_t maxIntfNum = 0; - size_t numIntf = 0; - size_t numAddrs = 0; - struct if_nameindex * retval = NULL; - struct if_nameindex * tmpval = NULL; - struct ifaddrs * addrList = NULL; - struct ifaddrs * addrIter = NULL; - const char * lastIntfName = ""; - - err = getifaddrs(&addrList); - VerifyOrExit(err >= 0, ); - - // coalesce on consecutive interface names - for (addrIter = addrList; addrIter != NULL; addrIter = addrIter->ifa_next) - { - numAddrs++; - if (strcmp(addrIter->ifa_name, lastIntfName) == 0) - { - continue; - } - numIntf++; - lastIntfName = addrIter->ifa_name; - } - - tmpval = (struct if_nameindex *) Platform::MemoryAlloc((numIntf + 1) * sizeof(struct if_nameindex)); - VerifyOrExit(tmpval != NULL, ); - memset(tmpval, 0, (numIntf + 1) * sizeof(struct if_nameindex)); - - lastIntfName = ""; - for (addrIter = addrList; addrIter != NULL; addrIter = addrIter->ifa_next) - { - if (strcmp(addrIter->ifa_name, lastIntfName) == 0) - { - continue; - } - - index = if_nametoindex(addrIter->ifa_name); - if (index != 0) - { - tmpval[intfIter].if_index = index; - tmpval[intfIter].if_name = strdup(addrIter->ifa_name); - intfIter++; - } - lastIntfName = addrIter->ifa_name; - } - - // coalesce on interface index - maxIntfNum = 0; - for (size_t i = 0; tmpval[i].if_index != 0; i++) - { - if (maxIntfNum < tmpval[i].if_index) - { - maxIntfNum = tmpval[i].if_index; - } - } - - retval = (struct if_nameindex *) Platform::MemoryAlloc((maxIntfNum + 1) * sizeof(struct if_nameindex)); - VerifyOrExit(retval != NULL, ); - memset(retval, 0, (maxIntfNum + 1) * sizeof(struct if_nameindex)); - - for (size_t i = 0; tmpval[i].if_index != 0; i++) - { - struct if_nameindex * intf = &tmpval[i]; - if (retval[intf->if_index - 1].if_index == 0) - { - retval[intf->if_index - 1] = *intf; - } - else - { - free(intf->if_name); - intf->if_index = 0; - intf->if_name = 0; - } - } - - intfIter = 0; - - // coalesce potential gaps between indeces - for (size_t i = 0; i < maxIntfNum; i++) - { - if (retval[i].if_index != 0) - { - retval[intfIter] = retval[i]; - intfIter++; - } - } - - for (size_t i = intfIter; i < maxIntfNum; i++) - { - retval[i].if_index = 0; - retval[i].if_name = NULL; - } - -exit: - if (tmpval != NULL) - { - Platform::MemoryFree(tmpval); - } - - if (addrList != NULL) - { - freeifaddrs(addrList); - } - - return retval; -} - -#endif // __ANDROID__ && __ANDROID_API__ < 24 - InterfaceIterator::InterfaceIterator() { mIntfArray = nullptr; @@ -656,11 +519,7 @@ InterfaceIterator::~InterfaceIterator() { if (mIntfArray != nullptr) { -#if __ANDROID__ && __ANDROID_API__ < 24 - backport_if_freenameindex(mIntfArray); -#else if_freenameindex(mIntfArray); -#endif mIntfArray = nullptr; } } @@ -674,11 +533,7 @@ bool InterfaceIterator::Next() { if (mIntfArray == nullptr) { -#if __ANDROID__ && __ANDROID_API__ < 24 - mIntfArray = backport_if_nameindex(); -#else mIntfArray = if_nameindex(); -#endif } else if (mIntfArray[mCurIntf].if_index != 0) { diff --git a/src/messaging/tests/java/BUILD.gn b/src/messaging/tests/java/BUILD.gn index 59030145309dec..25c9b950200efd 100644 --- a/src/messaging/tests/java/BUILD.gn +++ b/src/messaging/tests/java/BUILD.gn @@ -70,11 +70,11 @@ android_library("java") { javac_flags = [ "-Xlint:deprecation" ] # TODO: add classpath support (we likely need to add something like - # ..../platforms/android-21/android.jar to access BLE items) + # ..../platforms/android-26/android.jar to access BLE items) } if (!build_java_matter_controller) { java_prebuilt("android") { - jar_path = "${android_sdk_root}/platforms/android-21/android.jar" + jar_path = "${android_sdk_root}/platforms/android-26/android.jar" } } diff --git a/src/platform/android/BUILD.gn b/src/platform/android/BUILD.gn index 3611db0267e841..8c49d86050aa87 100644 --- a/src/platform/android/BUILD.gn +++ b/src/platform/android/BUILD.gn @@ -105,5 +105,5 @@ android_library("java") { } java_prebuilt("android_sdk") { - jar_path = "${android_sdk_root}/platforms/android-21/android.jar" + jar_path = "${android_sdk_root}/platforms/android-26/android.jar" } diff --git a/src/setup_payload/java/BUILD.gn b/src/setup_payload/java/BUILD.gn index fcf690b74ec236..a1c2cb21cfea90 100644 --- a/src/setup_payload/java/BUILD.gn +++ b/src/setup_payload/java/BUILD.gn @@ -60,5 +60,5 @@ android_library("java") { ] # TODO: add classpath support (we likely need to add something like - # ..../platforms/android-21/android.jar to access BLE items) + # ..../platforms/android-26/android.jar to access BLE items) } From 5b54061b99747ec41216520d23a1eb015112f5f2 Mon Sep 17 00:00:00 2001 From: joonhaengHeo <85541460+joonhaengHeo@users.noreply.github.com> Date: Fri, 31 Mar 2023 02:37:49 +0900 Subject: [PATCH 038/158] [Android] Add eventMin parameter (#25204) * Add eventMin parameter * Restyle * Modify space * Modify read dialog string --- .../clusterclient/WildcardFragment.kt | 27 +++- .../app/src/main/res/layout/read_dialog.xml | 30 ++++- .../src/main/res/layout/subscribe_dialog.xml | 12 ++ .../app/src/main/res/values/strings.xml | 2 + .../java/CHIPDeviceController-JNI.cpp | 14 +- .../ChipDeviceController.java | 120 ++++++++++++++++-- 6 files changed, 187 insertions(+), 18 deletions(-) diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt index 83a3ba0eae7cbc..c665adaeb97b47 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt @@ -229,7 +229,7 @@ class WildcardFragment : Fragment() { return stringBuilder.toString() } - private suspend fun subscribe(minInterval: Int, maxInterval: Int, keepSubscriptions: Boolean, isFabricFiltered: Boolean) { + private suspend fun subscribe(minInterval: Int, maxInterval: Int, keepSubscriptions: Boolean, isFabricFiltered: Boolean, eventMin: Long?) { val subscriptionEstablishedCallback = SubscriptionEstablishedCallback { subscriptionId -> @@ -255,17 +255,19 @@ class WildcardFragment : Fragment() { maxInterval, keepSubscriptions, isFabricFiltered, - /* imTimeoutMs= */ 0) + /* imTimeoutMs= */ 0, + eventMin) } - private suspend fun read(isFabricFiltered: Boolean) { + private suspend fun read(isFabricFiltered: Boolean, eventMin: Long?) { deviceController.readPath(reportCallback, ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId), attributePath.ifEmpty { null }, eventPath.ifEmpty { null }, isFabricFiltered, - /* imTimeoutMs= */ 0) + /* imTimeoutMs= */ 0, + eventMin) } private suspend fun write(writeValueType: String, writeValue: String, dataVersion: Int?, timedRequestTimeoutMs: Int, imTimeoutMs: Int) { @@ -336,14 +338,20 @@ class WildcardFragment : Fragment() { return } val dialogView = requireActivity().layoutInflater.inflate(R.layout.read_dialog, null) + val eventMinEd = dialogView.findViewById(R.id.eventMinEd) + eventMinEd.visibility = if (eventPath.isNotEmpty()) { View.VISIBLE } else { View.GONE } val dialog = AlertDialog.Builder(requireContext()).apply { setView(dialogView) }.create() - val isFabricFilteredEd = dialogView.findViewById(R.id.isFabricFilteredSp) + val isFabricFilteredEd = dialogView.findViewById(R.id.isFabricFilteredSp) dialogView.findViewById