From 78a2362ab944417ef4eaf03f6ca96bc5888509c8 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk Date: Thu, 28 Aug 2025 08:22:16 +0200 Subject: [PATCH 1/2] doc: Fixed Matter low power and tx power configuration Added temperature sensor sample entries for low power and tx power configuration pages. Signed-off-by: Kamil Kasperczyk --- .../matter/getting_started/low_power_configuration.rst | 1 + .../matter/getting_started/transmission_power.rst | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/nrf/protocols/matter/getting_started/low_power_configuration.rst b/doc/nrf/protocols/matter/getting_started/low_power_configuration.rst index 0e854f92eb25..2299af3e7e21 100644 --- a/doc/nrf/protocols/matter/getting_started/low_power_configuration.rst +++ b/doc/nrf/protocols/matter/getting_started/low_power_configuration.rst @@ -19,6 +19,7 @@ The following Matter samples and applications use the low power configuration by * :ref:`Matter smoke CO alarm ` * :ref:`Matter window covering sample ` * :ref:`Matter weather station application ` +* :ref:`Matter temperature sensor sample ` The following additional materials and tools might help you to optimize, estimate, and measure the power consumption of your device are: diff --git a/doc/nrf/protocols/matter/getting_started/transmission_power.rst b/doc/nrf/protocols/matter/getting_started/transmission_power.rst index eea547b82fba..4e9264c0fb4b 100644 --- a/doc/nrf/protocols/matter/getting_started/transmission_power.rst +++ b/doc/nrf/protocols/matter/getting_started/transmission_power.rst @@ -88,7 +88,7 @@ The following table lists the default TX power values. | +--------------------------+------------------------------------------------------+-----------------------------------------------------------------+ | | nrf54lm20dk | 8 | 0 | +-------------------------------------------------------------------------+--------------------------+------------------------------------------------------+-----------------------------------------------------------------+ -| :ref:`Smoke CO Alarm (MTD) ` | nrf52840dk | 0 | 0 | +| :ref:`Smoke CO Alarm (SED) ` | nrf52840dk | 0 | 0 | | +--------------------------+------------------------------------------------------+-----------------------------------------------------------------+ | | nrf5340dk | 0 | 0 | | +--------------------------+------------------------------------------------------+-----------------------------------------------------------------+ @@ -106,6 +106,14 @@ The following table lists the default TX power values. | +--------------------------+------------------------------------------------------+-----------------------------------------------------------------+ | | nrf54lm20dk | 0 | 0 | +-------------------------------------------------------------------------+--------------------------+------------------------------------------------------+-----------------------------------------------------------------+ +| :ref:`Temperature Sensor (SED) ` | nrf52840dk | 0 | 0 | +| +--------------------------+------------------------------------------------------+-----------------------------------------------------------------+ +| | nrf5340dk | 0 | 0 | +| +--------------------------+------------------------------------------------------+-----------------------------------------------------------------+ +| | nrf54l15dk | 0 | 0 | +| +--------------------------+------------------------------------------------------+-----------------------------------------------------------------+ +| | nrf54lm20dk | 0 | 0 | ++-------------------------------------------------------------------------+--------------------------+------------------------------------------------------+-----------------------------------------------------------------+ .. _ug_matter_gs_transmission_power_thread: From e1f673c0517f7c5ac0d9b79225baf06cc1d7b29d Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk Date: Thu, 28 Aug 2025 13:08:44 +0200 Subject: [PATCH 2/2] samples: matter: Added contact sensor sample Added new Matter sample - contact sensor. Updated also documentation and .yaml test configurations. Introduced several fixes for the configuration recommended during code review. Signed-off-by: Kamil Kasperczyk --- .../images/matter_qr_code_contact_sensor.png | Bin 0 -> 549 bytes .../low_power_configuration.rst | 1 + .../getting_started/transmission_power.rst | 8 + .../releases/release-notes-changelog.rst | 6 +- doc/nrf/samples/matter.rst | 9 + samples/matter/common/src/zap_samples.yml | 4 + samples/matter/contact_sensor/CMakeLists.txt | 38 + samples/matter/contact_sensor/Kconfig | 35 + .../matter/contact_sensor/Kconfig.sysbuild | 77 + samples/matter/contact_sensor/README.rst | 332 ++ samples/matter/contact_sensor/VERSION | 5 + .../boards/nrf52840dk_nrf52840.overlay | 36 + .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 35 + .../boards/nrf54l15dk_nrf54l15_cpuapp.overlay | 40 + .../nrf54lm20dk_nrf54lm20a_cpuapp.overlay | 34 + ...rf54lm20dk_nrf54lm20a_cpuapp_internal.conf | 8 + ...4lm20dk_nrf54lm20a_cpuapp_internal.overlay | 30 + .../pm_static_nrf52840dk_nrf52840.yml | 42 + .../pm_static_nrf5340dk_nrf5340_cpuapp.yml | 56 + .../pm_static_nrf54l15dk_nrf54l15_cpuapp.yml | 56 + ...m_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml | 56 + ...nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml | 52 + samples/matter/contact_sensor/prj.conf | 48 + .../matter/contact_sensor/prj_release.conf | 68 + samples/matter/contact_sensor/sample.yaml | 38 + .../matter/contact_sensor/src/app_task.cpp | 103 + samples/matter/contact_sensor/src/app_task.h | 33 + .../contact_sensor/src/chip_project_config.h | 16 + .../src/default_zap/contact_sensor.matter | 2480 +++++++++ .../src/default_zap/contact_sensor.zap | 4690 +++++++++++++++++ .../zap-generated/IMClusterCommandHandler.cpp | 546 ++ .../PluginApplicationCallbacks.h | 57 + .../src/default_zap/zap-generated/access.h | 251 + .../zap-generated/callback-stub.cpp | 180 + .../zap-generated/endpoint_config.h | 929 ++++ .../default_zap/zap-generated/gen_config.h | 452 ++ samples/matter/contact_sensor/src/main.cpp | 19 + samples/matter/contact_sensor/sysbuild.conf | 7 + .../boards/nrf5340dk_nrf5340_cpunet.conf | 50 + .../sysbuild/ipc_radio/prj.conf | 14 + .../sysbuild/ipc_radio/prj_release.conf | 14 + .../sysbuild/mcuboot/app.overlay | 5 + .../mcuboot/boards/nrf52840dk_nrf52840.conf | 9 + .../boards/nrf52840dk_nrf52840.overlay | 12 + .../boards/nrf5340dk_nrf5340_cpuapp.conf | 9 + .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 17 + .../boards/nrf54l15dk_nrf54l15_cpuapp.conf | 27 + .../boards/nrf54l15dk_nrf54l15_cpuapp.overlay | 25 + .../boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf | 25 + .../nrf54lm20dk_nrf54lm20a_cpuapp.overlay | 25 + ...rf54lm20dk_nrf54lm20a_cpuapp_internal.conf | 30 + ...4lm20dk_nrf54lm20a_cpuapp_internal.overlay | 23 + .../contact_sensor/sysbuild/mcuboot/prj.conf | 42 + .../contact_sensor/sysbuild_internal.conf | 13 + scripts/quarantine_integration.yaml | 6 +- 55 files changed, 11219 insertions(+), 4 deletions(-) create mode 100644 doc/nrf/images/matter_qr_code_contact_sensor.png create mode 100644 samples/matter/contact_sensor/CMakeLists.txt create mode 100644 samples/matter/contact_sensor/Kconfig create mode 100644 samples/matter/contact_sensor/Kconfig.sysbuild create mode 100644 samples/matter/contact_sensor/README.rst create mode 100644 samples/matter/contact_sensor/VERSION create mode 100644 samples/matter/contact_sensor/boards/nrf52840dk_nrf52840.overlay create mode 100644 samples/matter/contact_sensor/boards/nrf5340dk_nrf5340_cpuapp.overlay create mode 100644 samples/matter/contact_sensor/boards/nrf54l15dk_nrf54l15_cpuapp.overlay create mode 100644 samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay create mode 100644 samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf create mode 100644 samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay create mode 100644 samples/matter/contact_sensor/pm_static_nrf52840dk_nrf52840.yml create mode 100644 samples/matter/contact_sensor/pm_static_nrf5340dk_nrf5340_cpuapp.yml create mode 100644 samples/matter/contact_sensor/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml create mode 100644 samples/matter/contact_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml create mode 100644 samples/matter/contact_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml create mode 100644 samples/matter/contact_sensor/prj.conf create mode 100644 samples/matter/contact_sensor/prj_release.conf create mode 100644 samples/matter/contact_sensor/sample.yaml create mode 100644 samples/matter/contact_sensor/src/app_task.cpp create mode 100644 samples/matter/contact_sensor/src/app_task.h create mode 100644 samples/matter/contact_sensor/src/chip_project_config.h create mode 100644 samples/matter/contact_sensor/src/default_zap/contact_sensor.matter create mode 100644 samples/matter/contact_sensor/src/default_zap/contact_sensor.zap create mode 100644 samples/matter/contact_sensor/src/default_zap/zap-generated/IMClusterCommandHandler.cpp create mode 100644 samples/matter/contact_sensor/src/default_zap/zap-generated/PluginApplicationCallbacks.h create mode 100644 samples/matter/contact_sensor/src/default_zap/zap-generated/access.h create mode 100644 samples/matter/contact_sensor/src/default_zap/zap-generated/callback-stub.cpp create mode 100644 samples/matter/contact_sensor/src/default_zap/zap-generated/endpoint_config.h create mode 100644 samples/matter/contact_sensor/src/default_zap/zap-generated/gen_config.h create mode 100644 samples/matter/contact_sensor/src/main.cpp create mode 100644 samples/matter/contact_sensor/sysbuild.conf create mode 100644 samples/matter/contact_sensor/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf create mode 100644 samples/matter/contact_sensor/sysbuild/ipc_radio/prj.conf create mode 100644 samples/matter/contact_sensor/sysbuild/ipc_radio/prj_release.conf create mode 100644 samples/matter/contact_sensor/sysbuild/mcuboot/app.overlay create mode 100644 samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf create mode 100644 samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay create mode 100644 samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf create mode 100644 samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay create mode 100644 samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf create mode 100644 samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay create mode 100644 samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf create mode 100644 samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay create mode 100644 samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf create mode 100644 samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay create mode 100644 samples/matter/contact_sensor/sysbuild/mcuboot/prj.conf create mode 100644 samples/matter/contact_sensor/sysbuild_internal.conf diff --git a/doc/nrf/images/matter_qr_code_contact_sensor.png b/doc/nrf/images/matter_qr_code_contact_sensor.png new file mode 100644 index 0000000000000000000000000000000000000000..22a4b8f6f612d698771e444b843dcc1156a2d8ee GIT binary patch literal 549 zcmV+=0^0qFP)00Bw?00000Q&KCa0005(NklZysGB86sRJ}P%La!(3p+{IG&7_IQssrTio;uc5VEB&69;4Z zag+o{9d*=EM;$#AwHg{5;}ufKP?mV@E+5o^@??vfu##F{HudQ~__1&6#h+{^u zm`Z`M7=(`%dAn9eS2X19@#+NO)1=f%N}W%~jiI{rpfO}%HiP+EbL2N+ODL+5OD6~+ z*HJ5$f7O1{_;#(1vO9qqOQJgQXc2n08bf31M7*y(;mA@vc%r+y4WXNtkuid>sBP$~ zjp0RS3UKuKn=mHIyQML##}Xm?P1p>&bs06*wj#4%f}X9m(0zBTTMuS-)oyLraJm3T zk43GhvOBJ2B_(QY#pJcs4*K|Rb!FZEb-$0#TTP>#%z7xMQ&h%=*9vg-I2tkN$94kLURuxx4kG~#%k07swB*1ka2 ndJ>Qk_{PLhM;&$4(RR?^a!?_a!l2aW00000NkvXXu0mjfm16*M literal 0 HcmV?d00001 diff --git a/doc/nrf/protocols/matter/getting_started/low_power_configuration.rst b/doc/nrf/protocols/matter/getting_started/low_power_configuration.rst index 2299af3e7e21..4142b328feab 100644 --- a/doc/nrf/protocols/matter/getting_started/low_power_configuration.rst +++ b/doc/nrf/protocols/matter/getting_started/low_power_configuration.rst @@ -20,6 +20,7 @@ The following Matter samples and applications use the low power configuration by * :ref:`Matter window covering sample ` * :ref:`Matter weather station application ` * :ref:`Matter temperature sensor sample ` +* :ref:`Matter contact sensor sample ` The following additional materials and tools might help you to optimize, estimate, and measure the power consumption of your device are: diff --git a/doc/nrf/protocols/matter/getting_started/transmission_power.rst b/doc/nrf/protocols/matter/getting_started/transmission_power.rst index 4e9264c0fb4b..b929c6097e66 100644 --- a/doc/nrf/protocols/matter/getting_started/transmission_power.rst +++ b/doc/nrf/protocols/matter/getting_started/transmission_power.rst @@ -114,6 +114,14 @@ The following table lists the default TX power values. | +--------------------------+------------------------------------------------------+-----------------------------------------------------------------+ | | nrf54lm20dk | 0 | 0 | +-------------------------------------------------------------------------+--------------------------+------------------------------------------------------+-----------------------------------------------------------------+ +| :ref:`Contact Sensor (SED) ` | nrf52840dk | 0 | 0 | +| +--------------------------+------------------------------------------------------+-----------------------------------------------------------------+ +| | nrf5340dk | 0 | 0 | +| +--------------------------+------------------------------------------------------+-----------------------------------------------------------------+ +| | nrf54l15dk | 0 | 0 | +| +--------------------------+------------------------------------------------------+-----------------------------------------------------------------+ +| | nrf54lm20dk | 0 | 0 | ++-------------------------------------------------------------------------+--------------------------+------------------------------------------------------+-----------------------------------------------------------------+ .. _ug_matter_gs_transmission_power_thread: diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst index 22282b34755c..2a02b0d4858b 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst @@ -396,7 +396,11 @@ Keys samples Matter samples -------------- -* Added the :ref:`matter_temperature_sensor_sample` sample that demonstrates how to implement and test a Matter temperature sensor device. +* Added: + + * The :ref:`matter_temperature_sensor_sample` sample that demonstrates how to implement and test a Matter temperature sensor device. + * The :ref:`matter_contact_sensor_sample` sample that demonstrates how to implement and test a Matter contact sensor device. + * Updated all Matter over Wi-Fi samples and applications to store a portion of the application code related to the nRF70 Series Wi-Fi firmware in the external flash memory by default. This change breaks the DFU between the previous |NCS| versions and the |NCS| v3.2.0. To fix this, you need to disable storing the Wi-Fi firmware patch in external memory. diff --git a/doc/nrf/samples/matter.rst b/doc/nrf/samples/matter.rst index 9777510989bc..bfc6f94b3314 100644 --- a/doc/nrf/samples/matter.rst +++ b/doc/nrf/samples/matter.rst @@ -21,6 +21,7 @@ The following table lists variants and extensions available out of the box for e - Thermostat - Smoke CO alarm - Temperature sensor + - Contact sensor * - FEM support - ✔ - ✔ @@ -30,6 +31,7 @@ The following table lists variants and extensions available out of the box for e - - - + - * - DFU support - ✔ - ✔ @@ -39,6 +41,7 @@ The following table lists variants and extensions available out of the box for e - ✔ - ✔ - ✔ + - ✔ * - Thread support - ✔ - ✔ @@ -48,6 +51,7 @@ The following table lists variants and extensions available out of the box for e - ✔ - ✔ - ✔ + - ✔ * - :ref:`Thread role ` - Router - SED @@ -57,6 +61,7 @@ The following table lists variants and extensions available out of the box for e - MED - SED - SED + - SED * - :ref:`ICD mode ` - Not supported - SIT @@ -66,6 +71,7 @@ The following table lists variants and extensions available out of the box for e - Not supported - LIT - LIT + - LIT * - Wi-Fi® support - ✔ - ✔ @@ -75,6 +81,7 @@ The following table lists variants and extensions available out of the box for e - ✔ - - + - * - Thread and Wi-Fi switching - - @@ -84,6 +91,7 @@ The following table lists variants and extensions available out of the box for e - - - + - * - Low power configuration by default - - ✔ @@ -93,6 +101,7 @@ The following table lists variants and extensions available out of the box for e - - ✔ - ✔ + - ✔ See the sample documentation pages for instructions about how to enable these variants and extensions. diff --git a/samples/matter/common/src/zap_samples.yml b/samples/matter/common/src/zap_samples.yml index 414462f86cc0..d92be9c006a9 100644 --- a/samples/matter/common/src/zap_samples.yml +++ b/samples/matter/common/src/zap_samples.yml @@ -58,3 +58,7 @@ # temperature sensor - name: temperature_sensor zap_file: samples/matter/temperature_sensor/src/default_zap/temperature_sensor.zap + +# contact sensor +- name: contact_sensor + zap_file: samples/matter/contact_sensor/src/default_zap/contact_sensor.zap diff --git a/samples/matter/contact_sensor/CMakeLists.txt b/samples/matter/contact_sensor/CMakeLists.txt new file mode 100644 index 000000000000..4619bd4a2f8f --- /dev/null +++ b/samples/matter/contact_sensor/CMakeLists.txt @@ -0,0 +1,38 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +cmake_minimum_required(VERSION 3.20.0) + +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) + +project(matter-contact-sensor) + +# Enable GNU STD support. +include(${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/config/nrfconnect/app/enable-gnu-std.cmake) + +# NORDIC SDK APP START + +# Include all source files that are located in the Matter common directory. +include(${ZEPHYR_NRF_MODULE_DIR}/samples/matter/common/cmake/source_common.cmake) + +# Include Data Model utils +include(${ZEPHYR_NRF_MODULE_DIR}/samples/matter/common/cmake/data_model.cmake) + +include(${ZEPHYR_NRF_MODULE_DIR}/samples/matter/common/cmake/zap_helpers.cmake) +ncs_get_zap_parent_dir(ZAP_PARENT_DIR) + +target_include_directories(app PRIVATE + src + ${ZAP_PARENT_DIR} +) + +target_sources(app PRIVATE + src/app_task.cpp + src/main.cpp +) + +ncs_configure_data_model() +# NORDIC SDK APP END diff --git a/samples/matter/contact_sensor/Kconfig b/samples/matter/contact_sensor/Kconfig new file mode 100644 index 000000000000..67ba31a1ac4d --- /dev/null +++ b/samples/matter/contact_sensor/Kconfig @@ -0,0 +1,35 @@ +# +# Copyright (c) 2025 Nordic Semiconductor +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# +mainmenu "Matter nRF Connect Contact Sensor Example Application" + +choice OPENTHREAD_NORDIC_LIBRARY_CONFIGURATION + default OPENTHREAD_NORDIC_LIBRARY_MTD +endchoice + +choice OPENTHREAD_DEVICE_TYPE + default OPENTHREAD_MTD +endchoice + +config CHIP_ENABLE_ICD_SUPPORT + default y + +config CHIP_ICD_LIT_SUPPORT + default y + +config CHIP_ICD_SIT_SLOW_POLL_LIMIT + default 5000 + +config CHIP_ICD_REPORT_ON_ACTIVE_MODE + default y + +# Reduce Thread TX output power to 0 dBm for SED device +config OPENTHREAD_DEFAULT_TX_POWER + default 0 + +source "$(ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR)/config/nrfconnect/chip-module/Kconfig.features" +source "$(ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR)/config/nrfconnect/chip-module/Kconfig.defaults" +source "$(ZEPHYR_NRF_MODULE_DIR)/samples/matter/common/src/Kconfig" +source "Kconfig.zephyr" diff --git a/samples/matter/contact_sensor/Kconfig.sysbuild b/samples/matter/contact_sensor/Kconfig.sysbuild new file mode 100644 index 000000000000..be1d23576ade --- /dev/null +++ b/samples/matter/contact_sensor/Kconfig.sysbuild @@ -0,0 +1,77 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +#### Radio core selection +config NRF_DEFAULT_IPC_RADIO + default y + +# Enable IEEE802.15.4 serialization to network core +# This config automatically pulls in the `overlay-802154.conf` in the ipc_radio image +config NETCORE_IPC_RADIO_IEEE802154 + default y if SOC_SERIES_NRF53X + +# Enable Bluetooth serialization to network core +# This config automatically pulls in the `overlay-bt_hci_ipc.conf` in the ipc_radio image +config NETCORE_IPC_RADIO_BT_HCI_IPC + default y if SOC_SERIES_NRF53X + +#### Bootloader +choice BOOTLOADER + default BOOTLOADER_MCUBOOT +endchoice + +if BOOTLOADER_MCUBOOT + +#### DFU multi-image support +config DFU_MULTI_IMAGE_PACKAGE_BUILD + default y + +config DFU_MULTI_IMAGE_PACKAGE_APP + default y + +config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY + default y + +#### DFU network core configuration +if SOC_SERIES_NRF53X + +config MCUBOOT_UPDATEABLE_IMAGES + default 2 + +choice MCUBOOT_MODE + default MCUBOOT_MODE_OVERWRITE_ONLY +endchoice + +choice BOOT_SIGNATURE_TYPE + default BOOT_SIGNATURE_TYPE_RSA +endchoice + +config SECURE_BOOT_NETCORE + default y + +config NETCORE_APP_UPDATE + default y + +config DFU_MULTI_IMAGE_PACKAGE_NET + default y + +endif # SOC_SERIES_NRF53X + +if BOARD_NRF54L15DK || BOARD_NRF54LM20DK + +# Disable checking the external drivers for nRF54L15 and nRF54LM20 DKs. +config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK + default y + +endif # BOARD_NRF54L15DK || BOARD_NRF54LM20DK + +endif # BOOTLOADER_MCUBOOT + +#### Enable generating factory data +config MATTER_FACTORY_DATA_GENERATE + default y + +source "share/sysbuild/Kconfig" diff --git a/samples/matter/contact_sensor/README.rst b/samples/matter/contact_sensor/README.rst new file mode 100644 index 000000000000..6da25afc96a6 --- /dev/null +++ b/samples/matter/contact_sensor/README.rst @@ -0,0 +1,332 @@ +.. _matter_contact_sensor_sample: + +Matter: Contact sensor +###################### + +.. contents:: + :local: + :depth: 2 + +This sample demonstrates how to use the :ref:`Matter ` application layer to build a device capable of detecting a contact. +This device works as a Matter accessory device, meaning it can be paired and controlled remotely over a Matter network built on top of a low-power 802.15.4 Thread network. +You can use this sample as a reference for creating your own application. + +Requirements +************ + +The sample supports the following development kits: + +.. table-from-sample-yaml:: + +If you want to commission the device and :ref:`control it remotely `, you also need a Matter controller device :ref:`configured on PC or mobile `. +This requires additional hardware depending on the setup you choose. + +.. note:: + |matter_gn_required_note| + +Overview +******** + +The sample does not use a real contact sensor due to a hardware limitation. +It simulates contact detection, which you can initiate by pressing and releasing a button. +The contact sensor state is represented by the BooleanState cluster on the endpoint ``1``. + +You can test the device remotely over a Thread network, which requires more devices. + +The remote control testing requires a Matter controller that you can configure either on a PC or a mobile device. +You can enable both methods after :ref:`building and running the sample `. + +.. _matter_contact_sensor_sample_lit: + +ICD LIT device type +=================== + +.. include:: ../smoke_co_alarm/README.rst + :start-after: matter_smoke_co_alarm_sample_lit_start + :end-before: matter_smoke_co_alarm_sample_lit_end + +.. _matter_contact_sensor_network_mode: + +Remote testing in a network +=========================== + +.. |Bluetoothsc| replace:: Bluetooth® +.. |WiFi| replace:: Wi-Fi® + +.. include:: ../light_bulb/README.rst + :start-after: matter_light_bulb_sample_remote_testing_start + :end-before: matter_light_bulb_sample_remote_testing_end + +Configuration +************* + +|config| + +.. _matter_contact_sensor_custom_configs: + +Matter contact sensor custom configurations +=========================================== + +.. include:: ../light_bulb/README.rst + :start-after: matter_light_bulb_sample_configuration_file_types_start + :end-before: matter_light_bulb_sample_configuration_file_types_end + +.. |Bluetooth| replace:: Bluetooth + +.. include:: /includes/advanced_conf_matter.txt + +User interface +************** + +.. tabs:: + + .. group-tab:: nRF52 and nRF53 DKs + + LED 1: + .. include:: /includes/matter_sample_state_led.txt + + LED 2: + Shows the state of the contact detection. + The following states are possible: + + * Solid On - The contact is detected. + * Off - The contact is not detected. + + Additionally, the LED starts blinking evenly (500 ms on/500 ms off) when the ``Identify`` command of the Identify cluster is received on the endpoint ``1``. + You can specify the duration of the effect using the command arguments. + + Button 1: + .. include:: /includes/matter_sample_button.txt + + Button 2: + Simulates contact detection. + Pressing the button sets the contact state to detected. + Releasing the button sets the contact state to not detected. + + Button 3: + Functions as the User Active Mode Trigger (UAT) button. + For more information about Intermittently Connected Devices (ICD) and User Active Mode Trigger, see the :ref:`ug_matter_device_low_power_icd` documentation section. + + .. include:: /includes/matter_segger_usb.txt + + .. group-tab:: nRF54 DKs + + LED 0: + .. include:: /includes/matter_sample_state_led.txt + + LED 1: + Shows the state of the contact detection. + The following states are possible: + + * Solid On - The contact is detected. + * Off - The contact is not detected. + + Additionally, the LED starts blinking evenly (500 ms on/500 ms off) when the ``Identify`` command of the Identify cluster is received on the endpoint ``1``. + You can specify the duration of the effect using the command arguments. + + Button 0: + .. include:: /includes/matter_sample_button.txt + + Button 1: + Simulates contact detection. + Pressing the button sets the contact state to detected. + Releasing the button sets the contact state to not detected. + + Button 2: + Functions as the User Active Mode Trigger (UAT) button. + For more information about Intermittently Connected Devices (ICD) and User Active Mode Trigger, see the :ref:`ug_matter_device_low_power_icd` documentation section. + + .. include:: /includes/matter_segger_usb.txt + + NFC port with antenna attached: + Optionally used for obtaining the `Onboarding information`_ from the Matter accessory device to start the :ref:`commissioning procedure `. + +Building and running +******************** + +.. |sample path| replace:: :file:`samples/matter/contact_sensor` + +.. include:: /includes/build_and_run.txt + +.. |sample_or_app| replace:: sample +.. |ipc_radio_dir| replace:: :file:`sysbuild/ipc_radio` + +.. include:: /includes/ipc_radio_conf.txt + +See `Configuration`_ for information on building the sample with the DFU support. + +Selecting a custom configuration +================================ + +Before you start testing the application, you can select one of the :ref:`matter_contact_sensor_custom_configs`. +See :ref:`app_build_file_suffixes` and :ref:`cmake_options` for more information on how to select a configuration. + +Testing +======= + +After building the sample and programming it to your development kit, complete the following steps to test its basic features. + +.. note:: + The following steps use the CHIP Tool controller as an example. + +.. tabs:: + + .. group-tab:: nRF52 and nRF53 DKs + + #. |connect_kit| + #. |connect_terminal_ANSI| + #. If the device was not erased during the programming, press and hold **Button 1** until the factory reset takes place. + #. Commission the device to the Matter network. + See `Commissioning the device`_ for more information. + #. Read the contact detection state by invoking the following command with the ** and ** replaced with your values (for example, ``1`` and ``1``): + + .. code-block:: console + + ./chip-tool booleanstate read state-value + + The received output will look similar to the following: + + .. code-block:: console + + [1756375237.321] [61118:61120] [TOO] Endpoint: 1 Cluster: 0x0000_0045 Attribute 0x0000_0000 DataVersion: 2772696482 + [1756375237.321] [61118:61120] [TOO] StateValue: FALSE + + + #. Press the **Button 2** to simulate contact detection. + Read the contact detection state again using the same command as before (do not release the button): + + .. code-block:: console + + ./chip-tool booleanstate read state-value + + The received value will be different, for example: + + .. code-block:: console + + [1756375237.321] [61118:61120] [TOO] Endpoint: 1 Cluster: 0x0000_0045 Attribute 0x0000_0000 DataVersion: 2772696482 + [1756375237.321] [61118:61120] [TOO] StateValue: TRUE + + #. Subscribe to the contact detection state changes to see the state change in real time: + + .. code-block:: console + + ./chip-tool booleanstate subscribe state-value 0 300 + + #. Press and release **Button 2** a few times and observe the state changes reported automatically in the CHIP Tool terminal. + + .. group-tab:: nRF54 DKs + + #. |connect_kit| + #. |connect_terminal_ANSI| + #. If the device was not erased during the programming, press and hold **Button 0** until the factory reset takes place. + #. Commission the device to the Matter network. + See `Commissioning the device`_ for more information. + #. Read the contact detection state by invoking the following command with the ** and ** replaced with your values (for example, ``1`` and ``1``): + + .. code-block:: console + + ./chip-tool booleanstate read state-value + + The received output will look similar to the following: + + .. code-block:: console + + [1756375237.321] [61118:61120] [TOO] Endpoint: 1 Cluster: 0x0000_0045 Attribute 0x0000_0000 DataVersion: 2772696482 + [1756375237.321] [61118:61120] [TOO] StateValue: FALSE + + + #. Press the **Button 1** to simulate contact detection. + Read the contact detection state again using the same command as before (do not release the button): + + .. code-block:: console + + ./chip-tool booleanstate read state-value + + The received value will be different, for example: + + .. code-block:: console + + [1756375237.321] [61118:61120] [TOO] Endpoint: 1 Cluster: 0x0000_0045 Attribute 0x0000_0000 DataVersion: 2772696482 + [1756375237.321] [61118:61120] [TOO] StateValue: TRUE + + #. Subscribe to the contact detection state changes to see the state change in real time: + + .. code-block:: console + + ./chip-tool booleanstate subscribe state-value 0 300 + + #. Press and release **Button 1** a few times and observe the state changes reported automatically in the CHIP Tool terminal. + +.. _matter_contact_sensor_sample_remote_control: + +Enabling remote control +======================= + +Remote control allows you to control the Matter contact sensor device from an IPv6 network. + +`Commissioning the device`_ allows you to set up a testing environment and remotely control the sample over a Matter-enabled Thread network. + +.. _matter_contact_sensor_sample_remote_control_commissioning: + +Commissioning the device +------------------------ + +.. include:: ../light_bulb/README.rst + :start-after: matter_light_bulb_sample_commissioning_start + :end-before: matter_light_bulb_sample_commissioning_end + +Before starting the commissioning procedure, make sure that the device is discoverable over Bluetooth LE. +The device is automatically discoverable upon the device startup, but only for a predefined period of time (one hour by default). +If the Bluetooth LE advertising times out, enable it again. + +Onboarding information +++++++++++++++++++++++ + +When you start the commissioning procedure, the controller must get the onboarding information from the Matter accessory device. +The onboarding information representation depends on your commissioner setup. + +For this sample, you can use one of the following :ref:`onboarding information formats ` to provide the commissioner with the data payload that includes the device discriminator and the setup PIN code: + + .. list-table:: Contact Sensor sample onboarding information + :header-rows: 1 + + * - QR Code + - QR Code Payload + - Manual pairing code + * - Scan the following QR code with the app for your ecosystem: + + .. figure:: ../../../doc/nrf/images/matter_qr_code_contact_sensor.png + :width: 200px + :alt: QR code for commissioning the contact sensor device + + - MT:Y.K9042C00KA0648G00 + - 34970112332 + +.. include:: ../lock/README.rst + :start-after: matter_door_lock_sample_onboarding_start + :end-before: matter_door_lock_sample_onboarding_end + +|matter_cd_info_note_for_samples| + +Upgrading the device firmware +============================= + +To upgrade the device firmware, complete the steps listed for the selected method in the :doc:`matter:nrfconnect_examples_software_update` tutorial in the Matter documentation. + +Dependencies +************ + +This sample uses the Matter library that includes the |NCS| platform integration layer: + +* `Matter`_ + +In addition, it uses the following |NCS| components: + +* :ref:`dk_buttons_and_leds_readme` +* :ref:`nfc_uri` +* :ref:`lib_nfc_t2t` + +The sample depends on the following Zephyr libraries: + +* :ref:`zephyr:logging_api` +* :ref:`zephyr:kernel_api` diff --git a/samples/matter/contact_sensor/VERSION b/samples/matter/contact_sensor/VERSION new file mode 100644 index 000000000000..1bdaeb051258 --- /dev/null +++ b/samples/matter/contact_sensor/VERSION @@ -0,0 +1,5 @@ +VERSION_MAJOR = 3 +VERSION_MINOR = 1 +PATCHLEVEL = 99 +VERSION_TWEAK = 0 +EXTRAVERSION = diff --git a/samples/matter/contact_sensor/boards/nrf52840dk_nrf52840.overlay b/samples/matter/contact_sensor/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 000000000000..4022619f59ed --- /dev/null +++ b/samples/matter/contact_sensor/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +/* Disable unused peripherals to reduce power consumption */ +&adc { + status = "disabled"; +}; + +&uart1 { + status = "disabled"; +}; + +&i2c0 { + status = "disabled"; +}; + +&spi1 { + status = "disabled"; +}; + +&spi3 { + status = "disabled"; +}; + +&usbd { + status = "disabled"; +}; diff --git a/samples/matter/contact_sensor/boards/nrf5340dk_nrf5340_cpuapp.overlay b/samples/matter/contact_sensor/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 000000000000..0e81111642c7 --- /dev/null +++ b/samples/matter/contact_sensor/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +/* Set IPC thread priority to the highest value to not collide with other threads. */ +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; +}; + +/* Disable unused peripherals to reduce power consumption */ +&adc { + status = "disabled"; +}; + +&i2c1 { + status = "disabled"; +}; + +&spi2 { + status = "disabled"; +}; + +&usbd { + status = "disabled"; +}; diff --git a/samples/matter/contact_sensor/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/contact_sensor/boards/nrf54l15dk_nrf54l15_cpuapp.overlay new file mode 100644 index 000000000000..4f1550b4a4e0 --- /dev/null +++ b/samples/matter/contact_sensor/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; + + aliases { + /* Use watchdog wdt31 as the application watchdog */ + watchdog0 = &wdt31; + }; +}; + +/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ +&cpuapp_rram { + reg = <0x0 DT_SIZE_K(1524)>; +}; + +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 0x40000>; +}; + +/* TODO: re-enable HWFC once it's fixed */ +&uart20 { + /delete-property/ hw-flow-control; +}; + +&mx25r64 { + status = "okay"; +}; + +&wdt31 { + status = "okay"; +}; diff --git a/samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay new file mode 100644 index 000000000000..19bb7c86900c --- /dev/null +++ b/samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; + + aliases { + /* Use watchdog wdt31 as the application watchdog */ + watchdog0 = &wdt31; + }; +}; + +/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ +&cpuapp_rram { + reg = <0x0 DT_SIZE_K(2036)>; +}; + +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(512)>; + ranges = <0x0 0x20000000 0x80000>; +}; + +&mx25r64 { + status = "okay"; +}; + +&wdt31 { + status = "okay"; +}; diff --git a/samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf b/samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf new file mode 100644 index 000000000000..90b40f506263 --- /dev/null +++ b/samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf @@ -0,0 +1,8 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Disable SPI +CONFIG_CHIP_SPI_NOR=n diff --git a/samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay new file mode 100644 index 000000000000..7cf70262dbf0 --- /dev/null +++ b/samples/matter/contact_sensor/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + aliases { + /* Use watchdog wdt31 as the application watchdog */ + watchdog0 = &wdt31; + }; +}; + +/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ +&cpuapp_rram { + reg = <0x0 DT_SIZE_K(2036)>; +}; + +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(512)>; + ranges = <0x0 0x20000000 0x80000>; +}; + +&mx25r64 { + status = "disabled"; +}; + +&wdt31 { + status = "okay"; +}; diff --git a/samples/matter/contact_sensor/pm_static_nrf52840dk_nrf52840.yml b/samples/matter/contact_sensor/pm_static_nrf52840dk_nrf52840.yml new file mode 100644 index 000000000000..9c4aa3cdcac6 --- /dev/null +++ b/samples/matter/contact_sensor/pm_static_nrf52840dk_nrf52840.yml @@ -0,0 +1,42 @@ +mcuboot: + address: 0x0 + size: 0x7000 + region: flash_primary +mcuboot_pad: + address: 0x7000 + size: 0x200 +app: + address: 0x7200 + size: 0xefe00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x7000 + size: 0xf0000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x7200 + size: 0xefe00 +factory_data: + address: 0xf7000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xf8000 + size: 0x8000 + region: flash_primary +mcuboot_secondary: + address: 0x0 + size: 0xf0000 + device: MX25R64 + region: external_flash +external_flash: + address: 0xf0000 + size: 0x710000 + device: MX25R64 + region: external_flash diff --git a/samples/matter/contact_sensor/pm_static_nrf5340dk_nrf5340_cpuapp.yml b/samples/matter/contact_sensor/pm_static_nrf5340dk_nrf5340_cpuapp.yml new file mode 100644 index 000000000000..3b0873d5ab3c --- /dev/null +++ b/samples/matter/contact_sensor/pm_static_nrf5340dk_nrf5340_cpuapp.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + size: 0x8000 + region: flash_primary +mcuboot_pad: + address: 0x8000 + size: 0x200 +app: + address: 0x8200 + size: 0xeee00 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0x8000 + size: 0xef000 + region: flash_primary +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0x8200 + size: 0xeee00 +factory_data: + address: 0xf7000 + size: 0x1000 + region: flash_primary +settings_storage: + address: 0xf8000 + size: 0x8000 + region: flash_primary +mcuboot_primary_1: + address: 0x0 + size: 0x40000 + device: flash_ctrl + region: ram_flash +mcuboot_secondary: + address: 0x0 + size: 0xef000 + device: MX25R64 + region: external_flash +mcuboot_secondary_1: + address: 0xef000 + size: 0x40000 + device: MX25R64 + region: external_flash +external_flash: + address: 0x12f000 + size: 0x6D1000 + device: MX25R64 + region: external_flash +pcd_sram: + address: 0x20000000 + size: 0x2000 + region: sram_primary diff --git a/samples/matter/contact_sensor/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml b/samples/matter/contact_sensor/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml new file mode 100644 index 000000000000..a8e64916b893 --- /dev/null +++ b/samples/matter/contact_sensor/pm_static_nrf54l15dk_nrf54l15_cpuapp.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + region: flash_primary + size: 0xD000 +mcuboot_pad: + address: 0xD000 + region: flash_primary + size: 0x800 +app: + address: 0xD800 + region: flash_primary + size: 0x164800 +mcuboot_primary: + orig_span: &id001 + - mcuboot_pad + - app + span: *id001 + address: 0xD000 + region: flash_primary + size: 0x165000 +mcuboot_primary_app: + orig_span: &id002 + - app + span: *id002 + address: 0xD800 + region: flash_primary + size: 0x164800 +factory_data: + address: 0x172000 + region: flash_primary + size: 0x1000 +settings_storage: + address: 0x173000 + region: flash_primary + size: 0xA000 +mcuboot_secondary: + address: 0x0 + orig_span: &id003 + - mcuboot_secondary_pad + - mcuboot_secondary_app + region: external_flash + size: 0x165000 + span: *id003 +mcuboot_secondary_pad: + region: external_flash + address: 0x0 + size: 0x800 +mcuboot_secondary_app: + region: external_flash + address: 0x800 + size: 0x164800 +external_flash: + address: 0x165000 + size: 0x69B000 + device: MX25R64 + region: external_flash diff --git a/samples/matter/contact_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml b/samples/matter/contact_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml new file mode 100644 index 000000000000..3e9051d5b84d --- /dev/null +++ b/samples/matter/contact_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml @@ -0,0 +1,56 @@ +mcuboot: + address: 0x0 + region: flash_primary + size: 0xD000 +mcuboot_pad: + address: 0xD000 + region: flash_primary + size: 0x800 +app: + address: 0xD800 + region: flash_primary + size: 0x1E2800 +mcuboot_primary: + address: 0xD000 + orig_span: &id001 + - app + - mcuboot_pad + region: flash_primary + size: 0x1E3000 + span: *id001 +mcuboot_primary_app: + address: 0xD800 + orig_span: &id002 + - app + region: flash_primary + size: 0x1E2800 + span: *id002 +factory_data: + address: 0x1F0000 + region: flash_primary + size: 0x1000 +settings_storage: + address: 0x1F1000 + region: flash_primary + size: 0xC000 +mcuboot_secondary: + address: 0x0 + orig_span: &id003 + - mcuboot_secondary_pad + - mcuboot_secondary_app + region: external_flash + size: 0x1E3000 + span: *id003 +mcuboot_secondary_pad: + region: external_flash + address: 0x0 + size: 0x800 +mcuboot_secondary_app: + region: external_flash + address: 0x800 + size: 0x1E2800 +external_flash: + address: 0x1E3000 + size: 0x5DB000 + device: MX25R64 + region: external_flash diff --git a/samples/matter/contact_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml b/samples/matter/contact_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml new file mode 100644 index 000000000000..028bb179c50e --- /dev/null +++ b/samples/matter/contact_sensor/pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml @@ -0,0 +1,52 @@ +mcuboot: + address: 0x0 + region: flash_primary + size: 0xA000 +mcuboot_pad: + address: 0xA000 + region: flash_primary + size: 0x800 +app: + address: 0xA800 + region: flash_primary + size: 0x125800 +mcuboot_primary: + address: 0xA000 + orig_span: &id001 + - app + - mcuboot_pad + region: flash_primary + size: 0x126000 + span: *id001 +mcuboot_primary_app: + address: 0xA800 + orig_span: &id002 + - app + region: flash_primary + size: 0x125800 + span: *id002 +mcuboot_secondary: + address: 0x130000 + orig_span: &id003 + - mcuboot_secondary_pad + - mcuboot_secondary_app + region: flash_primary + size: 0xC0000 + span: *id003 +mcuboot_secondary_pad: + region: flash_primary + address: 0x130000 + size: 0x800 +# Compression rate 34.75% +mcuboot_secondary_app: + region: flash_primary + address: 0x130800 + size: 0xBF800 +factory_data: + address: 0x1F0000 + region: flash_primary + size: 0x1000 +settings_storage: + address: 0x1F1000 + region: flash_primary + size: 0xC000 diff --git a/samples/matter/contact_sensor/prj.conf b/samples/matter/contact_sensor/prj.conf new file mode 100644 index 000000000000..80e39b2be2af --- /dev/null +++ b/samples/matter/contact_sensor/prj.conf @@ -0,0 +1,48 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Enable CHIP +CONFIG_CHIP=y +CONFIG_CHIP_PROJECT_CONFIG="src/chip_project_config.h" + +# Configure ZAP file name +CONFIG_NCS_SAMPLE_MATTER_ZAP_FILE_PATH="${APPLICATION_CONFIG_DIR}/src/default_zap/contact_sensor.zap" + +# 32768 == 0x8000 (example Product ID added temporaly, +# as there is no assigned PID on the following list: +# https://github.com/project-chip/connectedhomeip/blob/482e6fd03196a6de45465a90003947ef4b86e0b1/docs/examples/discussion/PID_allocation_for_example_apps.md) +CONFIG_CHIP_DEVICE_PRODUCT_ID=32768 +CONFIG_STD_CPP17=y + +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + +# Add support for LEDs and buttons on Nordic development kits +CONFIG_DK_LIBRARY=y + +# Bluetooth Low Energy configuration +CONFIG_BT_DEVICE_NAME="MatterContact" +CONFIG_BT_DEVICE_NAME_MAX=18 + +# Suspend devices when the CPU goes into sleep +CONFIG_PM_DEVICE=y + +# Other settings +CONFIG_THREAD_NAME=y +CONFIG_MPU_STACK_GUARD=y +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_CHIP_LIB_SHELL=y + +# Reduce application size +CONFIG_USE_SEGGER_RTT=n + +# Enable Factory Data feature +CONFIG_CHIP_FACTORY_DATA=y +CONFIG_CHIP_FACTORY_DATA_BUILD=y diff --git a/samples/matter/contact_sensor/prj_release.conf b/samples/matter/contact_sensor/prj_release.conf new file mode 100644 index 000000000000..c6b3df32f258 --- /dev/null +++ b/samples/matter/contact_sensor/prj_release.conf @@ -0,0 +1,68 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Enable CHIP +CONFIG_CHIP=y +CONFIG_CHIP_PROJECT_CONFIG="src/chip_project_config.h" + +# Configure ZAP file name +CONFIG_NCS_SAMPLE_MATTER_ZAP_FILE_PATH="${APPLICATION_CONFIG_DIR}/src/default_zap/contact_sensor.zap" + +# 32768 == 0x8000 (example Product ID added temporaly, +# as there is no assigned PID on the following list: +# https://github.com/project-chip/connectedhomeip/blob/482e6fd03196a6de45465a90003947ef4b86e0b1/docs/examples/discussion/PID_allocation_for_example_apps.md) +CONFIG_CHIP_DEVICE_PRODUCT_ID=32768 +CONFIG_STD_CPP17=y + +# Enable Matter pairing automatically on application start. +CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y + +# Enable Matter extended announcement and increase duration to 1 hour. +CONFIG_CHIP_BLE_EXT_ADVERTISING=y +CONFIG_CHIP_BLE_ADVERTISING_DURATION=60 + +# Add support for LEDs and buttons on Nordic development kits +CONFIG_DK_LIBRARY=y + +# Try to disable unused RAM blocks to reduce power consumption +CONFIG_RAM_POWER_DOWN_LIBRARY=y + +# Bluetooth Low Energy configuration +CONFIG_BT_DEVICE_NAME="MatterContact" +CONFIG_BT_DEVICE_NAME_MAX=18 + +# Suspend devices when the CPU goes into sleep +CONFIG_PM_DEVICE=y + +# Enable system reset on fatal error +CONFIG_RESET_ON_FATAL_ERROR=y + +# Disable all debug features +CONFIG_USE_SEGGER_RTT=n +CONFIG_SHELL=n +CONFIG_OPENTHREAD_SHELL=n +CONFIG_CONSOLE=n +CONFIG_UART_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_LOG=n +CONFIG_LOG_MODE_MINIMAL=n +CONFIG_ASSERT_VERBOSE=n +CONFIG_ASSERT_NO_FILE_INFO=y +CONFIG_PRINTK=n +CONFIG_PRINTK_SYNC=n +CONFIG_THREAD_NAME=n +CONFIG_BOOT_BANNER=n + +# Enable Factory Data feature +CONFIG_CHIP_FACTORY_DATA=y +CONFIG_CHIP_FACTORY_DATA_BUILD=y + +# Enable Watchdog +CONFIG_NCS_SAMPLE_MATTER_WATCHDOG=y + +# Enable LTO to decrease the flash usage. +CONFIG_LTO=y +CONFIG_ISR_TABLES_LOCAL_DECLARATION=y diff --git a/samples/matter/contact_sensor/sample.yaml b/samples/matter/contact_sensor/sample.yaml new file mode 100644 index 000000000000..8b2e3a855c1f --- /dev/null +++ b/samples/matter/contact_sensor/sample.yaml @@ -0,0 +1,38 @@ +sample: + description: Matter Contact Sensor example + name: Matter Contact Sensor +tests: + sample.matter.contact_sensor.debug: + sysbuild: true + build_only: true + integration_platforms: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp + - nrf54l15dk/nrf54l15/cpuapp + - nrf54lm20dk/nrf54lm20a/cpuapp + platform_allow: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp + - nrf54l15dk/nrf54l15/cpuapp + - nrf54lm20dk/nrf54lm20a/cpuapp + tags: + - sysbuild + - ci_samples_matter + sample.matter.contact_sensor.release: + sysbuild: true + build_only: true + extra_args: + - FILE_SUFFIX=release + integration_platforms: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp + - nrf54l15dk/nrf54l15/cpuapp + - nrf54lm20dk/nrf54lm20a/cpuapp + platform_allow: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp + - nrf54l15dk/nrf54l15/cpuapp + - nrf54lm20dk/nrf54lm20a/cpuapp + tags: + - sysbuild + - ci_samples_matter diff --git a/samples/matter/contact_sensor/src/app_task.cpp b/samples/matter/contact_sensor/src/app_task.cpp new file mode 100644 index 000000000000..2fcc5237de8d --- /dev/null +++ b/samples/matter/contact_sensor/src/app_task.cpp @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include "app_task.h" + +#include "app/matter_init.h" +#include "app/task_executor.h" +#include "board/board.h" +#include "lib/core/CHIPError.h" + +#include +#include + +#include + +LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); + +using namespace ::chip; +using namespace ::chip::app; +using namespace ::chip::DeviceLayer; + +namespace +{ + +Identify sIdentify = { AppTask::Instance().kContactSensorEndpointId, AppTask::IdentifyStartHandler, + AppTask::IdentifyStopHandler, Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator }; + +#define APPLICATION_BUTTON_MASK DK_BTN2_MSK + +#ifdef CONFIG_CHIP_ICD_UAT_SUPPORT +#define UAT_BUTTON_MASK DK_BTN3_MSK +#endif +} /* namespace */ + +void AppTask::IdentifyStartHandler(Identify *) +{ + Nrf::PostTask( + [] { Nrf::GetBoard().GetLED(Nrf::DeviceLeds::LED2).Blink(Nrf::LedConsts::kIdentifyBlinkRate_ms); }); +} + +void AppTask::IdentifyStopHandler(Identify *) +{ + Nrf::PostTask([] { Nrf::GetBoard().GetLED(Nrf::DeviceLeds::LED2).Set(false); }); +} + +void AppTask::ButtonEventHandler(Nrf::ButtonState state, Nrf::ButtonMask hasChanged) +{ + if ((APPLICATION_BUTTON_MASK & hasChanged)) { + if (state) { + LOG_INF("Contact sensor detected a contact (button pressed)."); + } else { + LOG_INF("Contact sensor stopped detecting a contact (button released)."); + } + Nrf::PostTask([state] { + Protocols::InteractionModel::Status status = + Clusters::BooleanState::Attributes::StateValue::Set( + AppTask::Instance().kContactSensorEndpointId, state); + + if (status != Protocols::InteractionModel::Status::Success) { + LOG_ERR("Updating contact sensor state failed %x", to_underlying(status)); + } + + Nrf::GetBoard().GetLED(Nrf::DeviceLeds::LED2).Set(state); + }); + } +#ifdef CONFIG_CHIP_ICD_UAT_SUPPORT + if ((UAT_BUTTON_MASK & state & hasChanged)) { + LOG_INF("ICD UserActiveMode has been triggered."); + Server::GetInstance().GetICDManager().OnNetworkActivity(); + } +#endif +} + +CHIP_ERROR AppTask::Init() +{ + /* Initialize Matter stack */ + ReturnErrorOnFailure(Nrf::Matter::PrepareServer()); + + if (!Nrf::GetBoard().Init(ButtonEventHandler)) { + LOG_ERR("User interface initialization failed."); + return CHIP_ERROR_INCORRECT_STATE; + } + + /* Register Matter event handler that controls the connectivity status LED based on the captured Matter network + * state. */ + ReturnErrorOnFailure(Nrf::Matter::RegisterEventHandler(Nrf::Board::DefaultMatterEventHandler, 0)); + + return Nrf::Matter::StartServer(); +} + +CHIP_ERROR AppTask::StartApp() +{ + ReturnErrorOnFailure(Init()); + + while (true) { + Nrf::DispatchNextTask(); + } + + return CHIP_NO_ERROR; +} diff --git a/samples/matter/contact_sensor/src/app_task.h b/samples/matter/contact_sensor/src/app_task.h new file mode 100644 index 000000000000..c86b74a197cd --- /dev/null +++ b/samples/matter/contact_sensor/src/app_task.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#pragma once + +#include "board/board.h" + +#include + +struct Identify; + +class AppTask { +public: + static AppTask &Instance() + { + static AppTask sAppTask; + return sAppTask; + }; + + CHIP_ERROR StartApp(); + static void IdentifyStartHandler(Identify *); + static void IdentifyStopHandler(Identify *); + + static constexpr chip::EndpointId kContactSensorEndpointId = 1; + +private: + CHIP_ERROR Init(); + + static void ButtonEventHandler(Nrf::ButtonState state, Nrf::ButtonMask hasChanged); +}; diff --git a/samples/matter/contact_sensor/src/chip_project_config.h b/samples/matter/contact_sensor/src/chip_project_config.h new file mode 100644 index 000000000000..9b5fe09d0fdd --- /dev/null +++ b/samples/matter/contact_sensor/src/chip_project_config.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once diff --git a/samples/matter/contact_sensor/src/default_zap/contact_sensor.matter b/samples/matter/contact_sensor/src/default_zap/contact_sensor.matter new file mode 100644 index 000000000000..a92799b058b6 --- /dev/null +++ b/samples/matter/contact_sensor/src/default_zap/contact_sensor.matter @@ -0,0 +1,2480 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54 [spec_name = "Media/TV Room"]; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; + kToilet = 95; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum LocationTag : enum8 { + kIndoor = 0; + kOutdoor = 1; + kInside = 2; + kOutside = 3; +} + +enum MeasurementTypeEnum : enum16 { + kUnspecified = 0; + kVoltage = 1; + kActiveCurrent = 2; + kReactiveCurrent = 3; + kApparentCurrent = 4; + kActivePower = 5; + kReactivePower = 6; + kApparentPower = 7; + kRMSVoltage = 8; + kRMSCurrent = 9; + kRMSPower = 10; + kFrequency = 11; + kPowerFactor = 12; + kNeutralCurrent = 13; + kElectricalEnergy = 14; + kReactiveEnergy = 15; + kApparentEnergy = 16; + kSoilMoisture = 17; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum PowerThresholdSourceEnum : enum8 { + kContract = 0; + kRegulator = 1; + kEquipment = 2; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + +enum StreamUsageEnum : enum8 { + kInternal = 0; + kRecording = 1; + kAnalysis = 2; + kLiveView = 3; +} + +enum TariffPriceTypeEnum : enum8 { + kStandard = 0; + kCritical = 1; + kVirtual = 2; + kIncentive = 3; + kIncentiveSignal = 4; +} + +enum TariffUnitEnum : enum8 { + kKWh = 0; + kKVAh = 1; +} + +enum TestGlobalEnum : enum8 { + kSomeValue = 0; + kSomeOtherValue = 1; + kFinalValue = 2; +} + +enum ThreeLevelAutoEnum : enum8 { + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; +} + +enum WebRTCEndReasonEnum : enum8 { + kIceFailed = 0; + kIceTimeout = 1; + kUserHangup = 2; + kUserBusy = 3; + kReplaced = 4; + kNoUserMedia = 5; + kInviteTimeout = 6; + kAnsweredElsewhere = 7; + kOutOfResources = 8; + kMediaTimeout = 9; + kLowPower = 10; + kUnknownReason = 11; +} + +bitmap TestGlobalBitmap : bitmap32 { + kFirstBit = 0x1; + kSecondBit = 0x2; +} + +struct CurrencyStruct { + int16u currency = 0; + int8u decimalPoints = 1; +} + +struct PriceStruct { + money amount = 0; + CurrencyStruct currency = 1; +} + +struct MeasurementAccuracyRangeStruct { + int64s rangeMin = 0; + int64s rangeMax = 1; + optional percent100ths percentMax = 2; + optional percent100ths percentMin = 3; + optional percent100ths percentTypical = 4; + optional int64u fixedMax = 5; + optional int64u fixedMin = 6; + optional int64u fixedTypical = 7; +} + +struct MeasurementAccuracyStruct { + MeasurementTypeEnum measurementType = 0; + boolean measured = 1; + int64s minMeasuredValue = 2; + int64s maxMeasuredValue = 3; + MeasurementAccuracyRangeStruct accuracyRanges[] = 4; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + +struct ICECandidateStruct { + char_string candidate = 0; + nullable char_string SDPMid = 1; + nullable int16u SDPMLineIndex = 2; +} + +struct ICEServerStruct { + char_string URLs[] = 0; + optional long_char_string<508> username = 1; + optional long_char_string<512> credential = 2; + optional int16u caid = 3; +} + +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct PowerThresholdStruct { + optional power_mw powerThreshold = 0; + optional power_mva apparentPowerThreshold = 1; + nullable PowerThresholdSourceEnum powerThresholdSource = 2; +} + +struct TestGlobalStruct { + char_string<128> name = 0; + nullable TestGlobalBitmap myBitmap = 1; + optional nullable TestGlobalEnum myEnum = 2; +} + +struct ViewportStruct { + int16u x1 = 0; + int16u y1 = 1; + int16u x2 = 2; + int16u y2 = 3; +} + +fabric_scoped struct WebRTCSessionStruct { + int16u id = 0; + node_id peerNodeID = 1; + endpoint_no peerEndpointID = 2; + StreamUsageEnum streamUsage = 3; + nullable int16u videoStreamID = 4; + nullable int16u audioStreamID = 5; + optional boolean metadataEnabled = 6; + fabric_idx fabricIndex = 254; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +cluster Identify = 3 { + revision 5; + + enum EffectIdentifierEnum : enum8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : enum8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : enum8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + 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 { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** This command starts or stops the receiving device identifying itself. */ + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** This command allows the support of feedback to the user, such as a certain light effect. */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +cluster Descriptor = 29 { + revision 3; + + bitmap Feature : bitmap32 { + kTagList = 0x1; + } + + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string<64> label = 3; + } + + 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 optional SemanticTagStruct tagList[] = 4; + readonly attribute optional char_string<32> endpointUniqueID = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +cluster AccessControl = 31 { + revision 2; + + enum AccessControlEntryAuthModeEnum : enum8 { + kPASE = 1 [spec_name = "PASE"]; + kCASE = 2 [spec_name = "CASE"]; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : enum8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum AccessRestrictionTypeEnum : enum8 { + kAttributeAccessForbidden = 0; + kAttributeWriteForbidden = 1; + kCommandForbidden = 2; + kEventForbidden = 3; + } + + enum ChangeTypeEnum : enum8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + bitmap Feature : bitmap32 { + kExtension = 0x1; + kManagedDevice = 0x2; + } + + struct AccessRestrictionStruct { + AccessRestrictionTypeEnum type = 0; + nullable int32u id = 1; + } + + struct CommissioningAccessRestrictionEntryStruct { + endpoint_no endpoint = 0; + cluster_id cluster = 1; + AccessRestrictionStruct restrictions[] = 2; + } + + fabric_scoped struct AccessRestrictionEntryStruct { + fabric_sensitive endpoint_no endpoint = 0; + fabric_sensitive cluster_id cluster = 1; + fabric_sensitive AccessRestrictionStruct restrictions[] = 2; + fabric_idx fabricIndex = 254; + } + + struct AccessControlTargetStruct { + 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; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + 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; + } + + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { + int64u token = 0; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5; + readonly attribute optional AccessRestrictionEntryStruct arl[] = 6; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ReviewFabricRestrictionsRequest { + CommissioningAccessRestrictionEntryStruct arl[] = 0; + } + + response struct ReviewFabricRestrictionsResponse = 1 { + int64u token = 0; + } + + /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +cluster BasicInformation = 40 { + revision 5; + + enum ColorEnum : enum8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : enum8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 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 optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; + readonly attribute int32u configurationVersion = 24; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +/** Provides an interface for providing OTA software updates */ +cluster OtaSoftwareUpdateProvider = 41 { + revision 1; // NOTE: Default/not specifically set + + enum ApplyUpdateActionEnum : enum8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum DownloadProtocolEnum : enum8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHTTPS = 2 [spec_name = "HTTPS"]; + kVendorSpecific = 3; + } + + enum StatusEnum : enum8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + 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; + DownloadProtocolEnum 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 { + StatusEnum 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 { + ApplyUpdateActionEnum action = 0; + int32u delayedActionTime = 1; + } + + request struct NotifyUpdateAppliedRequest { + octet_string<32> updateToken = 0; + int32u softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ + command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; +} + +/** Provides an interface for downloading and applying OTA software updates */ +cluster OtaSoftwareUpdateRequestor = 42 { + revision 1; // NOTE: Default/not specifically set + + enum AnnouncementReasonEnum : enum8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum ChangeReasonEnum : enum8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum UpdateStateEnum : 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 { + UpdateStateEnum previousState = 0; + UpdateStateEnum newState = 1; + ChangeReasonEnum 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 access(write: administer) ProviderLocation defaultOTAProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute UpdateStateEnum updateState = 2; + readonly attribute nullable int8u updateStateProgress = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + 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; + AnnouncementReasonEnum announcementReason = 2; + optional octet_string<512> metadataForNode = 3; + endpoint_no endpoint = 4; + } + + /** Announce the presence of an OTA Provider */ + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; +} + +/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ +cluster PowerSource = 47 { + revision 1; // NOTE: Default/not specifically set + + enum BatApprovedChemistryEnum : enum16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : enum8 { + kUnspecified = 0; + kAmbientTooHot = 1; + kAmbientTooCold = 2; + kBatteryTooHot = 3; + kBatteryTooCold = 4; + kBatteryAbsent = 5; + kBatteryOverVoltage = 6; + kBatteryUnderVoltage = 7; + kChargerOverVoltage = 8; + kChargerUnderVoltage = 9; + kSafetyTimeout = 10; + } + + enum BatChargeLevelEnum : enum8 { + kOK = 0 [spec_name = "OK"]; + kWarning = 1; + kCritical = 2; + } + + enum BatChargeStateEnum : enum8 { + kUnknown = 0; + kIsCharging = 1; + kIsAtFullCharge = 2; + kIsNotCharging = 3; + } + + enum BatCommonDesignationEnum : enum16 { + kUnspecified = 0; + kAAA = 1 [spec_name = "AAA"]; + kAA = 2 [spec_name = "AA"]; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12AA = 8 [spec_name = "1_2AA"]; + kAAAA = 9 [spec_name = "AAAA"]; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBA5800 = 18 [spec_name = "BA5800"]; + kDuplex = 19; + k4SR44 = 20 [spec_name = "4SR44"]; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCR123A = 29 [spec_name = "CR123A"]; + kCR2 = 30 [spec_name = "CR2"]; + k2CR5 = 31 [spec_name = "2CR5"]; + kCRP2 = 32 [spec_name = "CR_P2"]; + kCRV3 = 33 [spec_name = "CR_V3"]; + kSR41 = 34 [spec_name = "SR41"]; + kSR43 = 35 [spec_name = "SR43"]; + kSR44 = 36 [spec_name = "SR44"]; + kSR45 = 37 [spec_name = "SR45"]; + kSR48 = 38 [spec_name = "SR48"]; + kSR54 = 39 [spec_name = "SR54"]; + kSR55 = 40 [spec_name = "SR55"]; + kSR57 = 41 [spec_name = "SR57"]; + kSR58 = 42 [spec_name = "SR58"]; + kSR59 = 43 [spec_name = "SR59"]; + kSR60 = 44 [spec_name = "SR60"]; + kSR63 = 45 [spec_name = "SR63"]; + kSR64 = 46 [spec_name = "SR64"]; + kSR65 = 47 [spec_name = "SR65"]; + kSR66 = 48 [spec_name = "SR66"]; + kSR67 = 49 [spec_name = "SR67"]; + kSR68 = 50 [spec_name = "SR68"]; + kSR69 = 51 [spec_name = "SR69"]; + kSR516 = 52 [spec_name = "SR516"]; + kSR731 = 53 [spec_name = "SR731"]; + kSR712 = 54 [spec_name = "SR712"]; + kLR932 = 55 [spec_name = "LR932"]; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAC41E = 61 [spec_name = "AC41E"]; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRCR123A = 71 [spec_name = "RCR123A"]; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : enum8 { + kUnspecified = 0; + kOverTemp = 1; + kUnderTemp = 2; + } + + enum BatReplaceabilityEnum : enum8 { + kUnspecified = 0; + kNotReplaceable = 1; + kUserReplaceable = 2; + kFactoryReplaceable = 3; + } + + enum PowerSourceStatusEnum : enum8 { + kUnspecified = 0; + kActive = 1; + kStandby = 2; + kUnavailable = 3; + } + + enum WiredCurrentTypeEnum : enum8 { + kAC = 0 [spec_name = "AC"]; + kDC = 1 [spec_name = "DC"]; + } + + enum WiredFaultEnum : enum8 { + kUnspecified = 0; + kOverVoltage = 1; + kUnderVoltage = 2; + } + + bitmap Feature : bitmap32 { + kWired = 0x1; + kBattery = 0x2; + kRechargeable = 0x4; + 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; + } + + info event BatFaultChange = 1 { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + info event BatChargeFaultChange = 2 { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + readonly attribute PowerSourceStatusEnum status = 0; + readonly attribute int8u order = 1; + readonly attribute char_string<60> description = 2; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; + readonly attribute endpoint_no endpointList[] = 31; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +cluster GeneralCommissioning = 48 { + revision 2; + + enum CommissioningErrorEnum : enum8 { + kOK = 0 [spec_name = "OK"]; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; + } + + enum NetworkRecoveryReasonEnum : enum8 { + kUnspecified = 0; + kAuth = 1; + kVisibility = 2; + } + + enum RegulatoryLocationTypeEnum : enum8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + kNetworkRecovery = 0x2; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional nullable int32u TCUpdateDeadline = 9; + provisional readonly attribute access(read: manage) optional octet_string<8> recoveryIdentifier = 10; + provisional readonly attribute access(read: manage) optional nullable NetworkRecoveryReasonEnum networkRecoveryReason = 11; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + 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; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + char_string<2> countryCode = 1; + int64u breadcrumb = 2; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + + /** This command is used to arm or disarm the fail-safe timer. */ + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** This command is used to set the regulatory configuration for the device. */ + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** This command is used to indicate that the commissioning process is complete. */ + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command is used to set the user acknowledgements received in the Enhanced Setup Flow Terms & Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +cluster NetworkCommissioning = 49 { + revision 2; + + enum NetworkCommissioningStatusEnum : 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 WiFiBandEnum : enum8 { + k2G4 = 0 [spec_name = "2G4"]; + k3G65 = 1 [spec_name = "3G65"]; + k5G = 2 [spec_name = "5G"]; + k6G = 3 [spec_name = "6G"]; + k60G = 4 [spec_name = "60G"]; + k1G = 5 [spec_name = "1G"]; + } + + bitmap Feature : bitmap32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; + } + + bitmap ThreadCapabilitiesBitmap : bitmap16 { + kIsBorderRouterCapable = 0x1; + kIsRouterCapable = 0x2; + kIsSleepyEndDeviceCapable = 0x4; + kIsFullThreadDevice = 0x8; + kIsSynchronizedSleepyEndDeviceCapable = 0x10; + } + + bitmap WiFiSecurityBitmap : bitmap8 { + kUnencrypted = 0x1; + kWEP = 0x2 [spec_name = "WEP"]; + kWPAPersonal = 0x4 [spec_name = "WPA-PERSONAL"]; + kWPA2Personal = 0x8 [spec_name = "WPA2-PERSONAL"]; + kWPA3Personal = 0x10 [spec_name = "WPA3-PERSONAL"]; + kWPA3MatterPDC = 0x20 [spec_name = "WPA3-Matter-PDC"]; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; + } + + struct ThreadInterfaceScanResultStruct { + 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; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + provisional readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + provisional readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + provisional readonly attribute optional int16u threadVersion = 10; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + 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; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + + request struct AddOrUpdateThreadNetworkRequest { + octet_string<254> operationalDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + + request struct ConnectNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum 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; + } + + request struct QueryIdentityRequest { + octet_string<20> keyIdentifier = 0; + optional octet_string<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + octet_string<140> identity = 0; + optional octet_string<64> possessionSignature = 1; + } + + /** Detemine the set of networks the device sees as available. */ + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +cluster DiagnosticLogs = 50 { + revision 1; + + 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 [spec_name = "BDX"]; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + 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<1024> logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Reception of this command starts the process of retrieving diagnostic logs from a Node. */ + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster GeneralDiagnostics = 51 { + revision 2; + + 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; + } + + bitmap Feature : bitmap32 { + kDataModelTest = 0x1; + } + + 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 optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + 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; + } + + response struct TimeSnapshotResponse = 2 { + systime_ms systemTimeMs = 0; + nullable posix_ms posixTimeMs = 1; + } + + request struct PayloadTestRequestRequest { + octet_string<16> enableKey = 0; + int8u value = 1; + int16u count = 2; + } + + response struct PayloadTestResponse = 4 { + octet_string payload = 0; + } + + /** Provide a means for certification tests to trigger some test-plan-specific events */ + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ + command TimeSnapshot(): TimeSnapshotResponse = 1; + /** Request a variable length payload response. */ + command access(invoke: manage) PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; +} + +/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster SoftwareDiagnostics = 52 { + revision 1; + + bitmap Feature : 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 long_octet_string faultRecording = 2; + } + + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** This command is used to reset the high watermarks for heap and stack memory. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; +} + +/** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ +cluster ThreadNetworkDiagnostics = 53 { + revision 3; + + enum ConnectionStatusEnum : enum8 { + kConnected = 0; + kNotConnected = 1; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRoleEnum : enum8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kREED = 4 [spec_name = "REED"]; + kRouter = 5; + kLeader = 6; + } + + bitmap Feature : bitmap32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + kMLECounts = 0x4; + kMACCounts = 0x8; + } + + struct NeighborTableStruct { + 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 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 RouteTableStruct { + 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; + } + + info event ConnectionStatus = 0 { + ConnectionStatusEnum connectionStatus = 0; + } + + info event NetworkFaultChange = 1 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + readonly attribute nullable int16u channel = 0; + readonly attribute nullable RoutingRoleEnum 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 optional int64u overrunCount = 6; + readonly attribute NeighborTableStruct neighborTable[] = 7; + readonly attribute RouteTableStruct routeTable[] = 8; + readonly attribute nullable int32u partitionId = 9; + readonly attribute nullable int16u weighting = 10; + readonly attribute nullable int16u dataVersion = 11; + readonly attribute nullable int16u stableDataVersion = 12; + readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional 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 NetworkFaultEnum activeNetworkFaultsList[] = 62; + provisional readonly attribute nullable int64u extAddress = 63; + provisional readonly attribute nullable int16u rloc16 = 64; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the following attributes to 0: */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +cluster AdministratorCommissioning = 60 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningWindowStatusEnum : enum8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : enum8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + bitmap Feature : bitmap32 { + kBasic = 0x1; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable vendor_id adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + 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<32> salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +cluster OperationalCredentials = 62 { + revision 2; + + enum CertificateChainTypeEnum : enum8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : enum8 { + kOK = 0 [spec_name = "OK"]; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + 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; + optional octet_string<85> VIDVerificationStatement = 6; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct NOCStruct { + octet_string<400> noc = 1; + nullable octet_string<400> icac = 2; + optional octet_string<400> vvsc = 3; + 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 attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AttestationRequestRequest { + octet_string<32> attestationNonce = 0; + } + + response struct AttestationResponse = 1 { + octet_string attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + + request struct CSRRequestRequest { + octet_string<32> CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string<64> attestationSignature = 1; + } + + request struct AddNOCRequest { + octet_string<400> NOCValue = 0; + optional octet_string<400> ICACValue = 1; + octet_string<16> IPKValue = 2; + int64u caseAdminSubject = 3; + vendor_id adminVendorId = 4; + } + + request struct UpdateNOCRequest { + octet_string<400> NOCValue = 0; + optional octet_string<400> ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + + request struct UpdateFabricLabelRequest { + char_string<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + octet_string<400> rootCACertificate = 0; + } + + request struct SetVIDVerificationStatementRequest { + optional vendor_id vendorID = 0; + optional octet_string<85> VIDVerificationStatement = 1; + optional octet_string<400> vvsc = 2; + } + + request struct SignVIDVerificationRequestRequest { + fabric_idx fabricIndex = 0; + octet_string<32> clientChallenge = 1; + } + + response struct SignVIDVerificationResponse = 14 { + fabric_idx fabricIndex = 0; + int8u fabricBindingVersion = 1; + octet_string signature = 2; + } + + /** Sender is requesting attestation information from the receiver. */ + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** This command SHALL replace the NOC and optional associated ICAC (if present) scoped under the accessing fabric upon successful validation of all arguments and preconditions. */ + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + /** This command SHALL be used to update any of the accessing fabric's associated VendorID, VidVerificatioNStatement or VVSC (Vendor Verification Signing Certificate). */ + fabric command access(invoke: administer) SetVIDVerificationStatement(SetVIDVerificationStatementRequest): DefaultSuccess = 12; + /** This command SHALL be used to request that the server authenticate the fabric associated with the FabricIndex given. */ + command access(invoke: administer) SignVIDVerificationRequest(SignVIDVerificationRequestRequest): SignVIDVerificationResponse = 13; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +cluster GroupKeyManagement = 63 { + revision 1; // NOTE: Default/not specifically set + + enum GroupKeySecurityPolicyEnum : enum8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : bitmap32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + 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 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; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + int16u groupKeySetIDs[] = 0; + } + + /** Write a new set of keys for the given key set id. */ + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** This cluster provides an interface to a boolean state called StateValue. */ +cluster BooleanState = 69 { + revision 1; + + info event StateChange = 0 { + boolean stateValue = 0; + } + + readonly attribute boolean stateValue = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Allows servers to ensure that listed clients are notified when a server is available for communication. */ +cluster IcdManagement = 70 { + revision 3; + + enum ClientTypeEnum : enum8 { + kPermanent = 0; + kEphemeral = 1; + } + + enum OperatingModeEnum : enum8 { + kSIT = 0 [spec_name = "SIT"]; + kLIT = 1 [spec_name = "LIT"]; + } + + bitmap Feature : bitmap32 { + kCheckInProtocolSupport = 0x1; + kUserActiveModeTrigger = 0x2; + kLongIdleTimeSupport = 0x4; + kDynamicSitLitSupport = 0x8; + } + + bitmap UserActiveModeTriggerBitmap : bitmap32 { + kPowerCycle = 0x1; + kSettingsMenu = 0x2; + kCustomInstruction = 0x4; + kDeviceManual = 0x8; + kActuateSensor = 0x10; + kActuateSensorSeconds = 0x20; + kActuateSensorTimes = 0x40; + kActuateSensorLightsBlink = 0x80; + kResetButton = 0x100; + kResetButtonLightsBlink = 0x200; + kResetButtonSeconds = 0x400; + kResetButtonTimes = 0x800; + kSetupButton = 0x1000; + kSetupButtonSeconds = 0x2000; + kSetupButtonLightsBlink = 0x4000; + kSetupButtonTimes = 0x8000; + kAppDefinedButton = 0x10000; + } + + fabric_scoped struct MonitoringRegistrationStruct { + fabric_sensitive node_id checkInNodeID = 1; + fabric_sensitive int64u monitoredSubject = 2; + fabric_sensitive ClientTypeEnum clientType = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute int32u idleModeDuration = 0; + readonly attribute int32u activeModeDuration = 1; + readonly attribute int16u activeModeThreshold = 2; + readonly attribute access(read: administer) optional MonitoringRegistrationStruct registeredClients[] = 3; + readonly attribute access(read: administer) optional int32u ICDCounter = 4; + readonly attribute optional int16u clientsSupportedPerFabric = 5; + readonly attribute optional UserActiveModeTriggerBitmap userActiveModeTriggerHint = 6; + readonly attribute optional char_string<128> userActiveModeTriggerInstruction = 7; + readonly attribute optional OperatingModeEnum operatingMode = 8; + readonly attribute optional int32u maximumCheckInBackOff = 9; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RegisterClientRequest { + node_id checkInNodeID = 0; + int64u monitoredSubject = 1; + octet_string<16> key = 2; + optional octet_string<16> verificationKey = 3; + ClientTypeEnum clientType = 4; + } + + response struct RegisterClientResponse = 1 { + int32u ICDCounter = 0; + } + + request struct UnregisterClientRequest { + node_id checkInNodeID = 0; + optional octet_string<16> verificationKey = 1; + } + + request struct StayActiveRequestRequest { + int32u stayActiveDuration = 0; + } + + response struct StayActiveResponse = 4 { + int32u promisedActiveDuration = 0; + } + + /** Register a client to the end device */ + fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; + /** Unregister a client from an end device */ + fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; + /** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */ + command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 3; + device type ma_powersource = 17, version 1; + device type ma_otarequestor = 18, version 1; + + binding cluster OtaSoftwareUpdateProvider; + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster AccessControl { + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + callback attribute manufacturingDate; + callback attribute serialNumber; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + } + + server cluster OtaSoftwareUpdateRequestor { + emits event StateTransition; + emits event VersionApplied; + emits event DownloadError; + callback attribute defaultOTAProviders; + ram attribute updatePossible default = 1; + ram attribute updateState default = 0; + ram attribute updateStateProgress; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AnnounceOTAProvider; + } + + server cluster PowerSource { + ram attribute status default = 1; + ram attribute order default = 1; + ram attribute description; + ram attribute wiredCurrentType default = 1; + callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 3; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig; + callback attribute locationCapability; + callback attribute supportsConcurrentConnection; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + + handle command ArmFailSafe; + handle command ArmFailSafeResponse; + handle command SetRegulatoryConfig; + handle command SetRegulatoryConfigResponse; + handle command CommissioningComplete; + handle command CommissioningCompleteResponse; + } + + server cluster NetworkCommissioning { + callback attribute maxNetworks; + callback attribute networks; + callback attribute scanMaxTimeSeconds; + callback attribute connectMaxTimeSeconds; + callback attribute interfaceEnabled; + callback attribute lastNetworkingStatus; + callback attribute lastNetworkID; + callback attribute lastConnectErrorValue; + callback attribute supportedWiFiBands; + callback attribute supportedThreadFeatures; + callback attribute threadVersion; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command ScanNetworks; + handle command ScanNetworksResponse; + handle command AddOrUpdateWiFiNetwork; + handle command AddOrUpdateThreadNetwork; + handle command RemoveNetwork; + handle command NetworkConfigResponse; + handle command ConnectNetwork; + handle command ConnectNetworkResponse; + handle command ReorderNetwork; + } + + server cluster DiagnosticLogs { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RetrieveLogsRequest; + handle command RetrieveLogsResponse; + } + + server cluster GeneralDiagnostics { + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + callback attribute totalOperationalHours; + callback attribute bootReason; + callback attribute testEventTriggersEnabled default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command TestEventTrigger; + handle command TimeSnapshot; + handle command TimeSnapshotResponse; + } + + server cluster SoftwareDiagnostics { + callback attribute currentHeapFree; + callback attribute currentHeapUsed; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + 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; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0x000F; + ram attribute clusterRevision default = 3; + + handle command ResetCounts; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus; + callback attribute adminFabricIndex; + callback attribute adminVendorId; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 1; + callback attribute clusterRevision; + + handle command OpenCommissioningWindow; + handle command OpenBasicCommissioningWindow; + handle command RevokeCommissioning; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AttestationRequest; + handle command AttestationResponse; + handle command CertificateChainRequest; + handle command CertificateChainResponse; + handle command CSRRequest; + handle command CSRResponse; + handle command AddNOC; + handle command UpdateNOC; + handle command NOCResponse; + handle command UpdateFabricLabel; + handle command RemoveFabric; + handle command AddTrustedRootCertificate; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command KeySetWrite; + handle command KeySetRead; + handle command KeySetReadResponse; + handle command KeySetRemove; + handle command KeySetReadAllIndices; + handle command KeySetReadAllIndicesResponse; + } + + server cluster IcdManagement { + callback attribute idleModeDuration; + callback attribute activeModeDuration; + callback attribute activeModeThreshold; + callback attribute registeredClients; + callback attribute ICDCounter; + callback attribute clientsSupportedPerFabric; + ram attribute userActiveModeTriggerHint default = 0x10000; + ram attribute userActiveModeTriggerInstruction default = "Press the button specified in documentation"; + callback attribute operatingMode; + callback attribute maximumCheckInBackOff; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 3; + + handle command RegisterClient; + handle command RegisterClientResponse; + handle command UnregisterClient; + handle command StayActiveRequest; + handle command StayActiveResponse; + } +} +endpoint 1 { + device type ma_contactsensor = 21, version 2; + + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 5; + + handle command Identify; + handle command TriggerEffect; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster BooleanState { + ram attribute stateValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} diff --git a/samples/matter/contact_sensor/src/default_zap/contact_sensor.zap b/samples/matter/contact_sensor/src/default_zap/contact_sensor.zap new file mode 100644 index 000000000000..2b53efd85f32 --- /dev/null +++ b/samples/matter/contact_sensor/src/default_zap/contact_sensor.zap @@ -0,0 +1,4690 @@ +{ + "fileFormat": 2, + "featureLevel": 107, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x127F" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../../../../modules/lib/matter/src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../../../../modules/lib/matter/src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "category": "matter", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 18, + "profileId": 259, + "label": "MA-otarequestor", + "name": "MA-otarequestor", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 18, + "profileId": 259, + "label": "MA-otarequestor", + "name": "MA-otarequestor", + "deviceTypeOrder": 0 + }, + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource", + "deviceTypeOrder": 1 + }, + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice", + "deviceTypeOrder": 2 + } + ], + "deviceVersions": [ + 1, + 1, + 3 + ], + "deviceIdentifiers": [ + 18, + 17, + 22 + ], + "deviceTypeName": "MA-otarequestor", + "deviceTypeCode": 18, + "deviceTypeProfileId": 259, + "clusters": [ + { + "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": null, + "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": null, + "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": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPathsPerInvoke", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "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": "4", + "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", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": "UpdateStateEnum", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "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": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Status", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PowerSourceStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Order", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Description", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WiredCurrentType", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "WiredCurrentTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 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": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "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": "2", + "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": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedWiFiBands", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedThreadFeatures", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "ThreadCapabilitiesBitmap", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThreadVersion", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "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", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "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 Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshot", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshotResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "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": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RouteTable", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChildRoleCount", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RouterRoleCount", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LeaderRoleCount", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttachAttemptCount", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartitionIdChangeCount", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BetterPartitionAttachAttemptCount", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ParentChangeCount", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxTotalCount", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxUnicastCount", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxBroadcastCount", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxAckRequestedCount", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxAckedCount", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxNoAckRequestedCount", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxDataCount", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxDataPollCount", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxBeaconCount", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxBeaconRequestCount", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxOtherCount", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxRetryCount", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxErrCcaCount", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxErrAbortCount", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TxErrBusyChannelCount", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RxTotalCount", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RxUnicastCount", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RxBroadcastCount", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RxDataCount", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RxDataPollCount", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RxBeaconCount", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RxBeaconRequestCount", + "code": 45, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RxOtherCount", + "code": 46, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RxAddressFilteredCount", + "code": 47, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RxDestAddrFilteredCount", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RxDuplicatedCount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RxErrNoFrameCount", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RxErrUnknownNeighborCount", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RxErrInvalidSrcAddrCount", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RxErrSecCount", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RxErrFcsCount", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RxErrOtherCount", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "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": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChannelPage0Mask", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "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": "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "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": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "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": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "ICD Management", + "code": 70, + "mfgCode": null, + "define": "ICD_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RegisterClient", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RegisterClientResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UnregisterClient", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StayActiveRequest", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StayActiveResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdleModeDuration", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeDuration", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeThreshold", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RegisteredClients", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ICDCounter", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientsSupportedPerFabric", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UserActiveModeTriggerHint", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "UserActiveModeTriggerBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x10000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UserActiveModeTriggerInstruction", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "Press the button specified in documentation", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperatingMode", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "OperatingModeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaximumCheckInBackOff", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 21, + "profileId": 259, + "label": "MA-contactsensor", + "name": "MA-contactsensor", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 21, + "profileId": 259, + "label": "MA-contactsensor", + "name": "MA-contactsensor", + "deviceTypeOrder": 0 + } + ], + "deviceVersions": [ + 2 + ], + "deviceIdentifiers": [ + 21 + ], + "deviceTypeName": "MA-contactsensor", + "deviceTypeCode": 21, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "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": 1, + "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": 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": "5", + "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": 0, + "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": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "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": 1, + "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": 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": "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Boolean State", + "code": 69, + "mfgCode": null, + "define": "BOOLEAN_STATE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "StateValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "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": 1, + "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": 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 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "parentEndpointIdentifier": null + } + ] +} \ No newline at end of file diff --git a/samples/matter/contact_sensor/src/default_zap/zap-generated/IMClusterCommandHandler.cpp b/samples/matter/contact_sensor/src/default_zap/zap-generated/IMClusterCommandHandler.cpp new file mode 100644 index 000000000000..249158bdab24 --- /dev/null +++ b/samples/matter/contact_sensor/src/default_zap/zap-generated/IMClusterCommandHandler.cpp @@ -0,0 +1,546 @@ +/* + * + * 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 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace chip +{ +namespace app +{ + + // Cluster specific command parsing + + namespace Clusters + { + + namespace DiagnosticLogs + { + + Protocols::InteractionModel::Status + DispatchServerCommand(CommandHandler *apCommandObj, const ConcreteCommandPath &aCommandPath, + TLV::TLVReader &aDataTlv) + { + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) { + case Commands::RetrieveLogsRequest::Id: { + Commands::RetrieveLogsRequest::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfDiagnosticLogsClusterRetrieveLogsRequestCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + ChipLogError(Zcl, + "Unknown command " ChipLogFormatMEI + " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), + ChipLogValueMEI(aCommandPath.mClusterId)); + return Protocols::InteractionModel::Status::UnsupportedCommand; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) { + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, + TLVError.Format()); + return Protocols::InteractionModel::Status::InvalidCommand; + } + + // We use success as a marker that no special handling is required + // This is to avoid having a std::optional which uses slightly more code. + return Protocols::InteractionModel::Status::Success; + } + + } // namespace DiagnosticLogs + + namespace GroupKeyManagement + { + + Protocols::InteractionModel::Status + DispatchServerCommand(CommandHandler *apCommandObj, const ConcreteCommandPath &aCommandPath, + TLV::TLVReader &aDataTlv) + { + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) { + case Commands::KeySetWrite::Id: { + Commands::KeySetWrite::DecodableType commandData; + TLVError = commandData.Decode(aDataTlv, + apCommandObj->GetAccessingFabricIndex()); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfGroupKeyManagementClusterKeySetWriteCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::KeySetRead::Id: { + Commands::KeySetRead::DecodableType commandData; + TLVError = commandData.Decode(aDataTlv, + apCommandObj->GetAccessingFabricIndex()); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfGroupKeyManagementClusterKeySetReadCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::KeySetRemove::Id: { + Commands::KeySetRemove::DecodableType commandData; + TLVError = commandData.Decode(aDataTlv, + apCommandObj->GetAccessingFabricIndex()); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfGroupKeyManagementClusterKeySetRemoveCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::KeySetReadAllIndices::Id: { + Commands::KeySetReadAllIndices::DecodableType commandData; + TLVError = commandData.Decode(aDataTlv, + apCommandObj->GetAccessingFabricIndex()); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfGroupKeyManagementClusterKeySetReadAllIndicesCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + ChipLogError(Zcl, + "Unknown command " ChipLogFormatMEI + " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), + ChipLogValueMEI(aCommandPath.mClusterId)); + return Protocols::InteractionModel::Status::UnsupportedCommand; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) { + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, + TLVError.Format()); + return Protocols::InteractionModel::Status::InvalidCommand; + } + + // We use success as a marker that no special handling is required + // This is to avoid having a std::optional which uses slightly more code. + return Protocols::InteractionModel::Status::Success; + } + + } // namespace GroupKeyManagement + + namespace IcdManagement + { + + Protocols::InteractionModel::Status + DispatchServerCommand(CommandHandler *apCommandObj, const ConcreteCommandPath &aCommandPath, + TLV::TLVReader &aDataTlv) + { + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) { + case Commands::RegisterClient::Id: { + Commands::RegisterClient::DecodableType commandData; + TLVError = commandData.Decode(aDataTlv, + apCommandObj->GetAccessingFabricIndex()); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfIcdManagementClusterRegisterClientCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::UnregisterClient::Id: { + Commands::UnregisterClient::DecodableType commandData; + TLVError = commandData.Decode(aDataTlv, + apCommandObj->GetAccessingFabricIndex()); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfIcdManagementClusterUnregisterClientCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::StayActiveRequest::Id: { + Commands::StayActiveRequest::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfIcdManagementClusterStayActiveRequestCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + ChipLogError(Zcl, + "Unknown command " ChipLogFormatMEI + " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), + ChipLogValueMEI(aCommandPath.mClusterId)); + return Protocols::InteractionModel::Status::UnsupportedCommand; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) { + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, + TLVError.Format()); + return Protocols::InteractionModel::Status::InvalidCommand; + } + + // We use success as a marker that no special handling is required + // This is to avoid having a std::optional which uses slightly more code. + return Protocols::InteractionModel::Status::Success; + } + + } // namespace IcdManagement + + namespace Identify + { + + Protocols::InteractionModel::Status + DispatchServerCommand(CommandHandler *apCommandObj, const ConcreteCommandPath &aCommandPath, + TLV::TLVReader &aDataTlv) + { + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) { + case Commands::Identify::Id: { + Commands::Identify::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfIdentifyClusterIdentifyCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::TriggerEffect::Id: { + Commands::TriggerEffect::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfIdentifyClusterTriggerEffectCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + ChipLogError(Zcl, + "Unknown command " ChipLogFormatMEI + " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), + ChipLogValueMEI(aCommandPath.mClusterId)); + return Protocols::InteractionModel::Status::UnsupportedCommand; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) { + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, + TLVError.Format()); + return Protocols::InteractionModel::Status::InvalidCommand; + } + + // We use success as a marker that no special handling is required + // This is to avoid having a std::optional which uses slightly more code. + return Protocols::InteractionModel::Status::Success; + } + + } // namespace Identify + + namespace OtaSoftwareUpdateRequestor + { + + Protocols::InteractionModel::Status + DispatchServerCommand(CommandHandler *apCommandObj, const ConcreteCommandPath &aCommandPath, + TLV::TLVReader &aDataTlv) + { + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) { + case Commands::AnnounceOTAProvider::Id: { + Commands::AnnounceOTAProvider::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + ChipLogError(Zcl, + "Unknown command " ChipLogFormatMEI + " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), + ChipLogValueMEI(aCommandPath.mClusterId)); + return Protocols::InteractionModel::Status::UnsupportedCommand; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) { + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, + TLVError.Format()); + return Protocols::InteractionModel::Status::InvalidCommand; + } + + // We use success as a marker that no special handling is required + // This is to avoid having a std::optional which uses slightly more code. + return Protocols::InteractionModel::Status::Success; + } + + } // namespace OtaSoftwareUpdateRequestor + + namespace OperationalCredentials + { + + Protocols::InteractionModel::Status + DispatchServerCommand(CommandHandler *apCommandObj, const ConcreteCommandPath &aCommandPath, + TLV::TLVReader &aDataTlv) + { + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) { + case Commands::AttestationRequest::Id: { + Commands::AttestationRequest::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfOperationalCredentialsClusterAttestationRequestCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::CertificateChainRequest::Id: { + Commands::CertificateChainRequest::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfOperationalCredentialsClusterCertificateChainRequestCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::CSRRequest::Id: { + Commands::CSRRequest::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfOperationalCredentialsClusterCSRRequestCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::AddNOC::Id: { + Commands::AddNOC::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfOperationalCredentialsClusterAddNOCCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::UpdateNOC::Id: { + Commands::UpdateNOC::DecodableType commandData; + TLVError = commandData.Decode(aDataTlv, + apCommandObj->GetAccessingFabricIndex()); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfOperationalCredentialsClusterUpdateNOCCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::UpdateFabricLabel::Id: { + Commands::UpdateFabricLabel::DecodableType commandData; + TLVError = commandData.Decode(aDataTlv, + apCommandObj->GetAccessingFabricIndex()); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfOperationalCredentialsClusterUpdateFabricLabelCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::RemoveFabric::Id: { + Commands::RemoveFabric::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfOperationalCredentialsClusterRemoveFabricCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::AddTrustedRootCertificate::Id: { + Commands::AddTrustedRootCertificate::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfOperationalCredentialsClusterAddTrustedRootCertificateCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + ChipLogError(Zcl, + "Unknown command " ChipLogFormatMEI + " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), + ChipLogValueMEI(aCommandPath.mClusterId)); + return Protocols::InteractionModel::Status::UnsupportedCommand; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) { + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, + TLVError.Format()); + return Protocols::InteractionModel::Status::InvalidCommand; + } + + // We use success as a marker that no special handling is required + // This is to avoid having a std::optional which uses slightly more code. + return Protocols::InteractionModel::Status::Success; + } + + } // namespace OperationalCredentials + + namespace ThreadNetworkDiagnostics + { + + Protocols::InteractionModel::Status + DispatchServerCommand(CommandHandler *apCommandObj, const ConcreteCommandPath &aCommandPath, + TLV::TLVReader &aDataTlv) + { + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) { + case Commands::ResetCounts::Id: { + Commands::ResetCounts::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfThreadNetworkDiagnosticsClusterResetCountsCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + ChipLogError(Zcl, + "Unknown command " ChipLogFormatMEI + " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), + ChipLogValueMEI(aCommandPath.mClusterId)); + return Protocols::InteractionModel::Status::UnsupportedCommand; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) { + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, + TLVError.Format()); + return Protocols::InteractionModel::Status::InvalidCommand; + } + + // We use success as a marker that no special handling is required + // This is to avoid having a std::optional which uses slightly more code. + return Protocols::InteractionModel::Status::Success; + } + + } // namespace ThreadNetworkDiagnostics + + } // namespace Clusters + + void DispatchSingleClusterCommand(const ConcreteCommandPath &aCommandPath, TLV::TLVReader &aReader, + CommandHandler *apCommandObj) + { + Protocols::InteractionModel::Status errorStatus = Protocols::InteractionModel::Status::Success; + + switch (aCommandPath.mClusterId) { + case Clusters::DiagnosticLogs::Id: + errorStatus = + Clusters::DiagnosticLogs::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + case Clusters::GroupKeyManagement::Id: + errorStatus = Clusters::GroupKeyManagement::DispatchServerCommand(apCommandObj, aCommandPath, + aReader); + break; + case Clusters::IcdManagement::Id: + errorStatus = + Clusters::IcdManagement::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + case Clusters::Identify::Id: + errorStatus = Clusters::Identify::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + case Clusters::OtaSoftwareUpdateRequestor::Id: + errorStatus = Clusters::OtaSoftwareUpdateRequestor::DispatchServerCommand( + apCommandObj, aCommandPath, aReader); + break; + case Clusters::OperationalCredentials::Id: + errorStatus = Clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, + aCommandPath, aReader); + break; + case Clusters::ThreadNetworkDiagnostics::Id: + errorStatus = Clusters::ThreadNetworkDiagnostics::DispatchServerCommand(apCommandObj, + aCommandPath, aReader); + break; + default: + ChipLogError(Zcl, "Unknown cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mClusterId)); + errorStatus = Protocols::InteractionModel::Status::UnsupportedCluster; + break; + } + + if (errorStatus != Protocols::InteractionModel::Status::Success) { + apCommandObj->AddStatus(aCommandPath, errorStatus); + } + } + +} // namespace app +} // namespace chip diff --git a/samples/matter/contact_sensor/src/default_zap/zap-generated/PluginApplicationCallbacks.h b/samples/matter/contact_sensor/src/default_zap/zap-generated/PluginApplicationCallbacks.h new file mode 100644 index 000000000000..ab89bb555b67 --- /dev/null +++ b/samples/matter/contact_sensor/src/default_zap/zap-generated/PluginApplicationCallbacks.h @@ -0,0 +1,57 @@ +/* + * + * 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 + +#pragma once + +void MatterIdentifyPluginServerInitCallback(); +void MatterDescriptorPluginServerInitCallback(); +void MatterAccessControlPluginServerInitCallback(); +void MatterBasicInformationPluginServerInitCallback(); +void MatterOtaSoftwareUpdateRequestorPluginServerInitCallback(); +void MatterPowerSourcePluginServerInitCallback(); +void MatterGeneralCommissioningPluginServerInitCallback(); +void MatterNetworkCommissioningPluginServerInitCallback(); +void MatterDiagnosticLogsPluginServerInitCallback(); +void MatterGeneralDiagnosticsPluginServerInitCallback(); +void MatterSoftwareDiagnosticsPluginServerInitCallback(); +void MatterThreadNetworkDiagnosticsPluginServerInitCallback(); +void MatterAdministratorCommissioningPluginServerInitCallback(); +void MatterOperationalCredentialsPluginServerInitCallback(); +void MatterGroupKeyManagementPluginServerInitCallback(); +void MatterBooleanStatePluginServerInitCallback(); +void MatterIcdManagementPluginServerInitCallback(); + +#define MATTER_PLUGINS_INIT \ + MatterIdentifyPluginServerInitCallback(); \ + MatterDescriptorPluginServerInitCallback(); \ + MatterAccessControlPluginServerInitCallback(); \ + MatterBasicInformationPluginServerInitCallback(); \ + MatterOtaSoftwareUpdateRequestorPluginServerInitCallback(); \ + MatterPowerSourcePluginServerInitCallback(); \ + MatterGeneralCommissioningPluginServerInitCallback(); \ + MatterNetworkCommissioningPluginServerInitCallback(); \ + MatterDiagnosticLogsPluginServerInitCallback(); \ + MatterGeneralDiagnosticsPluginServerInitCallback(); \ + MatterSoftwareDiagnosticsPluginServerInitCallback(); \ + MatterThreadNetworkDiagnosticsPluginServerInitCallback(); \ + MatterAdministratorCommissioningPluginServerInitCallback(); \ + MatterOperationalCredentialsPluginServerInitCallback(); \ + MatterGroupKeyManagementPluginServerInitCallback(); \ + MatterBooleanStatePluginServerInitCallback(); \ + MatterIcdManagementPluginServerInitCallback(); diff --git a/samples/matter/contact_sensor/src/default_zap/zap-generated/access.h b/samples/matter/contact_sensor/src/default_zap/zap-generated/access.h new file mode 100644 index 000000000000..ee27f4d593c7 --- /dev/null +++ b/samples/matter/contact_sensor/src/default_zap/zap-generated/access.h @@ -0,0 +1,251 @@ +/* + * + * 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 + +// Prevent multiple inclusion +#pragma once + +#include + +// Prevent changing generated format +// clang-format off + +//////////////////////////////////////////////////////////////////////////////// + +// Parallel array data (*cluster*, attribute, privilege) for read attribute +#define GENERATED_ACCESS_READ_ATTRIBUTE__CLUSTER { \ + 0x0000001F, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + 0x0000001F, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + /* Cluster: OTA Software Update Requestor, Attribute: DefaultOTAProviders, Privilege: view */ \ + 0x00000031, /* Cluster: Network Commissioning, Attribute: MaxNetworks, Privilege: administer */ \ + 0x00000031, /* Cluster: Network Commissioning, Attribute: Networks, Privilege: administer */ \ + /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: view */ \ + 0x00000031, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \ + 0x00000031, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ + 0x00000031, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ + 0x0000003E, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ + /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: view */ \ + 0x00000046, /* Cluster: ICD Management, Attribute: RegisteredClients, Privilege: administer */ \ + 0x00000046, /* Cluster: ICD Management, Attribute: ICDCounter, Privilege: administer */ \ +} + +// Parallel array data (cluster, *attribute*, privilege) for read attribute +#define GENERATED_ACCESS_READ_ATTRIBUTE__ATTRIBUTE { \ + 0x00000000, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + 0x00000001, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + /* Cluster: OTA Software Update Requestor, Attribute: DefaultOTAProviders, Privilege: view */ \ + 0x00000000, /* Cluster: Network Commissioning, Attribute: MaxNetworks, Privilege: administer */ \ + 0x00000001, /* Cluster: Network Commissioning, Attribute: Networks, Privilege: administer */ \ + /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: view */ \ + 0x00000005, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \ + 0x00000006, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ + 0x00000007, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ + 0x00000000, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ + /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: view */ \ + 0x00000003, /* Cluster: ICD Management, Attribute: RegisteredClients, Privilege: administer */ \ + 0x00000004, /* Cluster: ICD Management, Attribute: ICDCounter, Privilege: administer */ \ +} + +// Parallel array data (cluster, attribute, *privilege*) for read attribute +#define GENERATED_ACCESS_READ_ATTRIBUTE__PRIVILEGE { \ + chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + /* Cluster: OTA Software Update Requestor, Attribute: DefaultOTAProviders, Privilege: view */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Network Commissioning, Attribute: MaxNetworks, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Network Commissioning, Attribute: Networks, Privilege: administer */ \ + /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: view */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ + /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: view */ \ + chip::Access::Privilege::kAdminister, /* Cluster: ICD Management, Attribute: RegisteredClients, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: ICD Management, Attribute: ICDCounter, Privilege: administer */ \ +} + +//////////////////////////////////////////////////////////////////////////////// + +// Parallel array data (*cluster*, attribute, privilege) for write attribute +#define GENERATED_ACCESS_WRITE_ATTRIBUTE__CLUSTER { \ + 0x0000001F, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + 0x0000001F, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + 0x00000028, /* Cluster: Basic Information, Attribute: NodeLabel, Privilege: manage */ \ + 0x00000028, /* Cluster: Basic Information, Attribute: Location, Privilege: administer */ \ + 0x0000002A, /* Cluster: OTA Software Update Requestor, Attribute: DefaultOTAProviders, Privilege: administer */ \ + 0x00000030, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ + 0x00000031, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ + 0x0000003F, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \ +} + +// Parallel array data (cluster, *attribute*, privilege) for write attribute +#define GENERATED_ACCESS_WRITE_ATTRIBUTE__ATTRIBUTE { \ + 0x00000000, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + 0x00000001, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + 0x00000005, /* Cluster: Basic Information, Attribute: NodeLabel, Privilege: manage */ \ + 0x00000006, /* Cluster: Basic Information, Attribute: Location, Privilege: administer */ \ + 0x00000000, /* Cluster: OTA Software Update Requestor, Attribute: DefaultOTAProviders, Privilege: administer */ \ + 0x00000000, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ + 0x00000004, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ + 0x00000000, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \ +} + +// Parallel array data (cluster, attribute, *privilege*) for write attribute +#define GENERATED_ACCESS_WRITE_ATTRIBUTE__PRIVILEGE { \ + chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + chip::Access::Privilege::kManage, /* Cluster: Basic Information, Attribute: NodeLabel, Privilege: manage */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Basic Information, Attribute: Location, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: OTA Software Update Requestor, Attribute: DefaultOTAProviders, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ + chip::Access::Privilege::kManage, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \ +} + +//////////////////////////////////////////////////////////////////////////////// + +// Parallel array data (*cluster*, command, privilege) for invoke command +#define GENERATED_ACCESS_INVOKE_COMMAND__CLUSTER { \ + 0x00000003, /* Cluster: Identify, Command: Identify, Privilege: manage */ \ + 0x00000003, /* Cluster: Identify, Command: TriggerEffect, Privilege: manage */ \ + 0x00000030, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ + 0x00000030, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ + 0x00000030, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ + 0x00000031, /* Cluster: Network Commissioning, Command: ScanNetworks, Privilege: administer */ \ + 0x00000031, /* Cluster: Network Commissioning, Command: AddOrUpdateWiFiNetwork, Privilege: administer */ \ + 0x00000031, /* Cluster: Network Commissioning, Command: AddOrUpdateThreadNetwork, Privilege: administer */ \ + 0x00000031, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ + 0x00000031, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ + 0x00000031, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0x00000033, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ + 0x00000035, /* Cluster: Thread Network Diagnostics, Command: ResetCounts, Privilege: manage */ \ + 0x0000003C, /* Cluster: Administrator Commissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ + 0x0000003C, /* Cluster: Administrator Commissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ + 0x0000003C, /* Cluster: Administrator Commissioning, Command: RevokeCommissioning, Privilege: administer */ \ + 0x0000003E, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \ + 0x0000003E, /* Cluster: Operational Credentials, Command: CertificateChainRequest, Privilege: administer */ \ + 0x0000003E, /* Cluster: Operational Credentials, Command: CSRRequest, Privilege: administer */ \ + 0x0000003E, /* Cluster: Operational Credentials, Command: AddNOC, Privilege: administer */ \ + 0x0000003E, /* Cluster: Operational Credentials, Command: UpdateNOC, Privilege: administer */ \ + 0x0000003E, /* Cluster: Operational Credentials, Command: UpdateFabricLabel, Privilege: administer */ \ + 0x0000003E, /* Cluster: Operational Credentials, Command: RemoveFabric, Privilege: administer */ \ + 0x0000003E, /* Cluster: Operational Credentials, Command: AddTrustedRootCertificate, Privilege: administer */ \ + 0x0000003F, /* Cluster: Group Key Management, Command: KeySetWrite, Privilege: administer */ \ + 0x0000003F, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \ + 0x0000003F, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \ + 0x0000003F, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \ + 0x00000046, /* Cluster: ICD Management, Command: RegisterClient, Privilege: manage */ \ + 0x00000046, /* Cluster: ICD Management, Command: UnregisterClient, Privilege: manage */ \ + 0x00000046, /* Cluster: ICD Management, Command: StayActiveRequest, Privilege: manage */ \ +} + +// Parallel array data (cluster, *command*, privilege) for invoke command +#define GENERATED_ACCESS_INVOKE_COMMAND__COMMAND { \ + 0x00000000, /* Cluster: Identify, Command: Identify, Privilege: manage */ \ + 0x00000040, /* Cluster: Identify, Command: TriggerEffect, Privilege: manage */ \ + 0x00000000, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ + 0x00000002, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ + 0x00000004, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ + 0x00000000, /* Cluster: Network Commissioning, Command: ScanNetworks, Privilege: administer */ \ + 0x00000002, /* Cluster: Network Commissioning, Command: AddOrUpdateWiFiNetwork, Privilege: administer */ \ + 0x00000003, /* Cluster: Network Commissioning, Command: AddOrUpdateThreadNetwork, Privilege: administer */ \ + 0x00000004, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ + 0x00000006, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ + 0x00000008, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0x00000000, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ + 0x00000000, /* Cluster: Thread Network Diagnostics, Command: ResetCounts, Privilege: manage */ \ + 0x00000000, /* Cluster: Administrator Commissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ + 0x00000001, /* Cluster: Administrator Commissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ + 0x00000002, /* Cluster: Administrator Commissioning, Command: RevokeCommissioning, Privilege: administer */ \ + 0x00000000, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \ + 0x00000002, /* Cluster: Operational Credentials, Command: CertificateChainRequest, Privilege: administer */ \ + 0x00000004, /* Cluster: Operational Credentials, Command: CSRRequest, Privilege: administer */ \ + 0x00000006, /* Cluster: Operational Credentials, Command: AddNOC, Privilege: administer */ \ + 0x00000007, /* Cluster: Operational Credentials, Command: UpdateNOC, Privilege: administer */ \ + 0x00000009, /* Cluster: Operational Credentials, Command: UpdateFabricLabel, Privilege: administer */ \ + 0x0000000A, /* Cluster: Operational Credentials, Command: RemoveFabric, Privilege: administer */ \ + 0x0000000B, /* Cluster: Operational Credentials, Command: AddTrustedRootCertificate, Privilege: administer */ \ + 0x00000000, /* Cluster: Group Key Management, Command: KeySetWrite, Privilege: administer */ \ + 0x00000001, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \ + 0x00000003, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \ + 0x00000004, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \ + 0x00000000, /* Cluster: ICD Management, Command: RegisterClient, Privilege: manage */ \ + 0x00000002, /* Cluster: ICD Management, Command: UnregisterClient, Privilege: manage */ \ + 0x00000003, /* Cluster: ICD Management, Command: StayActiveRequest, Privilege: manage */ \ +} + +// Parallel array data (cluster, command, *privilege*) for invoke command +#define GENERATED_ACCESS_INVOKE_COMMAND__PRIVILEGE { \ + chip::Access::Privilege::kManage, /* Cluster: Identify, Command: Identify, Privilege: manage */ \ + chip::Access::Privilege::kManage, /* Cluster: Identify, Command: TriggerEffect, Privilege: manage */ \ + chip::Access::Privilege::kAdminister, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Network Commissioning, Command: ScanNetworks, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Network Commissioning, Command: AddOrUpdateWiFiNetwork, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Network Commissioning, Command: AddOrUpdateThreadNetwork, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + chip::Access::Privilege::kManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \ + chip::Access::Privilege::kManage, /* Cluster: Thread Network Diagnostics, Command: ResetCounts, Privilege: manage */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Administrator Commissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Administrator Commissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Administrator Commissioning, Command: RevokeCommissioning, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Operational Credentials, Command: CertificateChainRequest, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Operational Credentials, Command: CSRRequest, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Operational Credentials, Command: AddNOC, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Operational Credentials, Command: UpdateNOC, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Operational Credentials, Command: UpdateFabricLabel, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Operational Credentials, Command: RemoveFabric, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Operational Credentials, Command: AddTrustedRootCertificate, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Group Key Management, Command: KeySetWrite, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \ + chip::Access::Privilege::kManage, /* Cluster: ICD Management, Command: RegisterClient, Privilege: manage */ \ + chip::Access::Privilege::kManage, /* Cluster: ICD Management, Command: UnregisterClient, Privilege: manage */ \ + chip::Access::Privilege::kManage, /* Cluster: ICD Management, Command: StayActiveRequest, Privilege: manage */ \ +} + +//////////////////////////////////////////////////////////////////////////////// + +// Parallel array data (*cluster*, event, privilege) for read event +#define GENERATED_ACCESS_READ_EVENT__CLUSTER { \ + 0x0000001F, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ + 0x0000001F, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ + 0x0000001F, /* Cluster: Access Control, Event: FabricRestrictionReviewUpdate, Privilege: administer */ \ +} + +// Parallel array data (cluster, *event*, privilege) for read event +#define GENERATED_ACCESS_READ_EVENT__EVENT { \ + 0x00000000, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ + 0x00000001, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ + 0x00000002, /* Cluster: Access Control, Event: FabricRestrictionReviewUpdate, Privilege: administer */ \ +} + +// Parallel array data (cluster, event, *privilege*) for read event +#define GENERATED_ACCESS_READ_EVENT__PRIVILEGE { \ + chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ + chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Event: FabricRestrictionReviewUpdate, Privilege: administer */ \ +} + +//////////////////////////////////////////////////////////////////////////////// + +// clang-format on diff --git a/samples/matter/contact_sensor/src/default_zap/zap-generated/callback-stub.cpp b/samples/matter/contact_sensor/src/default_zap/zap-generated/callback-stub.cpp new file mode 100644 index 000000000000..276f8f66cfa7 --- /dev/null +++ b/samples/matter/contact_sensor/src/default_zap/zap-generated/callback-stub.cpp @@ -0,0 +1,180 @@ +/* + * + * 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 +#include +#include + +using namespace chip; + +// Cluster Init Functions +void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) +{ + switch (clusterId) { + case app::Clusters::AccessControl::Id: + emberAfAccessControlClusterInitCallback(endpoint); + break; + case app::Clusters::AdministratorCommissioning::Id: + emberAfAdministratorCommissioningClusterInitCallback(endpoint); + break; + case app::Clusters::BasicInformation::Id: + emberAfBasicInformationClusterInitCallback(endpoint); + break; + case app::Clusters::BooleanState::Id: + emberAfBooleanStateClusterInitCallback(endpoint); + break; + case app::Clusters::Descriptor::Id: + emberAfDescriptorClusterInitCallback(endpoint); + break; + case app::Clusters::DiagnosticLogs::Id: + emberAfDiagnosticLogsClusterInitCallback(endpoint); + break; + case app::Clusters::GeneralCommissioning::Id: + emberAfGeneralCommissioningClusterInitCallback(endpoint); + break; + case app::Clusters::GeneralDiagnostics::Id: + emberAfGeneralDiagnosticsClusterInitCallback(endpoint); + break; + case app::Clusters::GroupKeyManagement::Id: + emberAfGroupKeyManagementClusterInitCallback(endpoint); + break; + case app::Clusters::IcdManagement::Id: + emberAfIcdManagementClusterInitCallback(endpoint); + break; + case app::Clusters::Identify::Id: + emberAfIdentifyClusterInitCallback(endpoint); + break; + case app::Clusters::NetworkCommissioning::Id: + emberAfNetworkCommissioningClusterInitCallback(endpoint); + break; + case app::Clusters::OtaSoftwareUpdateProvider::Id: + emberAfOtaSoftwareUpdateProviderClusterInitCallback(endpoint); + break; + case app::Clusters::OtaSoftwareUpdateRequestor::Id: + emberAfOtaSoftwareUpdateRequestorClusterInitCallback(endpoint); + break; + case app::Clusters::OperationalCredentials::Id: + emberAfOperationalCredentialsClusterInitCallback(endpoint); + break; + case app::Clusters::PowerSource::Id: + emberAfPowerSourceClusterInitCallback(endpoint); + break; + case app::Clusters::SoftwareDiagnostics::Id: + emberAfSoftwareDiagnosticsClusterInitCallback(endpoint); + break; + case app::Clusters::ThreadNetworkDiagnostics::Id: + emberAfThreadNetworkDiagnosticsClusterInitCallback(endpoint); + break; + default: + // Unrecognized cluster ID + break; + } +} + +void __attribute__((weak)) emberAfAccessControlClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} +void __attribute__((weak)) emberAfAdministratorCommissioningClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} +void __attribute__((weak)) emberAfBasicInformationClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} +void __attribute__((weak)) emberAfBooleanStateClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} +void __attribute__((weak)) emberAfDescriptorClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} +void __attribute__((weak)) emberAfDiagnosticLogsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} +void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} +void __attribute__((weak)) emberAfGeneralDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} +void __attribute__((weak)) emberAfGroupKeyManagementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} +void __attribute__((weak)) emberAfIcdManagementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} +void __attribute__((weak)) emberAfIdentifyClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} +void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} +void __attribute__((weak)) emberAfOtaSoftwareUpdateProviderClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} +void __attribute__((weak)) emberAfOtaSoftwareUpdateRequestorClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} +void __attribute__((weak)) emberAfOperationalCredentialsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} +void __attribute__((weak)) emberAfPowerSourceClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} +void __attribute__((weak)) emberAfSoftwareDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} +void __attribute__((weak)) emberAfThreadNetworkDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void)endpoint; +} diff --git a/samples/matter/contact_sensor/src/default_zap/zap-generated/endpoint_config.h b/samples/matter/contact_sensor/src/default_zap/zap-generated/endpoint_config.h new file mode 100644 index 000000000000..743750cd501c --- /dev/null +++ b/samples/matter/contact_sensor/src/default_zap/zap-generated/endpoint_config.h @@ -0,0 +1,929 @@ +/* + * + * 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 + +// Prevent multiple inclusion +#pragma once + +#include +#include + +// Default values for the attributes longer than a pointer, +// in a form of a binary blob +// Separate block is generated for big-endian and little-endian cases. +#if CHIP_CONFIG_BIG_ENDIAN_TARGET +#define GENERATED_DEFAULTS \ + { \ + /* Endpoint: 0, Cluster: General Commissioning (server), big-endian */ \ + \ + /* 0 - Breadcrumb, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: ICD Management (server), big-endian */ \ + \ + /* 8 - UserActiveModeTriggerInstruction, */ \ + 43, 'P', 'r', 'e', 's', 's', ' ', 't', 'h', 'e', ' ', 'b', 'u', 't', 't', 'o', 'n', ' ', 's', \ + 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'd', ' ', 'i', 'n', ' ', 'd', 'o', 'c', 'u', 'm', 'e', 'n', \ + 't', 'a', 't', 'i', 'o', 'n', \ + } + +#else // !CHIP_CONFIG_BIG_ENDIAN_TARGET +#define GENERATED_DEFAULTS \ + { \ + /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ + \ + /* 0 - Breadcrumb, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: ICD Management (server), little-endian */ \ + \ + /* 8 - UserActiveModeTriggerInstruction, */ \ + 43, 'P', 'r', 'e', 's', 's', ' ', 't', 'h', 'e', ' ', 'b', 'u', 't', 't', 'o', 'n', ' ', 's', \ + 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'd', ' ', 'i', 'n', ' ', 'd', 'o', 'c', 'u', 'm', 'e', 'n', \ + 't', 'a', 't', 'i', 'o', 'n', \ + } + +#endif // CHIP_CONFIG_BIG_ENDIAN_TARGET + +#define GENERATED_DEFAULTS_COUNT (2) + +// This is an array of EmberAfAttributeMinMaxValue structures. +#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULTS \ + { \ + } + +// This is an array of EmberAfAttributeMetadata structures. +#define GENERATED_ATTRIBUTE_COUNT 188 +#define GENERATED_ATTRIBUTES \ + { \ + /* Endpoint: 0, Cluster: Descriptor (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* DeviceTypeList \ + */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ServerList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClientList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* PartsList */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFD, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Access Control (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ACL */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* Extension */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* SubjectsPerAccessControlEntry */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TargetsPerAccessControlEntry */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000004, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* AccessControlEntriesPerFabric */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFD, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Basic Information (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON) }, /* DataModelRevision \ + */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 33, ZAP_TYPE(CHAR_STRING), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON) }, /* VendorName */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 2, ZAP_TYPE(VENDOR_ID), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON) }, /* VendorID */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 33, ZAP_TYPE(CHAR_STRING), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON) }, /* ProductName */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000004, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON) }, /* ProductID */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000005, 33, ZAP_TYPE(CHAR_STRING), \ + ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(SINGLETON) | \ + ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* NodeLabel */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000006, 3, ZAP_TYPE(CHAR_STRING), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON) | \ + ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* Location */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000007, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON) }, /* HardwareVersion \ + */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000008, 65, ZAP_TYPE(CHAR_STRING), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON) }, /* HardwareVersionString \ + */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000009, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON) }, /* SoftwareVersion \ + */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000000A, 65, ZAP_TYPE(CHAR_STRING), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON) }, /* SoftwareVersionString \ + */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000000B, 17, ZAP_TYPE(CHAR_STRING), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON) }, /* ManufacturingDate \ + */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000000F, 33, ZAP_TYPE(CHAR_STRING), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON) }, /* SerialNumber */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000012, 33, ZAP_TYPE(CHAR_STRING), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON) }, /* UniqueID */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000013, 0, ZAP_TYPE(STRUCT), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* CapabilityMinima */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000015, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON) }, /* SpecificationVersion \ + */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000016, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON) }, /* MaxPathsPerInvoke \ + */ \ + { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(4), 0x0000FFFD, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(SINGLETON) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* DefaultOTAProviders \ + */ \ + { ZAP_SIMPLE_DEFAULT(1), 0x00000001, 1, ZAP_TYPE(BOOLEAN), 0 }, /* UpdatePossible */ \ + { ZAP_SIMPLE_DEFAULT(0), 0x00000002, 1, ZAP_TYPE(ENUM8), 0 }, /* UpdateState */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 1, ZAP_TYPE(INT8U), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* UpdateStateProgress \ + */ \ + { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Power Source (server) */ \ + { ZAP_SIMPLE_DEFAULT(1), 0x00000000, 1, ZAP_TYPE(ENUM8), 0 }, /* Status */ \ + { ZAP_SIMPLE_DEFAULT(1), 0x00000001, 1, ZAP_TYPE(INT8U), 0 }, /* Order */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 61, ZAP_TYPE(CHAR_STRING), 0 }, /* Description */ \ + { ZAP_SIMPLE_DEFAULT(1), 0x00000005, 1, ZAP_TYPE(ENUM8), 0 }, /* WiredCurrentType */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000001F, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* EndpointList */ \ + { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(3), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: General Commissioning (server) */ \ + { ZAP_LONG_DEFAULTS_INDEX(0), 0x00000000, 8, ZAP_TYPE(INT64U), \ + ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* Breadcrumb */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(STRUCT), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* BasicCommissioningInfo */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 1, ZAP_TYPE(ENUM8), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RegulatoryConfig */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 1, ZAP_TYPE(ENUM8), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* LocationCapability */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000004, 1, ZAP_TYPE(BOOLEAN), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* SupportsConcurrentConnection */ \ + { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 1, ZAP_TYPE(INT8U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* MaxNetworks */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* Networks */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 1, ZAP_TYPE(INT8U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ScanMaxTimeSeconds */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 1, ZAP_TYPE(INT8U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ConnectMaxTimeSeconds */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000004, 1, ZAP_TYPE(BOOLEAN), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* InterfaceEnabled \ + */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000005, 1, ZAP_TYPE(ENUM8), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* LastNetworkingStatus \ + */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000006, 33, ZAP_TYPE(OCTET_STRING), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* LastNetworkID */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000007, 4, ZAP_TYPE(INT32S), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* LastConnectErrorValue \ + */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000008, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* SupportedWiFiBands */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000009, 2, ZAP_TYPE(BITMAP16), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* SupportedThreadFeatures */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000000A, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ThreadVersion */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFD, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ + { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* NetworkInterfaces */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RebootCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 8, ZAP_TYPE(INT64U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* UpTime */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TotalOperationalHours */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000004, 1, ZAP_TYPE(ENUM8), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* BootReason */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000008, 1, ZAP_TYPE(BOOLEAN), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TestEventTriggersEnabled */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFD, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 8, ZAP_TYPE(INT64U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* CurrentHeapFree */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 8, ZAP_TYPE(INT64U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* CurrentHeapUsed */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFD, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* Channel */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 1, ZAP_TYPE(ENUM8), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* RoutingRole */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 17, ZAP_TYPE(CHAR_STRING), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* NetworkName */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* PanId */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000004, 8, ZAP_TYPE(INT64U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* ExtendedPanId */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000005, 18, ZAP_TYPE(OCTET_STRING), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* MeshLocalPrefix */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000006, 8, ZAP_TYPE(INT64U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* OverrunCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000007, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* NeighborTable */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000008, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RouteTable */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000009, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* PartitionId */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000000A, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* Weighting */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000000B, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* DataVersion */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000000C, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* StableDataVersion \ + */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000000D, 1, ZAP_TYPE(INT8U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* LeaderRouterId */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000000E, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* DetachedRoleCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000000F, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ChildRoleCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000010, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RouterRoleCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000011, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* LeaderRoleCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000012, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* AttachAttemptCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000013, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* PartitionIdChangeCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000014, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* BetterPartitionAttachAttemptCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000015, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ParentChangeCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000016, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TxTotalCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000017, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TxUnicastCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000018, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TxBroadcastCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000019, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TxAckRequestedCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000001A, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TxAckedCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000001B, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TxNoAckRequestedCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000001C, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TxDataCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000001D, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TxDataPollCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000001E, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TxBeaconCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000001F, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TxBeaconRequestCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000020, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TxOtherCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000021, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TxRetryCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000022, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TxDirectMaxRetryExpiryCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000023, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TxIndirectMaxRetryExpiryCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000024, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TxErrCcaCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000025, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TxErrAbortCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000026, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TxErrBusyChannelCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000027, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RxTotalCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000028, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RxUnicastCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000029, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RxBroadcastCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000002A, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RxDataCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000002B, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RxDataPollCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000002C, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RxBeaconCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000002D, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RxBeaconRequestCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000002E, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RxOtherCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000002F, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RxAddressFilteredCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000030, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RxDestAddrFilteredCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000031, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RxDuplicatedCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000032, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RxErrNoFrameCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000033, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RxErrUnknownNeighborCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000034, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RxErrInvalidSrcAddrCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000035, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RxErrSecCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000036, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RxErrFcsCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000037, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RxErrOtherCount */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000038, 8, ZAP_TYPE(INT64U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* ActiveTimestamp */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000039, 8, ZAP_TYPE(INT64U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* PendingTimestamp \ + */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000003A, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* Delay */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000003B, 0, ZAP_TYPE(STRUCT), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* SecurityPolicy */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000003C, 5, ZAP_TYPE(OCTET_STRING), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* ChannelPage0Mask \ + */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000003D, 0, ZAP_TYPE(STRUCT), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* OperationalDatasetComponents \ + */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000003E, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ActiveNetworkFaultsList */ \ + { ZAP_SIMPLE_DEFAULT(0x000F), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(3), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Administrator Commissioning (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 1, ZAP_TYPE(ENUM8), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* WindowStatus */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 1, ZAP_TYPE(FABRIC_IDX), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* AdminFabricIndex \ + */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 2, ZAP_TYPE(VENDOR_ID), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* AdminVendorId */ \ + { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFD, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* NOCs */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* Fabrics */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 1, ZAP_TYPE(INT8U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* SupportedFabrics */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 1, ZAP_TYPE(INT8U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* CommissionedFabrics */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000004, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* TrustedRootCertificates */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000005, 1, ZAP_TYPE(INT8U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* CurrentFabricIndex */ \ + { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Group Key Management (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* GroupKeyMap */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* GroupTable */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* MaxGroupsPerFabric */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* MaxGroupKeysPerFabric */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFD, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: ICD Management (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* IdleModeDuration */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ActiveModeDuration */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ActiveModeThreshold */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RegisteredClients */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000004, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ICDCounter */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000005, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClientsSupportedPerFabric */ \ + { ZAP_SIMPLE_DEFAULT(0x10000), 0x00000006, 4, ZAP_TYPE(BITMAP32), 0 }, /* UserActiveModeTriggerHint \ + */ \ + { ZAP_LONG_DEFAULTS_INDEX(8), 0x00000007, 129, ZAP_TYPE(CHAR_STRING), 0 }, /* UserActiveModeTriggerInstruction \ + */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000008, 1, ZAP_TYPE(ENUM8), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* OperatingMode */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000009, 4, ZAP_TYPE(INT32U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* MaximumCheckInBackOff */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(3), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + { ZAP_SIMPLE_DEFAULT(0x0), 0x00000000, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* IdentifyTime */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 1, ZAP_TYPE(ENUM8), 0 }, /* IdentifyType */ \ + { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + \ + /* Endpoint: 1, Cluster: Descriptor (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* DeviceTypeList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ServerList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000002, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClientList */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000003, 0, ZAP_TYPE(ARRAY), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* PartsList */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFD, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ClusterRevision */ \ + \ + /* Endpoint: 1, Cluster: Boolean State (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 1, ZAP_TYPE(BOOLEAN), 0 }, /* StateValue */ \ + { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + } + +// clang-format off +#define GENERATED_EVENT_COUNT 6 +#define GENERATED_EVENTS { \ + /* Endpoint: 0, Cluster: Basic Information (server) */ \ + /* EventList (index=0) */ \ + 0x00000000, /* StartUp */ \ + 0x00000001, /* ShutDown */ \ + 0x00000002, /* Leave */ \ + /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ + /* EventList (index=3) */ \ + 0x00000000, /* StateTransition */ \ + 0x00000001, /* VersionApplied */ \ + 0x00000002, /* DownloadError */ \ +} + +// clang-format on + +// Cluster function static arrays +#define GENERATED_FUNCTION_ARRAYS \ + const EmberAfGenericClusterFunction chipFuncArrayIdentifyServer[] = { \ + (EmberAfGenericClusterFunction)emberAfIdentifyClusterServerInitCallback, \ + (EmberAfGenericClusterFunction)MatterIdentifyClusterServerAttributeChangedCallback, \ + }; + +// clang-format off +#define GENERATED_COMMANDS { \ + /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ + /* AcceptedCommandList (index=0) */ \ + 0x00000000 /* AnnounceOTAProvider */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: General Commissioning (server) */\ + /* AcceptedCommandList (index=2) */ \ + 0x00000000 /* ArmFailSafe */, \ + 0x00000002 /* SetRegulatoryConfig */, \ + 0x00000004 /* CommissioningComplete */, \ + chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=6)*/ \ + 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ + 0x00000005 /* CommissioningCompleteResponse */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Network Commissioning (server) */\ + /* AcceptedCommandList (index=10) */ \ + 0x00000000 /* ScanNetworks */, \ + 0x00000002 /* AddOrUpdateWiFiNetwork */, \ + 0x00000003 /* AddOrUpdateThreadNetwork */, \ + 0x00000004 /* RemoveNetwork */, \ + 0x00000006 /* ConnectNetwork */, \ + 0x00000008 /* ReorderNetwork */, \ + chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=17)*/ \ + 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ + 0x00000007 /* ConnectNetworkResponse */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Diagnostic Logs (server) */\ + /* AcceptedCommandList (index=21) */ \ + 0x00000000 /* RetrieveLogsRequest */, \ + chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=23)*/ \ + 0x00000001 /* RetrieveLogsResponse */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: General Diagnostics (server) */\ + /* AcceptedCommandList (index=25) */ \ + 0x00000000 /* TestEventTrigger */, \ + 0x00000001 /* TimeSnapshot */, \ + chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=28)*/ \ + 0x00000002 /* TimeSnapshotResponse */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */\ + /* AcceptedCommandList (index=30) */ \ + 0x00000000 /* ResetCounts */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Administrator Commissioning (server) */\ + /* AcceptedCommandList (index=32) */ \ + 0x00000000 /* OpenCommissioningWindow */, \ + 0x00000001 /* OpenBasicCommissioningWindow */, \ + 0x00000002 /* RevokeCommissioning */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Operational Credentials (server) */\ + /* AcceptedCommandList (index=36) */ \ + 0x00000000 /* AttestationRequest */, \ + 0x00000002 /* CertificateChainRequest */, \ + 0x00000004 /* CSRRequest */, \ + 0x00000006 /* AddNOC */, \ + 0x00000007 /* UpdateNOC */, \ + 0x00000009 /* UpdateFabricLabel */, \ + 0x0000000A /* RemoveFabric */, \ + 0x0000000B /* AddTrustedRootCertificate */, \ + chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=45)*/ \ + 0x00000001 /* AttestationResponse */, \ + 0x00000003 /* CertificateChainResponse */, \ + 0x00000005 /* CSRResponse */, \ + 0x00000008 /* NOCResponse */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Group Key Management (server) */\ + /* AcceptedCommandList (index=50) */ \ + 0x00000000 /* KeySetWrite */, \ + 0x00000001 /* KeySetRead */, \ + 0x00000003 /* KeySetRemove */, \ + 0x00000004 /* KeySetReadAllIndices */, \ + chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=55)*/ \ + 0x00000002 /* KeySetReadResponse */, \ + 0x00000005 /* KeySetReadAllIndicesResponse */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: ICD Management (server) */\ + /* AcceptedCommandList (index=58) */ \ + 0x00000000 /* RegisterClient */, \ + 0x00000002 /* UnregisterClient */, \ + 0x00000003 /* StayActiveRequest */, \ + chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=62)*/ \ + 0x00000001 /* RegisterClientResponse */, \ + 0x00000004 /* StayActiveResponse */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 1, Cluster: Identify (server) */\ + /* AcceptedCommandList (index=65) */ \ + 0x00000000 /* Identify */, \ + 0x00000040 /* TriggerEffect */, \ + chip::kInvalidCommandId /* end of list */, \ +} + +// clang-format on + +// This is an array of EmberAfCluster structures. +#define GENERATED_CLUSTER_COUNT 19 +// clang-format off +#define GENERATED_CLUSTERS { \ + { \ + /* Endpoint: 0, Cluster: Descriptor (server) */ \ + .clusterId = 0x0000001D, \ + .attributes = ZAP_ATTRIBUTE_INDEX(0), \ + .attributeCount = 6, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = nullptr, \ + .generatedCommandList = nullptr, \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ + { \ + /* Endpoint: 0, Cluster: Access Control (server) */ \ + .clusterId = 0x0000001F, \ + .attributes = ZAP_ATTRIBUTE_INDEX(6), \ + .attributeCount = 7, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = nullptr, \ + .generatedCommandList = nullptr, \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ + { \ + /* Endpoint: 0, Cluster: Basic Information (server) */ \ + .clusterId = 0x00000028, \ + .attributes = ZAP_ATTRIBUTE_INDEX(13), \ + .attributeCount = 19, \ + .clusterSize = 39, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = nullptr, \ + .generatedCommandList = nullptr, \ + .eventList = ZAP_GENERATED_EVENTS_INDEX( 0 ), \ + .eventCount = 3, \ + },\ + { \ + /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ + .clusterId = 0x00000029, \ + .attributes = ZAP_ATTRIBUTE_INDEX(32), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .acceptedCommandList = nullptr, \ + .generatedCommandList = nullptr, \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ + { \ + /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ + .clusterId = 0x0000002A, \ + .attributes = ZAP_ATTRIBUTE_INDEX(32), \ + .attributeCount = 6, \ + .clusterSize = 9, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ), \ + .generatedCommandList = nullptr, \ + .eventList = ZAP_GENERATED_EVENTS_INDEX( 3 ), \ + .eventCount = 3, \ + },\ + { \ + /* Endpoint: 0, Cluster: Power Source (server) */ \ + .clusterId = 0x0000002F, \ + .attributes = ZAP_ATTRIBUTE_INDEX(38), \ + .attributeCount = 7, \ + .clusterSize = 70, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = nullptr, \ + .generatedCommandList = nullptr, \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ + { \ + /* Endpoint: 0, Cluster: General Commissioning (server) */ \ + .clusterId = 0x00000030, \ + .attributes = ZAP_ATTRIBUTE_INDEX(45), \ + .attributeCount = 7, \ + .clusterSize = 14, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 2 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 6 ), \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ + { \ + /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ + .clusterId = 0x00000031, \ + .attributes = ZAP_ATTRIBUTE_INDEX(52), \ + .attributeCount = 13, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 10 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 17 ), \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ + { \ + /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ + .clusterId = 0x00000032, \ + .attributes = ZAP_ATTRIBUTE_INDEX(65), \ + .attributeCount = 2, \ + .clusterSize = 6, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ), \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ + { \ + /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ + .clusterId = 0x00000033, \ + .attributes = ZAP_ATTRIBUTE_INDEX(67), \ + .attributeCount = 8, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 28 ), \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ + { \ + /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ + .clusterId = 0x00000034, \ + .attributes = ZAP_ATTRIBUTE_INDEX(75), \ + .attributeCount = 4, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = nullptr, \ + .generatedCommandList = nullptr, \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ + { \ + /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ + .clusterId = 0x00000035, \ + .attributes = ZAP_ATTRIBUTE_INDEX(79), \ + .attributeCount = 65, \ + .clusterSize = 6, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 30 ), \ + .generatedCommandList = nullptr, \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ + { \ + /* Endpoint: 0, Cluster: Administrator Commissioning (server) */ \ + .clusterId = 0x0000003C, \ + .attributes = ZAP_ATTRIBUTE_INDEX(144), \ + .attributeCount = 5, \ + .clusterSize = 4, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 32 ), \ + .generatedCommandList = nullptr, \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ + { \ + /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + .clusterId = 0x0000003E, \ + .attributes = ZAP_ATTRIBUTE_INDEX(149), \ + .attributeCount = 8, \ + .clusterSize = 6, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 36 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ), \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ + { \ + /* Endpoint: 0, Cluster: Group Key Management (server) */ \ + .clusterId = 0x0000003F, \ + .attributes = ZAP_ATTRIBUTE_INDEX(157), \ + .attributeCount = 6, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 50 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 55 ), \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ + { \ + /* Endpoint: 0, Cluster: ICD Management (server) */ \ + .clusterId = 0x00000046, \ + .attributes = ZAP_ATTRIBUTE_INDEX(163), \ + .attributeCount = 12, \ + .clusterSize = 135, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 58 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 62 ), \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ + { \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + .clusterId = 0x00000003, \ + .attributes = ZAP_ATTRIBUTE_INDEX(175), \ + .attributeCount = 4, \ + .clusterSize = 9, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ + .functions = chipFuncArrayIdentifyServer, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 65 ), \ + .generatedCommandList = nullptr, \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ + { \ + /* Endpoint: 1, Cluster: Descriptor (server) */ \ + .clusterId = 0x0000001D, \ + .attributes = ZAP_ATTRIBUTE_INDEX(179), \ + .attributeCount = 6, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = nullptr, \ + .generatedCommandList = nullptr, \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ + { \ + /* Endpoint: 1, Cluster: Boolean State (server) */ \ + .clusterId = 0x00000045, \ + .attributes = ZAP_ATTRIBUTE_INDEX(185), \ + .attributeCount = 3, \ + .clusterSize = 7, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = nullptr, \ + .generatedCommandList = nullptr, \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ +} + +// clang-format on + +#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 18 + +// This is an array of EmberAfEndpointType structures. +#define GENERATED_ENDPOINT_TYPES \ + { \ + { ZAP_CLUSTER_INDEX(0), 16, 289 }, { ZAP_CLUSTER_INDEX(16), 3, 16 }, \ + } + +// Largest attribute size is needed for various buffers +#define ATTRIBUTE_LARGEST (130) + +static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, + "ATTRIBUTE_LARGEST larger than expected"); + +// Total size of singleton attributes +#define ATTRIBUTE_SINGLETONS_SIZE (35) + +// Total size of attribute storage +#define ATTRIBUTE_MAX_SIZE (305) + +// Number of fixed endpoints +#define FIXED_ENDPOINT_COUNT (2) + +// Array of endpoints that are supported, the data inside +// the array is the endpoint number. +#define FIXED_ENDPOINT_ARRAY \ + { \ + 0x0000, 0x0001 \ + } + +// Array of profile ids +#define FIXED_PROFILE_IDS \ + { \ + 0x0103, 0x0103 \ + } + +// Array of device types +#define FIXED_DEVICE_TYPES \ + { \ + { 0x00000012, 1 }, { 0x00000011, 1 }, { 0x00000016, 3 }, \ + { \ + 0x00000015, 2 \ + } \ + } + +// Array of device type offsets +#define FIXED_DEVICE_TYPE_OFFSETS \ + { \ + 0, 3 \ + } + +// Array of device type lengths +#define FIXED_DEVICE_TYPE_LENGTHS \ + { \ + 3, 1 \ + } + +// Array of endpoint types supported on each endpoint +#define FIXED_ENDPOINT_TYPES \ + { \ + 0, 1 \ + } + +// Array of parent endpoints for each endpoint +#define FIXED_PARENT_ENDPOINTS \ + { \ + kInvalidEndpointId, kInvalidEndpointId \ + } diff --git a/samples/matter/contact_sensor/src/default_zap/zap-generated/gen_config.h b/samples/matter/contact_sensor/src/default_zap/zap-generated/gen_config.h new file mode 100644 index 000000000000..4f93aff76d51 --- /dev/null +++ b/samples/matter/contact_sensor/src/default_zap/zap-generated/gen_config.h @@ -0,0 +1,452 @@ +/* + * + * 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 + +// Prevent multiple inclusion +#pragma once + +/**** Cluster endpoint counts ****/ +#define MATTER_DM_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define MATTER_DM_GROUPS_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_PWM_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (2) +#define MATTER_DM_BINDING_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_ACCESS_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define MATTER_DM_ACTIONS_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_BASIC_INFORMATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define MATTER_DM_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define MATTER_DM_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_TIME_FORMAT_LOCALIZATION_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_UNIT_LOCALIZATION_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_POWER_SOURCE_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_POWER_SOURCE_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define MATTER_DM_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define MATTER_DM_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define MATTER_DM_DIAGNOSTIC_LOGS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define MATTER_DM_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define MATTER_DM_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define MATTER_DM_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define MATTER_DM_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_TIME_SYNCHRONIZATION_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_SWITCH_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_ADMINISTRATOR_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define MATTER_DM_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define MATTER_DM_GROUP_KEY_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define MATTER_DM_FIXED_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_USER_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_PROXY_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_PROXY_DISCOVERY_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_PROXY_VALID_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_BOOLEAN_STATE_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define MATTER_DM_ICD_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define MATTER_DM_TIMER_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_OPERATIONAL_STATE_OVEN_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_OVEN_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_LAUNDRY_DRYER_CONTROLS_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_MODE_SELECT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_LAUNDRY_WASHER_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_LAUNDRY_WASHER_CONTROLS_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_RVC_RUN_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_RVC_CLEAN_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_TEMPERATURE_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_REFRIGERATOR_ALARM_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_DISHWASHER_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_AIR_QUALITY_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_SMOKE_CO_ALARM_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_DISHWASHER_ALARM_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_MICROWAVE_OVEN_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_MICROWAVE_OVEN_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_OPERATIONAL_STATE_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_OPERATIONAL_STATE_RVC_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_HEPA_FILTER_MONITORING_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_BOOLEAN_STATE_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_VALVE_CONFIGURATION_AND_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_ELECTRICAL_POWER_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_WATER_HEATER_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_COMMODITY_PRICE_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_MESSAGES_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_ENERGY_EVSE_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_ENERGY_PREFERENCE_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_POWER_TOPOLOGY_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_ENERGY_EVSE_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_WATER_HEATER_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_ELECTRICAL_GRID_CONDITIONS_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_DOOR_LOCK_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_WINDOW_COVERING_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_CLOSURE_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_CLOSURE_DIMENSION_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_SERVICE_AREA_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_THERMOSTAT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_FAN_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_BALLAST_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_ILLUMINANCE_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_TEMPERATURE_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_PRESSURE_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_FLOW_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_OCCUPANCY_SENSING_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_OZONE_CONCENTRATION_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_PM2_5_CONCENTRATION_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_FORMALDEHYDE_CONCENTRATION_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_PM1_CONCENTRATION_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_PM10_CONCENTRATION_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_TVOC_CONCENTRATION_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_RADON_CONCENTRATION_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_SOIL_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_WIFI_NETWORK_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_THREAD_BORDER_ROUTER_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_THREAD_NETWORK_DIRECTORY_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_WAKE_ON_LAN_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_CHANNEL_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_TARGET_NAVIGATOR_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_MEDIA_PLAYBACK_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_MEDIA_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_LOW_POWER_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_KEYPAD_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_AUDIO_OUTPUT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_APPLICATION_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_APPLICATION_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_ACCOUNT_LOGIN_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_CONTENT_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_CONTENT_APP_OBSERVER_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_ZONE_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_CAMERA_AV_SETTINGS_USER_LEVEL_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_WEB_RTC_TRANSPORT_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_WEB_RTC_TRANSPORT_REQUESTOR_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_PUSH_AV_STREAM_TRANSPORT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_CHIME_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_COMMODITY_TARIFF_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_ECOSYSTEM_INFORMATION_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_COMMISSIONER_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_JOINT_FABRIC_DATASTORE_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_JOINT_FABRIC_ADMINISTRATOR_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_TLS_CERTIFICATE_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_TLS_CLIENT_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_METER_IDENTIFICATION_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_COMMODITY_METERING_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_UNIT_TESTING_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_FAULT_INJECTION_CLUSTER_SERVER_ENDPOINT_COUNT (0) +#define MATTER_DM_SAMPLE_MEI_CLUSTER_SERVER_ENDPOINT_COUNT (0) + +#define MATTER_DM_IDENTIFY_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_GROUPS_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_ON_OFF_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_LEVEL_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_PWM_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_DESCRIPTOR_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_BINDING_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_ACCESS_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_ACTIONS_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_BASIC_INFORMATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define MATTER_DM_OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_LOCALIZATION_CONFIGURATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_TIME_FORMAT_LOCALIZATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_UNIT_LOCALIZATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_POWER_SOURCE_CONFIGURATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_POWER_SOURCE_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_GENERAL_COMMISSIONING_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_NETWORK_COMMISSIONING_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_DIAGNOSTIC_LOGS_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_GENERAL_DIAGNOSTICS_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_SOFTWARE_DIAGNOSTICS_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_TIME_SYNCHRONIZATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_SWITCH_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_ADMINISTRATOR_COMMISSIONING_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_OPERATIONAL_CREDENTIALS_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_GROUP_KEY_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_FIXED_LABEL_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_USER_LABEL_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_PROXY_CONFIGURATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_PROXY_DISCOVERY_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_PROXY_VALID_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_BOOLEAN_STATE_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_ICD_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_TIMER_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_OPERATIONAL_STATE_OVEN_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_OVEN_MODE_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_LAUNDRY_DRYER_CONTROLS_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_MODE_SELECT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_LAUNDRY_WASHER_MODE_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_LAUNDRY_WASHER_CONTROLS_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_RVC_RUN_MODE_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_RVC_CLEAN_MODE_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_TEMPERATURE_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_REFRIGERATOR_ALARM_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_DISHWASHER_MODE_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_AIR_QUALITY_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_SMOKE_CO_ALARM_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_DISHWASHER_ALARM_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_MICROWAVE_OVEN_MODE_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_MICROWAVE_OVEN_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_OPERATIONAL_STATE_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_OPERATIONAL_STATE_RVC_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_SCENES_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_HEPA_FILTER_MONITORING_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_BOOLEAN_STATE_CONFIGURATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_VALVE_CONFIGURATION_AND_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_ELECTRICAL_POWER_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_WATER_HEATER_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_COMMODITY_PRICE_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_MESSAGES_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_ENERGY_EVSE_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_ENERGY_PREFERENCE_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_POWER_TOPOLOGY_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_ENERGY_EVSE_MODE_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_WATER_HEATER_MODE_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_ELECTRICAL_GRID_CONDITIONS_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_DOOR_LOCK_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_WINDOW_COVERING_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_CLOSURE_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_CLOSURE_DIMENSION_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_SERVICE_AREA_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_THERMOSTAT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_FAN_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_COLOR_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_BALLAST_CONFIGURATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_ILLUMINANCE_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_TEMPERATURE_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_PRESSURE_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_FLOW_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_OCCUPANCY_SENSING_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_OZONE_CONCENTRATION_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_PM2_5_CONCENTRATION_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_FORMALDEHYDE_CONCENTRATION_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_PM1_CONCENTRATION_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_PM10_CONCENTRATION_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_TVOC_CONCENTRATION_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_RADON_CONCENTRATION_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_SOIL_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_WIFI_NETWORK_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_THREAD_BORDER_ROUTER_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_THREAD_NETWORK_DIRECTORY_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_WAKE_ON_LAN_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_CHANNEL_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_TARGET_NAVIGATOR_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_MEDIA_PLAYBACK_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_MEDIA_INPUT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_LOW_POWER_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_KEYPAD_INPUT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_CONTENT_LAUNCHER_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_AUDIO_OUTPUT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_APPLICATION_LAUNCHER_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_APPLICATION_BASIC_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_ACCOUNT_LOGIN_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_CONTENT_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_CONTENT_APP_OBSERVER_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_ZONE_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_CAMERA_AV_SETTINGS_USER_LEVEL_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_WEB_RTC_TRANSPORT_PROVIDER_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_WEB_RTC_TRANSPORT_REQUESTOR_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_PUSH_AV_STREAM_TRANSPORT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_CHIME_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_COMMODITY_TARIFF_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_ECOSYSTEM_INFORMATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_COMMISSIONER_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_JOINT_FABRIC_DATASTORE_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_JOINT_FABRIC_ADMINISTRATOR_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_TLS_CERTIFICATE_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_TLS_CLIENT_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_METER_IDENTIFICATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_COMMODITY_METERING_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_UNIT_TESTING_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_FAULT_INJECTION_CLUSTER_CLIENT_ENDPOINT_COUNT (0) +#define MATTER_DM_SAMPLE_MEI_CLUSTER_CLIENT_ENDPOINT_COUNT (0) + +/**** Cluster Plugins ****/ + +// Use this macro to check if the server side of the Identify cluster is included +#define ZCL_USING_IDENTIFY_CLUSTER_SERVER +#define MATTER_DM_PLUGIN_IDENTIFY_SERVER +#define MATTER_DM_PLUGIN_IDENTIFY + +// Use this macro to check if the server side of the Descriptor cluster is included +#define ZCL_USING_DESCRIPTOR_CLUSTER_SERVER +#define MATTER_DM_PLUGIN_DESCRIPTOR_SERVER +#define MATTER_DM_PLUGIN_DESCRIPTOR + +// Use this macro to check if the server side of the Access Control cluster is included +#define ZCL_USING_ACCESS_CONTROL_CLUSTER_SERVER +#define MATTER_DM_PLUGIN_ACCESS_CONTROL_SERVER +#define MATTER_DM_PLUGIN_ACCESS_CONTROL + +// Use this macro to check if the server side of the Basic Information cluster is included +#define ZCL_USING_BASIC_INFORMATION_CLUSTER_SERVER +#define MATTER_DM_PLUGIN_BASIC_INFORMATION_SERVER +#define MATTER_DM_PLUGIN_BASIC_INFORMATION + +// Use this macro to check if the client side of the OTA Software Update Provider cluster is included +#define ZCL_USING_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_CLIENT +#define MATTER_DM_PLUGIN_OTA_SOFTWARE_UPDATE_PROVIDER_CLIENT + +// Use this macro to check if the server side of the OTA Software Update Requestor cluster is included +#define ZCL_USING_OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER_SERVER +#define MATTER_DM_PLUGIN_OTA_SOFTWARE_UPDATE_REQUESTOR_SERVER +#define MATTER_DM_PLUGIN_OTA_SOFTWARE_UPDATE_REQUESTOR + +// Use this macro to check if the server side of the Power Source cluster is included +#define ZCL_USING_POWER_SOURCE_CLUSTER_SERVER +#define MATTER_DM_PLUGIN_POWER_SOURCE_SERVER +#define MATTER_DM_PLUGIN_POWER_SOURCE + +// Use this macro to check if the server side of the General Commissioning cluster is included +#define ZCL_USING_GENERAL_COMMISSIONING_CLUSTER_SERVER +#define MATTER_DM_PLUGIN_GENERAL_COMMISSIONING_SERVER +#define MATTER_DM_PLUGIN_GENERAL_COMMISSIONING + +// Use this macro to check if the server side of the Network Commissioning cluster is included +#define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER +#define MATTER_DM_PLUGIN_NETWORK_COMMISSIONING_SERVER +#define MATTER_DM_PLUGIN_NETWORK_COMMISSIONING + +// Use this macro to check if the server side of the Diagnostic Logs cluster is included +#define ZCL_USING_DIAGNOSTIC_LOGS_CLUSTER_SERVER +#define MATTER_DM_PLUGIN_DIAGNOSTIC_LOGS_SERVER +#define MATTER_DM_PLUGIN_DIAGNOSTIC_LOGS + +// Use this macro to check if the server side of the General Diagnostics cluster is included +#define ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER +#define MATTER_DM_PLUGIN_GENERAL_DIAGNOSTICS_SERVER +#define MATTER_DM_PLUGIN_GENERAL_DIAGNOSTICS + +// Use this macro to check if the server side of the Software Diagnostics cluster is included +#define ZCL_USING_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER +#define MATTER_DM_PLUGIN_SOFTWARE_DIAGNOSTICS_SERVER +#define MATTER_DM_PLUGIN_SOFTWARE_DIAGNOSTICS + +// Use this macro to check if the server side of the Thread Network Diagnostics cluster is included +#define ZCL_USING_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_SERVER +#define MATTER_DM_PLUGIN_THREAD_NETWORK_DIAGNOSTICS_SERVER +#define MATTER_DM_PLUGIN_THREAD_NETWORK_DIAGNOSTICS + +// Use this macro to check if the server side of the Administrator Commissioning cluster is included +#define ZCL_USING_ADMINISTRATOR_COMMISSIONING_CLUSTER_SERVER +#define MATTER_DM_PLUGIN_ADMINISTRATOR_COMMISSIONING_SERVER +#define MATTER_DM_PLUGIN_ADMINISTRATOR_COMMISSIONING + +// Use this macro to check if the server side of the Operational Credentials cluster is included +#define ZCL_USING_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER +#define MATTER_DM_PLUGIN_OPERATIONAL_CREDENTIALS_SERVER +#define MATTER_DM_PLUGIN_OPERATIONAL_CREDENTIALS + +// Use this macro to check if the server side of the Group Key Management cluster is included +#define ZCL_USING_GROUP_KEY_MANAGEMENT_CLUSTER_SERVER +#define MATTER_DM_PLUGIN_GROUP_KEY_MANAGEMENT_SERVER +#define MATTER_DM_PLUGIN_GROUP_KEY_MANAGEMENT + +// Use this macro to check if the server side of the Boolean State cluster is included +#define ZCL_USING_BOOLEAN_STATE_CLUSTER_SERVER +#define MATTER_DM_PLUGIN_BOOLEAN_STATE_SERVER +#define MATTER_DM_PLUGIN_BOOLEAN_STATE + +// Use this macro to check if the server side of the ICD Management cluster is included +#define ZCL_USING_ICD_MANAGEMENT_CLUSTER_SERVER +#define MATTER_DM_PLUGIN_ICD_MANAGEMENT_SERVER +#define MATTER_DM_PLUGIN_ICD_MANAGEMENT + +/**** Cluster Commands Flag ****/ +// AdministratorCommissioning Cluster Commands +#define ADMINISTRATOR_COMMISSIONING_ENABLE_OPEN_COMMISSIONING_WINDOW_CMD 1 +#define ADMINISTRATOR_COMMISSIONING_ENABLE_OPEN_BASIC_COMMISSIONING_WINDOW_CMD 1 +#define ADMINISTRATOR_COMMISSIONING_ENABLE_REVOKE_COMMISSIONING_CMD 1 + +// DiagnosticLogs Cluster Commands +#define DIAGNOSTIC_LOGS_ENABLE_RETRIEVE_LOGS_REQUEST_CMD 1 + +// GeneralCommissioning Cluster Commands +#define GENERAL_COMMISSIONING_ENABLE_ARM_FAIL_SAFE_CMD 1 +#define GENERAL_COMMISSIONING_ENABLE_SET_REGULATORY_CONFIG_CMD 1 +#define GENERAL_COMMISSIONING_ENABLE_COMMISSIONING_COMPLETE_CMD 1 + +// GeneralDiagnostics Cluster Commands +#define GENERAL_DIAGNOSTICS_ENABLE_TEST_EVENT_TRIGGER_CMD 1 +#define GENERAL_DIAGNOSTICS_ENABLE_TIME_SNAPSHOT_CMD 1 + +// GroupKeyManagement Cluster Commands +#define GROUP_KEY_MANAGEMENT_ENABLE_KEY_SET_WRITE_CMD 1 +#define GROUP_KEY_MANAGEMENT_ENABLE_KEY_SET_READ_CMD 1 +#define GROUP_KEY_MANAGEMENT_ENABLE_KEY_SET_REMOVE_CMD 1 +#define GROUP_KEY_MANAGEMENT_ENABLE_KEY_SET_READ_ALL_INDICES_CMD 1 + +// IcdManagement Cluster Commands +#define ICD_MANAGEMENT_ENABLE_REGISTER_CLIENT_CMD 1 +#define ICD_MANAGEMENT_ENABLE_UNREGISTER_CLIENT_CMD 1 +#define ICD_MANAGEMENT_ENABLE_STAY_ACTIVE_REQUEST_CMD 1 + +// Identify Cluster Commands +#define IDENTIFY_ENABLE_IDENTIFY_CMD 1 +#define IDENTIFY_ENABLE_TRIGGER_EFFECT_CMD 1 + +// NetworkCommissioning Cluster Commands +#define NETWORK_COMMISSIONING_ENABLE_SCAN_NETWORKS_CMD 1 +#define NETWORK_COMMISSIONING_ENABLE_ADD_OR_UPDATE_WI_FI_NETWORK_CMD 1 +#define NETWORK_COMMISSIONING_ENABLE_ADD_OR_UPDATE_THREAD_NETWORK_CMD 1 +#define NETWORK_COMMISSIONING_ENABLE_REMOVE_NETWORK_CMD 1 +#define NETWORK_COMMISSIONING_ENABLE_CONNECT_NETWORK_CMD 1 +#define NETWORK_COMMISSIONING_ENABLE_REORDER_NETWORK_CMD 1 + +// OtaSoftwareUpdateRequestor Cluster Commands +#define OTA_SOFTWARE_UPDATE_REQUESTOR_ENABLE_ANNOUNCE_OTA_PROVIDER_CMD 1 + +// OperationalCredentials Cluster Commands +#define OPERATIONAL_CREDENTIALS_ENABLE_ATTESTATION_REQUEST_CMD 1 +#define OPERATIONAL_CREDENTIALS_ENABLE_CERTIFICATE_CHAIN_REQUEST_CMD 1 +#define OPERATIONAL_CREDENTIALS_ENABLE_CSR_REQUEST_CMD 1 +#define OPERATIONAL_CREDENTIALS_ENABLE_ADD_NOC_CMD 1 +#define OPERATIONAL_CREDENTIALS_ENABLE_UPDATE_NOC_CMD 1 +#define OPERATIONAL_CREDENTIALS_ENABLE_UPDATE_FABRIC_LABEL_CMD 1 +#define OPERATIONAL_CREDENTIALS_ENABLE_REMOVE_FABRIC_CMD 1 +#define OPERATIONAL_CREDENTIALS_ENABLE_ADD_TRUSTED_ROOT_CERTIFICATE_CMD 1 + +// ThreadNetworkDiagnostics Cluster Commands +#define THREAD_NETWORK_DIAGNOSTICS_ENABLE_RESET_COUNTS_CMD 1 diff --git a/samples/matter/contact_sensor/src/main.cpp b/samples/matter/contact_sensor/src/main.cpp new file mode 100644 index 000000000000..ae6b435486a1 --- /dev/null +++ b/samples/matter/contact_sensor/src/main.cpp @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include "app_task.h" + +#include + +LOG_MODULE_REGISTER(app, CONFIG_CHIP_APP_LOG_LEVEL); + +int main() +{ + CHIP_ERROR err = AppTask::Instance().StartApp(); + + LOG_ERR("Exited with code %" CHIP_ERROR_FORMAT, err.Format()); + return err == CHIP_NO_ERROR ? EXIT_SUCCESS : EXIT_FAILURE; +} diff --git a/samples/matter/contact_sensor/sysbuild.conf b/samples/matter/contact_sensor/sysbuild.conf new file mode 100644 index 000000000000..84fbafd3c29f --- /dev/null +++ b/samples/matter/contact_sensor/sysbuild.conf @@ -0,0 +1,7 @@ +# +# Copyright (c) 2025 Nordic Semiconductor +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +SB_CONFIG_MATTER=y diff --git a/samples/matter/contact_sensor/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf b/samples/matter/contact_sensor/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf new file mode 100644 index 000000000000..8476b1077adc --- /dev/null +++ b/samples/matter/contact_sensor/sysbuild/ipc_radio/boards/nrf5340dk_nrf5340_cpunet.conf @@ -0,0 +1,50 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Disable serial and UART interface. +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +# RAM usage configuration +CONFIG_HEAP_MEM_POOL_SIZE=8192 +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# BT configuration +CONFIG_BT=y +CONFIG_BT_HCI_RAW=y +CONFIG_BT_MAX_CONN=1 +CONFIG_BT_CTLR_ASSERT_HANDLER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_CENTRAL=n +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=251 + +# It is set based on BT_BUF_ACL_RX_COUNT_EXTRA = 6 - (BT_MAX_CONN + 1) +CONFIG_BT_BUF_ACL_RX_COUNT_EXTRA=4 + +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 +CONFIG_BT_CTLR_PHY_2M=n + +# Debug and assert configuration +CONFIG_ASSERT=y +CONFIG_DEBUG_INFO=y +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_REBOOT=n + +# IPC +CONFIG_MBOX=y +CONFIG_IPC_SERVICE=y + +# ipc_radio +CONFIG_IPC_RADIO_BT=y +CONFIG_IPC_RADIO_BT_HCI_IPC=y + +# NRF_802154_ENCRYPTION is not enabled by default in the `overlay-802154.conf` file +# that is pulled in by NETCORE_IPC_RADIO_IEEE802154 in application's Kconfig.sysbuild. +# For Wi-Fi builds, this option will not get applied anyway. +CONFIG_NRF_802154_ENCRYPTION=y diff --git a/samples/matter/contact_sensor/sysbuild/ipc_radio/prj.conf b/samples/matter/contact_sensor/sysbuild/ipc_radio/prj.conf new file mode 100644 index 000000000000..cd5cc80897c8 --- /dev/null +++ b/samples/matter/contact_sensor/sysbuild/ipc_radio/prj.conf @@ -0,0 +1,14 @@ +# +# Copyright (c) 2025 Nordic Semiconductor +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=n + +# Workaround for the spinlock assertion issue. +CONFIG_TIMESLICE_SIZE=0 diff --git a/samples/matter/contact_sensor/sysbuild/ipc_radio/prj_release.conf b/samples/matter/contact_sensor/sysbuild/ipc_radio/prj_release.conf new file mode 100644 index 000000000000..30bcf70d3140 --- /dev/null +++ b/samples/matter/contact_sensor/sysbuild/ipc_radio/prj_release.conf @@ -0,0 +1,14 @@ +# +# Copyright (c) 2025 Nordic Semiconductor +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_LOG=n + +CONFIG_RESET_ON_FATAL_ERROR=y + +# Workaround for the spinlock assertion issue. +CONFIG_TIMESLICE_SIZE=0 diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/app.overlay b/samples/matter/contact_sensor/sysbuild/mcuboot/app.overlay new file mode 100644 index 000000000000..74d3dfbfd22f --- /dev/null +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/app.overlay @@ -0,0 +1,5 @@ +/ { + chosen { + zephyr,code-partition = &boot_partition; + }; +}; diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf new file mode 100644 index 000000000000..82e9731ccf9a --- /dev/null +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf @@ -0,0 +1,9 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 000000000000..010476d7854a --- /dev/null +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf new file mode 100644 index 000000000000..82e9731ccf9a --- /dev/null +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -0,0 +1,9 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 000000000000..d0f107e9d92b --- /dev/null +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + zephyr,code-partition = &boot_partition; + nordic,pm-ext-flash = &mx25r64; + }; +}; + +/* Disable GPIO forwarder for nRF7002 EK compatibility */ +&gpio_fwd { + status = "disabled"; +}; diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf new file mode 100644 index 000000000000..05428a3e0cdc --- /dev/null +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -0,0 +1,27 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# TODO: Workaround, disable memory guard to avoid false faults in application after boot +CONFIG_HW_STACK_PROTECTION=n + +CONFIG_BOOT_WATCHDOG_FEED=n + +# nRF54L15DK uses SPI NOR external flash +CONFIG_GPIO=y +CONFIG_SPI=y +CONFIG_SPI_NOR=y +CONFIG_SPI_NOR_SFDP_DEVICETREE=y +CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 + +# Adjust the maximum sectors to the app image size of ~1.4MB +CONFIG_BOOT_MAX_IMG_SECTORS=512 + +# Currently, without tickless kernel, the SYSCOUNTER value after the software +# reset is not set properly and due to that the first system interrupt is not called +# in the proper time - the SYSCOUNTER value is set to the value from before +# reset + 1. Hence, the reboot time increases more and more. +# To avoid it enable tickles kernel for mcuboot. +CONFIG_TICKLESS_KERNEL=y diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay new file mode 100644 index 000000000000..46808ccccb9b --- /dev/null +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ +&cpuapp_rram { + reg = <0x0 DT_SIZE_K(1524)>; +}; + +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 0x40000>; +}; + +&mx25r64 { + status = "okay"; +}; diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf new file mode 100644 index 000000000000..eb809a84a9fa --- /dev/null +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf @@ -0,0 +1,25 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_HW_STACK_PROTECTION=n +CONFIG_BOOT_WATCHDOG_FEED=n + +# nRF54LM20DK uses SPI NOR external flash +CONFIG_GPIO=y +CONFIG_SPI=y +CONFIG_SPI_NOR=y +CONFIG_SPI_NOR_SFDP_DEVICETREE=y +CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 + +# Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). +CONFIG_BOOT_MAX_IMG_SECTORS=512 + +# Currently, without tickless kernel, the SYSCOUNTER value after the software +# reset is not set properly and due to that the first system interrupt is not called +# in the proper time - the SYSCOUNTER value is set to the value from before +# reset + 1. Hence, the reboot time increases more and more. +# To avoid it enable tickles kernel for mcuboot. +CONFIG_TICKLESS_KERNEL=y diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay new file mode 100644 index 000000000000..3ae2703e6ea2 --- /dev/null +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ +&cpuapp_rram { + reg = <0x0 DT_SIZE_K(2036)>; +}; + +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(512)>; + ranges = <0x0 0x20000000 0x80000>; +}; + +&mx25r64 { + status = "okay"; +}; diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf new file mode 100644 index 000000000000..9010d99d03a8 --- /dev/null +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf @@ -0,0 +1,30 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_HW_STACK_PROTECTION=n +CONFIG_BOOT_WATCHDOG_FEED=n + +# Disable all debug features +CONFIG_ASSERT_VERBOSE=n +CONFIG_ASSERT_NO_FILE_INFO=y +CONFIG_PRINTK=n + +# Bootloader size optimization to fit into 28 KB partition. +# These options can be safely disabled because in this configuration, +# the secondary slot resides in the internal RRAM, so features +# needed to handle the external flash are not needed. +CONFIG_SPI_NOR=n +CONFIG_SPI=n + +# Increase the maximum number of sectors to 512 to fit the big image size (> 1024 kB). +CONFIG_BOOT_MAX_IMG_SECTORS=512 + +# Currently, without tickless kernel, the SYSCOUNTER value after the software +# reset is not set properly and due to that the first system interrupt is not called +# in the proper time - the SYSCOUNTER value is set to the value from before +# reset + 1. Hence, the reboot time increases more and more. +# To avoid it enable tickles kernel for mcuboot. +CONFIG_TICKLESS_KERNEL=y diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay new file mode 100644 index 000000000000..6defb643b877 --- /dev/null +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/boards/nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/* restore full RRAM and SRAM space - by default some parts are dedicated to FLRP */ +&cpuapp_rram { + reg = <0x0 DT_SIZE_K(2036)>; +}; + +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(512)>; + ranges = <0x0 0x20000000 0x80000>; +}; + +/* Disable the external flash, as it's not needed + * for the configuration with secondary slot residing + * in the internal RRAM. + */ +&mx25r64 { + status = "disabled"; +}; diff --git a/samples/matter/contact_sensor/sysbuild/mcuboot/prj.conf b/samples/matter/contact_sensor/sysbuild/mcuboot/prj.conf new file mode 100644 index 000000000000..b12df71001e5 --- /dev/null +++ b/samples/matter/contact_sensor/sysbuild/mcuboot/prj.conf @@ -0,0 +1,42 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_MAIN_STACK_SIZE=10240 + +CONFIG_BOOT_SWAP_SAVE_ENCTLV=n +CONFIG_BOOT_BOOTSTRAP=n +CONFIG_PM=n + +CONFIG_FLASH=y +CONFIG_FPROTECT=y + +# Enable cbprintf nano to decrease memory usage +CONFIG_CBPRINTF_NANO=y + +# Bootloader size optimization +CONFIG_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_USE_SEGGER_RTT=n +CONFIG_GPIO=n + +CONFIG_BOOT_MAX_IMG_SECTORS=256 + +CONFIG_LOG=n +CONFIG_CONSOLE_HANDLER=n +CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n +CONFIG_TIMESLICING=n +CONFIG_RESET_ON_FATAL_ERROR=n +CONFIG_MULTITHREADING=n +CONFIG_TICKLESS_KERNEL=n +CONFIG_TIMEOUT_64BIT=n +CONFIG_NRF_ENABLE_ICACHE=n +CONFIG_SIZE_OPTIMIZATIONS=y + +# Activate LTO +CONFIG_LTO=y +CONFIG_ISR_TABLES_LOCAL_DECLARATION=y diff --git a/samples/matter/contact_sensor/sysbuild_internal.conf b/samples/matter/contact_sensor/sysbuild_internal.conf new file mode 100644 index 000000000000..08b5c767682e --- /dev/null +++ b/samples/matter/contact_sensor/sysbuild_internal.conf @@ -0,0 +1,13 @@ +# +# Copyright (c) 2025 Nordic Semiconductor +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +SB_CONFIG_MATTER=y +SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=n +SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=n + +# Enable the DFU image compression. +SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY=y +SB_CONFIG_MCUBOOT_COMPRESSED_IMAGE_SUPPORT=y diff --git a/scripts/quarantine_integration.yaml b/scripts/quarantine_integration.yaml index 0ccbeff2a4df..4afb6b97e5c7 100644 --- a/scripts/quarantine_integration.yaml +++ b/scripts/quarantine_integration.yaml @@ -18,7 +18,7 @@ - sample.matter.light_bulb.memory_profiling - sample.matter.smoke_co_alarm.release.power_consumption - sample.matter.temperature_sensor.release - - sample.matter.temperature_sensor.release.power_consumption + - sample.matter.contact_sensor.release platforms: - nrf52840dk/nrf52840 comment: "Configurations excluded to limit resources usage in integration builds" @@ -38,7 +38,7 @@ - sample.matter.window_cover.release.power_consumption - sample.matter.smoke_co_alarm.release.power_consumption - sample.matter.temperature_sensor.release - - sample.matter.temperature_sensor.release.power_consumption + - sample.matter.contact_sensor.release - sample.matter.thermostat.ext_temp - sample.matter.light_bulb.memory_profiling - applications.matter_bridge.br_ble.memory_profiling @@ -96,7 +96,7 @@ - sample.matter.window_cover.release.power_consumption - sample.matter.smoke_co_alarm.release.power_consumption - sample.matter.temperature_sensor.release - - sample.matter.temperature_sensor.release.power_consumption + - sample.matter.contact_sensor.release platforms: - nrf54l15dk/nrf54l15/cpuapp comment: "Configurations excluded to limit resources usage in integration builds"