From bd80505cbe906faa4121d73987beb16c676dbbf5 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk Date: Thu, 20 Mar 2025 14:36:14 +0100 Subject: [PATCH] samples: matter: Added custom events to the Matter MS sample Added custom events to NordicDevKit and Basic Information clusters: * UserButtonChanged emitted on UserButton state change * RandomNumberChanged emitted on RandomNumber change Updated the documentation to contain steps for the events. Additionally fixed ids for attributes and commands that were not compatible with the spec and fixed few minor issues in the documentation. Signed-off-by: Kamil Kasperczyk --- .../getting_started/custom_clusters.rst | 20 +- .../matter/manufacturer_specific/README.rst | 49 +- .../manufacturer_specific/src/app_task.cpp | 34 +- .../src/default_zap/NordicDevKitCluster.xml | 14 +- .../src/default_zap/manufacturer_specific.zap | 124 +++-- .../zap-generated/attributes/Accessors.cpp | 196 +++---- .../zap-generated/attributes/Accessors.h | 36 +- .../zap-generated/cluster-objects.cpp | 54 +- .../zap-generated/cluster-objects.h | 209 +++++-- .../app-common/zap-generated/ids/Attributes.h | 30 +- .../app-common/zap-generated/ids/Commands.h | 2 +- .../app-common/zap-generated/ids/Events.h | 18 + .../zap-generated/endpoint_config.h | 522 ++++++++++-------- 13 files changed, 776 insertions(+), 532 deletions(-) diff --git a/doc/nrf/protocols/matter/getting_started/custom_clusters.rst b/doc/nrf/protocols/matter/getting_started/custom_clusters.rst index 508638b6dd5a..c045e4ba32f6 100644 --- a/doc/nrf/protocols/matter/getting_started/custom_clusters.rst +++ b/doc/nrf/protocols/matter/getting_started/custom_clusters.rst @@ -108,13 +108,13 @@ See the description of each element in the following tabs: 0xFFF1FC01 MY_NEW_CLUSTER The MyNewCluster cluster showcases a cluster manufacturer extensions - MyAttribute - + MyAttribute + Command that takes two uint8 arguments and returns their sum. - + Event that is generated by the server. @@ -153,6 +153,8 @@ See the description of each element in the following tabs: * ``source`` - Specifies whether the event originates from the client or server. * ``code`` - A unique identifier for the event within the cluster. * ``name`` - The name of the event. + * ``priority`` - The priority of the event. + The valid values are ``debug``, ``info``, and ``critical``. * ``optional`` - Indicates whether the event is optional. * ``description`` - A brief description of the event's purpose and functionality. * ``arg`` - An argument for the event, specifying its name and type. @@ -169,7 +171,7 @@ See the description of each element in the following tabs: - + Event that is generated by the server. @@ -297,13 +299,13 @@ You can use the following template for the :file:`MyCluster.xml` file: 0xFFF1FC01 MY_NEW_CLUSTER The MyNewCluster cluster showcases a cluster manufacturer extensions - MyAttribute - + MyAttribute + Command that takes two uint8 arguments and returns their sum. - + Event that is generated by the server. @@ -315,7 +317,7 @@ You can use the following template for the :file:`MyCluster.xml` file: - + Event that is generated by the server. @@ -361,7 +363,7 @@ This guide focuses on the :ref:`ug_matter_gs_tools_matter_west_commands_zap_tool .. code-block:: - west zap-gui -j ./zcl.json ./MyCluster.xml + west zap-gui -j ./zcl.json --clusters ./MyCluster.xml This example command copies the original :file:`/src/app/zap-templates/zcl/zcl.json` file, adds the :file:`MyCluster.xml` cluster, and saves the new :file:`zcl.json` file in the sample directory. The newly generated :file:`zcl.json` file is used as an input to the ZAP tool. diff --git a/samples/matter/manufacturer_specific/README.rst b/samples/matter/manufacturer_specific/README.rst index a0d42155f1e4..d0f40c31fd26 100644 --- a/samples/matter/manufacturer_specific/README.rst +++ b/samples/matter/manufacturer_specific/README.rst @@ -37,32 +37,33 @@ The development kits for this sample offer the following IPv6 network support fo Overview ******** + +The sample starts the Bluetooth® LE advertising automatically and prepares the Matter device for commissioning into a Matter-enabled IPv6 network. + .. tabs:: .. group-tab:: nRF52, nRF53 and nRF70 DKs - The sample starts the Bluetooth® LE advertising automatically and prepares the Matter device for commissioning into a Matter-enabled IPv6 network. The sample uses the **LED 1** to show the state of the connection. You can press **Button 1** to start the factory reset when needed. **Button 2** is used to set the state of the ``NordicDevkit`` cluster's attribute, ``UserButton``. - Matter command ``SetLED`` is used to control the state of ``UserLED``. - It takes one argument - the action to be performed (``0`` to turn the LED off, ``1`` to turn it on, ``2`` to toggle the state). **LED 2** reflects the state of the ``UserLED``. - The ``NordicDevkit`` cluster introduces a writable ``DevKitName`` attribute, of string type as well. - The sample additionally extends the ``Basic Information`` cluster with a ``RandomNumber`` attribute and ``GenerateRandom`` command that updates the ``RandomNumber`` with a random value. .. group-tab:: nRF54 DKs - The sample starts the Bluetooth LE advertising automatically and prepares the Matter device for commissioning into a Matter-enabled IPv6 network. The sample uses the **LED 0** to show the state of the connection. You can press **Button 0** to start the factory reset when needed. **Button 1** is used to set the state of the ``NordicDevkit`` cluster's attribute, ``UserButton``. - Matter command ``SetLED`` is used to control the state of ``UserLED``. - It takes one argument - the action to be performed (``0`` to turn the LED off, ``1`` to turn it on, ``2`` to toggle the state). **LED 1** reflects the state of the ``UserLED``. - The ``NordicDevkit`` cluster introduces a writable ``DevKitName`` attribute, of string type as well. - The sample additionally extends the ``Basic Information`` cluster with a ``RandomNumber`` attribute and ``GenerateRandom`` command that updates the ``RandomNumber`` with a random value. +The Matter command ``SetLED`` is used to control the state of ``UserLED``. +It takes one argument - the action to be performed (``0`` to turn the LED off, ``1`` to turn it on, ``2`` to toggle the state). +The ``UserButtonChanged`` event is generated when the ``UserButton`` attribute is changed. + +The ``NordicDevkit`` cluster introduces a writable ``DevKitName`` attribute, of string type as well. +The sample additionally extends the ``Basic Information`` cluster with a ``RandomNumber`` attribute and ``GenerateRandom`` command that updates the ``RandomNumber`` with a random value. +The ``RandomNumberChanged`` event is generated when the ``RandomNumber`` attribute is changed. +The ``RandomNumber`` attribute value is not persistent and it is generated on each application's boot. Custom manufacturer-specific cluster ==================================== @@ -132,7 +133,7 @@ User interface .. include:: /includes/matter_sample_button.txt Button 2: - Sets the state of ``UserButton`` attribute in the ``NordicDevkit`` cluster. + Sets the state of ``UserButton`` attribute in the ``NordicDevkit`` cluster to ``true`` on press and ``false`` on release. .. include:: /includes/matter_segger_usb.txt @@ -148,7 +149,7 @@ User interface .. include:: /includes/matter_sample_button.txt Button 1: - Sets the state of ``UserButton`` attribute in the ``NordicDevkit`` cluster. + Sets the state of ``UserButton`` attribute in the ``NordicDevkit`` cluster to ``true`` on press and ``false`` on release. .. include:: /includes/matter_segger_usb.txt @@ -234,16 +235,16 @@ To test ``NordicDevkit`` cluster's attributes and commands, complete the followi .. parsed-literal:: :class: highlight - any read-by-id read-by-id 0xFFF1FC01 *attribute-id* 1 1 + any read-by-id 0xFFF1FC01 *attribute-id* 1 1 - * *attribute-id* is the attribute's ID, equal to ``1`` for ``DevKitName``, ``2`` for ``UserLED`` and ``3`` for ``UserButton`` attributes for the ``NordicDevkit`` cluster in this sample. + * *attribute-id* is the attribute's ID, equal to ``0xFFF10000`` for ``DevKitName``, ``0xFFF10001`` for ``UserLED`` and ``0xFFF10002`` for ``UserButton`` attributes for the ``NordicDevkit`` cluster in this sample. #. Verify that all attributes have been read correctly and are equal to the default values defined in cluster's configuration. #. Write the ``DevkitName`` attribute: .. parsed-literal:: :class: highlight - any write-by-id 0xFFF1FC01 1 "NewName" 1 1 + any write-by-id 0xFFF1FC01 0xFFF10000 "NewName" 1 1 #. Read the ``DevkitName`` attribute again to check if it has changed. #. Send the ``SetLED`` command to the device to control the LED state: @@ -251,7 +252,7 @@ To test ``NordicDevkit`` cluster's attributes and commands, complete the followi .. parsed-literal:: :class: highlight - any command-by-id 0xFFF1FC01 0 '{ "0x0": "u:*action*" }' 1 1 + any command-by-id 0xFFF1FC01 0xFFF10000 '{ "0x0": "u:*action*" }' 1 1 * *action* is the action that should be performed on LED attribute: ``0`` to turn the LED off, ``1`` to turn it on, ``2`` to toggle the state. @@ -261,9 +262,16 @@ To test ``NordicDevkit`` cluster's attributes and commands, complete the followi .. parsed-literal:: :class: highlight - any subscribe-by-id 0xFFF1FC01 3 0 120 1 1 + any subscribe-by-id 0xFFF1FC01 0xFFF10002 0 120 1 1 #. Press the button assigned to the ``UserButton`` and check if the attribute state is updated in the chip-tool. +#. Read the ``UserButtonChanged`` event to check that events were generated on ``UserButton`` attribute changes. + + .. parsed-literal:: + :class: highlight + + any read-event-by-id 0xFFF1FC01 0xFFF10000 1 1 + #. Read the ``Basic Information`` cluster's ``RandomNumber`` attribute: .. parsed-literal:: @@ -279,6 +287,13 @@ To test ``NordicDevkit`` cluster's attributes and commands, complete the followi any command-by-id 0x0028 0 '{}' 1 0 #. Verify that the random value has been generated and the attribute value is updated. +#. Read the ``Basic Information`` cluster's ``RandomNumberChanged`` event to check that events were generated on ``RandomNumber`` attribute changes. + + .. parsed-literal:: + :class: highlight + + any read-event-by-id 0x0028 0x4 1 0 + #. Reboot the device, restart the chip-tool, and check if the attributes are persisting after joining the network. Upgrading the device firmware diff --git a/samples/matter/manufacturer_specific/src/app_task.cpp b/samples/matter/manufacturer_specific/src/app_task.cpp index 7a3c1b5db4e8..6861e4312c1f 100644 --- a/samples/matter/manufacturer_specific/src/app_task.cpp +++ b/samples/matter/manufacturer_specific/src/app_task.cpp @@ -14,11 +14,13 @@ #include +#include +#include #include -#include -#include #include +#include +#include LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); @@ -35,7 +37,7 @@ constexpr EndpointId kNordicDevKitEndpointId = 1; static void ButtonEventHandler(Nrf::ButtonState /* unused */, Nrf::ButtonMask has_changed) { - /* Handle button press */ + /* Handle button press */ if (ConnectivityMgrImpl().IsIPv6NetworkProvisioned() && ConnectivityMgrImpl().IsIPv6NetworkEnabled() && BUTTON2_MASK & has_changed) { AppTask::Instance().UpdateNordicDevkitClusterState(); @@ -50,19 +52,29 @@ void AppTask::UpdateNordicDevkitClusterState() dk_read_buttons(&button_state, nullptr); - status = Clusters::NordicDevKit::Attributes::UserLED::Set(kNordicDevKitEndpointId, - Nrf::GetBoard().GetLED(Nrf::DeviceLeds::LED2).GetState()); + status = Clusters::NordicDevKit::Attributes::UserLED::Set( + kNordicDevKitEndpointId, Nrf::GetBoard().GetLED(Nrf::DeviceLeds::LED2).GetState()); if (status != Protocols::InteractionModel::Status::Success) { LOG_ERR("Updating NordicDevkit cluster failed: %x", to_underlying(status)); } status = Clusters::NordicDevKit::Attributes::UserButton::Set(kNordicDevKitEndpointId, - BUTTON2_MASK & button_state); + BUTTON2_MASK & button_state); if (status != Protocols::InteractionModel::Status::Success) { LOG_ERR("Updating NordicDevkit cluster failed: %x", to_underlying(status)); } + + for (auto endpoint : EnabledEndpointsWithServerCluster(Clusters::NordicDevKit::Id)) { + /* If NordicDevKit cluster is implemented on this endpoint */ + Clusters::NordicDevKit::Events::UserButtonChanged::Type event; + EventNumber eventNumber; + + if (CHIP_NO_ERROR != LogEvent(event, endpoint, eventNumber)) { + ChipLogError(Zcl, "Failed to emit UserButtonChanged event"); + } + } }); } @@ -77,6 +89,16 @@ void AppTask::UpdateBasicInformationClusterState() if (status != Protocols::InteractionModel::Status::Success) { LOG_ERR("Updating Basic information cluster failed: %x", to_underlying(status)); } + + for (auto endpoint : EnabledEndpointsWithServerCluster(Clusters::BasicInformation::Id)) { + /* If Basic cluster is implemented on this endpoint */ + Clusters::BasicInformation::Events::RandomNumberChanged::Type event; + EventNumber eventNumber; + + if (CHIP_NO_ERROR != LogEvent(event, endpoint, eventNumber)) { + ChipLogError(Zcl, "Failed to emit RandomNumberChanged event"); + } + } }); } diff --git a/samples/matter/manufacturer_specific/src/default_zap/NordicDevKitCluster.xml b/samples/matter/manufacturer_specific/src/default_zap/NordicDevKitCluster.xml index 818efb73ab09..620988649d0d 100644 --- a/samples/matter/manufacturer_specific/src/default_zap/NordicDevKitCluster.xml +++ b/samples/matter/manufacturer_specific/src/default_zap/NordicDevKitCluster.xml @@ -12,19 +12,25 @@ 0xFFF1FC01 NORDIC_DEV_KIT_CLUSTER The NordicDevKit cluster showcases a cluster manufacturer extensions - + Change LED state - DevKitName - UserLED - UserButton + DevKitName + UserLED + UserButton + + The UserButtonChanged event SHALL be emitted by a Node as soon as the User Button is pressed or released. + Generate random number RandomNumber + + The RandomNumberChanged event SHALL be emitted by a Node as soon as the RandomNumber attribute is changed. + nordic-dev-kit diff --git a/samples/matter/manufacturer_specific/src/default_zap/manufacturer_specific.zap b/samples/matter/manufacturer_specific/src/default_zap/manufacturer_specific.zap index a93db934a2b8..09f830f264bd 100644 --- a/samples/matter/manufacturer_specific/src/default_zap/manufacturer_specific.zap +++ b/samples/matter/manufacturer_specific/src/default_zap/manufacturer_specific.zap @@ -17,13 +17,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../../../../modules/lib/matter/src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "category": "matter", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "zcl.json", @@ -31,6 +24,13 @@ "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": [ @@ -867,6 +867,13 @@ "mfgCode": null, "side": "server", "included": 1 + }, + { + "name": "RandomNumberChanged", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1 } ] }, @@ -2682,7 +2689,7 @@ "commands": [ { "name": "SetLED", - "code": 0, + "code": 4293984256, "mfgCode": null, "source": "client", "isIncoming": 0, @@ -2700,7 +2707,7 @@ "commands": [ { "name": "SetLED", - "code": 0, + "code": 4293984256, "mfgCode": null, "source": "client", "isIncoming": 1, @@ -2709,56 +2716,56 @@ ], "attributes": [ { - "name": "DevKitName", - "code": 1, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "array", "included": 1, - "storageOption": "NVM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "Nordic Development Kit", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "UserLED", - "code": 2, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, - "storageOption": "NVM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "false", - "reportable": 0, + "defaultValue": null, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "UserButton", - "code": 3, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "false", - "reportable": 0, + "defaultValue": null, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -2766,92 +2773,101 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "array", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "DevKitName", + "code": 4293984256, "mfgCode": null, "side": "server", - "type": "array", + "type": "char_string", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "Nordic Development Kit", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "UserLED", + "code": 4293984257, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "boolean", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", - "reportable": 1, + "defaultValue": "false", + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "UserButton", + "code": 4293984258, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "boolean", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", - "reportable": 1, + "defaultValue": "false", + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 } + ], + "events": [ + { + "name": "UserButtonChanged", + "code": 4293984256, + "mfgCode": null, + "side": "server", + "included": 1 + } ] } ] diff --git a/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/attributes/Accessors.cpp b/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/attributes/Accessors.cpp index e352e02d7437..45841005dacc 100644 --- a/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/attributes/Accessors.cpp +++ b/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/attributes/Accessors.cpp @@ -44615,73 +44615,65 @@ namespace app namespace Attributes { - namespace DevKitName + namespace FeatureMap { - Protocols::InteractionModel::Status Get(EndpointId endpoint, - chip::MutableCharSpan &value) + Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t *value) { - uint8_t zclString[254 + 1]; + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t *readable = Traits::ToAttributeStoreRepresentation(temp); Protocols::InteractionModel::Status status = emberAfReadAttribute(endpoint, Clusters::NordicDevKit::Id, Id, - zclString, sizeof(zclString)); + readable, sizeof(temp)); VerifyOrReturnError( Protocols::InteractionModel::Status::Success == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) { + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return Protocols::InteractionModel::Status::ConstraintError; } - - VerifyOrReturnError( - value.size() == 254, - Protocols::InteractionModel::Status::InvalidDataType); - memcpy(value.data(), &zclString[1], 254); - value.reduce_size(length); + *value = Traits::StorageToWorking(temp); return status; } - Protocols::InteractionModel::Status - Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) + Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, + MarkAttributeDirty markDirty) { - static_assert(254 < NumericAttributeTraits::kNullValue, - "value.size() might be too big"); - VerifyOrReturnError( - value.size() <= 254, - Protocols::InteractionModel::Status::ConstraintError); - uint8_t zclString[254 + 1]; - auto length = static_cast(value.size()); - Encoding::Put8(zclString, length); - memcpy(&zclString[1], value.data(), value.size()); + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t *writable = + Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteAttribute( ConcreteAttributePath(endpoint, Clusters::NordicDevKit::Id, Id), - EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE) + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE) .SetMarkDirty(markDirty)); } - Protocols::InteractionModel::Status Set(EndpointId endpoint, - chip::CharSpan value) + Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { - static_assert(254 < NumericAttributeTraits::kNullValue, - "value.size() might be too big"); - VerifyOrReturnError( - value.size() <= 254, - Protocols::InteractionModel::Status::ConstraintError); - uint8_t zclString[254 + 1]; - auto length = static_cast(value.size()); - Encoding::Put8(zclString, length); - memcpy(&zclString[1], value.data(), value.size()); + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t *writable = + Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteAttribute(endpoint, Clusters::NordicDevKit::Id, Id, - zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } - } // namespace DevKitName + } // namespace FeatureMap - namespace UserLED + namespace ClusterRevision { - Protocols::InteractionModel::Status Get(EndpointId endpoint, bool *value) + Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t *value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t *readable = Traits::ToAttributeStoreRepresentation(temp); Protocols::InteractionModel::Status status = @@ -44696,10 +44688,10 @@ namespace app return status; } - Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, + Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; } @@ -44709,13 +44701,13 @@ namespace app Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteAttribute( ConcreteAttributePath(endpoint, Clusters::NordicDevKit::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE) + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE) .SetMarkDirty(markDirty)); } - Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) + Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; } @@ -44724,70 +44716,78 @@ namespace app uint8_t *writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteAttribute(endpoint, Clusters::NordicDevKit::Id, Id, - writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + writable, ZCL_INT16U_ATTRIBUTE_TYPE); } - } // namespace UserLED + } // namespace ClusterRevision - namespace UserButton + namespace DevKitName { - Protocols::InteractionModel::Status Get(EndpointId endpoint, bool *value) + Protocols::InteractionModel::Status Get(EndpointId endpoint, + chip::MutableCharSpan &value) { - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t *readable = Traits::ToAttributeStoreRepresentation(temp); + uint8_t zclString[254 + 1]; Protocols::InteractionModel::Status status = emberAfReadAttribute(endpoint, Clusters::NordicDevKit::Id, Id, - readable, sizeof(temp)); + zclString, sizeof(zclString)); VerifyOrReturnError( Protocols::InteractionModel::Status::Success == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return Protocols::InteractionModel::Status::ConstraintError; } - *value = Traits::StorageToWorking(temp); + + VerifyOrReturnError( + value.size() == 254, + Protocols::InteractionModel::Status::InvalidDataType); + memcpy(value.data(), &zclString[1], 254); + value.reduce_size(length); return status; } - Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, - MarkAttributeDirty markDirty) + Protocols::InteractionModel::Status + Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t *writable = - Traits::ToAttributeStoreRepresentation(storageValue); + static_assert(254 < NumericAttributeTraits::kNullValue, + "value.size() might be too big"); + VerifyOrReturnError( + value.size() <= 254, + Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[254 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); return emberAfWriteAttribute( ConcreteAttributePath(endpoint, Clusters::NordicDevKit::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE) + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE) .SetMarkDirty(markDirty)); } - Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) + Protocols::InteractionModel::Status Set(EndpointId endpoint, + chip::CharSpan value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t *writable = - Traits::ToAttributeStoreRepresentation(storageValue); + static_assert(254 < NumericAttributeTraits::kNullValue, + "value.size() might be too big"); + VerifyOrReturnError( + value.size() <= 254, + Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[254 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); return emberAfWriteAttribute(endpoint, Clusters::NordicDevKit::Id, Id, - writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } - } // namespace UserButton + } // namespace DevKitName - namespace FeatureMap + namespace UserLED { - Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t *value) + Protocols::InteractionModel::Status Get(EndpointId endpoint, bool *value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t *readable = Traits::ToAttributeStoreRepresentation(temp); Protocols::InteractionModel::Status status = @@ -44802,10 +44802,10 @@ namespace app return status; } - Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, + Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; } @@ -44815,13 +44815,13 @@ namespace app Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteAttribute( ConcreteAttributePath(endpoint, Clusters::NordicDevKit::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE) + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE) .SetMarkDirty(markDirty)); } - Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) + Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; } @@ -44830,17 +44830,17 @@ namespace app uint8_t *writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteAttribute(endpoint, Clusters::NordicDevKit::Id, Id, - writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } - } // namespace FeatureMap + } // namespace UserLED - namespace ClusterRevision + namespace UserButton { - Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t *value) + Protocols::InteractionModel::Status Get(EndpointId endpoint, bool *value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t *readable = Traits::ToAttributeStoreRepresentation(temp); Protocols::InteractionModel::Status status = @@ -44855,10 +44855,10 @@ namespace app return status; } - Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, + Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; } @@ -44868,13 +44868,13 @@ namespace app Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteAttribute( ConcreteAttributePath(endpoint, Clusters::NordicDevKit::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE) + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE) .SetMarkDirty(markDirty)); } - Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) + Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; } @@ -44883,10 +44883,10 @@ namespace app uint8_t *writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteAttribute(endpoint, Clusters::NordicDevKit::Id, Id, - writable, ZCL_INT16U_ATTRIBUTE_TYPE); + writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } - } // namespace ClusterRevision + } // namespace UserButton } // namespace Attributes } // namespace NordicDevKit diff --git a/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/attributes/Accessors.h b/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/attributes/Accessors.h index 3cb6f3449338..e58f0e9a9d3b 100644 --- a/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/attributes/Accessors.h +++ b/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/attributes/Accessors.h @@ -8832,6 +8832,24 @@ namespace app namespace Attributes { + namespace FeatureMap + { + Protocols::InteractionModel::Status Get(EndpointId endpoint, + uint32_t *value); // bitmap32 + Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); + Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, + MarkAttributeDirty markDirty); + } // namespace FeatureMap + + namespace ClusterRevision + { + Protocols::InteractionModel::Status Get(EndpointId endpoint, + uint16_t *value); // int16u + Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); + Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, + MarkAttributeDirty markDirty); + } // namespace ClusterRevision + namespace DevKitName { Protocols::InteractionModel::Status @@ -8860,24 +8878,6 @@ namespace app MarkAttributeDirty markDirty); } // namespace UserButton - namespace FeatureMap - { - Protocols::InteractionModel::Status Get(EndpointId endpoint, - uint32_t *value); // bitmap32 - Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); - Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, - MarkAttributeDirty markDirty); - } // namespace FeatureMap - - namespace ClusterRevision - { - Protocols::InteractionModel::Status Get(EndpointId endpoint, - uint16_t *value); // int16u - Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); - Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, - MarkAttributeDirty markDirty); - } // namespace ClusterRevision - } // namespace Attributes } // namespace NordicDevKit diff --git a/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/cluster-objects.cpp b/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/cluster-objects.cpp index f6361010c98e..06992f266ac7 100644 --- a/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/cluster-objects.cpp +++ b/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/cluster-objects.cpp @@ -3520,6 +3520,27 @@ namespace app } } } // namespace ReachableChanged. + namespace RandomNumberChanged + { + CHIP_ERROR Type::Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const + { + TLV::TLVType outer; + ReturnErrorOnFailure( + aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); + } + + CHIP_ERROR DecodableType::Decode(TLV::TLVReader &reader) + { + detail::StructDecodeIterator __iterator(reader); + while (true) { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) { + return std::get(__element); + } + } + } + } // namespace RandomNumberChanged. } // namespace Events } // namespace BasicInformation @@ -27765,12 +27786,6 @@ namespace app const ConcreteAttributePath &path) { switch (path.mAttributeId) { - case Attributes::DevKitName::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, devKitName); - case Attributes::UserLED::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, userLED); - case Attributes::UserButton::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, userButton); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -27783,6 +27798,12 @@ namespace app return DataModel::Decode(reader, featureMap); case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, clusterRevision); + case Attributes::DevKitName::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, devKitName); + case Attributes::UserLED::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, userLED); + case Attributes::UserButton::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, userButton); default: return CHIP_NO_ERROR; } @@ -27791,6 +27812,27 @@ namespace app namespace Events { + namespace UserButtonChanged + { + CHIP_ERROR Type::Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const + { + TLV::TLVType outer; + ReturnErrorOnFailure( + aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); + } + + CHIP_ERROR DecodableType::Decode(TLV::TLVReader &reader) + { + detail::StructDecodeIterator __iterator(reader); + while (true) { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) { + return std::get(__element); + } + } + } + } // namespace UserButtonChanged. } // namespace Events } // namespace NordicDevKit diff --git a/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/cluster-objects.h b/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/cluster-objects.h index f40c5af3c7bf..0e2ebf13c423 100644 --- a/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/cluster-objects.h +++ b/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/cluster-objects.h @@ -5956,6 +5956,49 @@ namespace app CHIP_ERROR Decode(TLV::TLVReader &reader); }; } // namespace ReachableChanged + namespace RandomNumberChanged + { + static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + + enum class Fields : uint8_t {}; + + struct Type { + public: + static constexpr PriorityLevel GetPriorityLevel() + { + return kPriorityLevel; + } + static constexpr EventId GetEventId() + { + return Events::RandomNumberChanged::Id; + } + static constexpr ClusterId GetClusterId() + { + return Clusters::BasicInformation::Id; + } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const; + }; + + struct DecodableType { + public: + static constexpr PriorityLevel GetPriorityLevel() + { + return kPriorityLevel; + } + static constexpr EventId GetEventId() + { + return Events::RandomNumberChanged::Id; + } + static constexpr ClusterId GetClusterId() + { + return Clusters::BasicInformation::Id; + } + + CHIP_ERROR Decode(TLV::TLVReader &reader); + }; + } // namespace RandomNumberChanged } // namespace Events } // namespace BasicInformation namespace OtaSoftwareUpdateProvider @@ -59881,61 +59924,6 @@ namespace app namespace Attributes { - namespace DevKitName - { - struct TypeInfo { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() - { - return Clusters::NordicDevKit::Id; - } - static constexpr AttributeId GetAttributeId() - { - return Attributes::DevKitName::Id; - } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 254; } - }; - } // namespace DevKitName - namespace UserLED - { - struct TypeInfo { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; - - static constexpr ClusterId GetClusterId() - { - return Clusters::NordicDevKit::Id; - } - static constexpr AttributeId GetAttributeId() - { - return Attributes::UserLED::Id; - } - static constexpr bool MustUseTimedWrite() { return false; } - }; - } // namespace UserLED - namespace UserButton - { - struct TypeInfo { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; - - static constexpr ClusterId GetClusterId() - { - return Clusters::NordicDevKit::Id; - } - static constexpr AttributeId GetAttributeId() - { - return Attributes::UserButton::Id; - } - static constexpr bool MustUseTimedWrite() { return false; } - }; - } // namespace UserButton namespace GeneratedCommandList { struct TypeInfo @@ -59994,6 +59982,61 @@ namespace app } }; } // namespace ClusterRevision + namespace DevKitName + { + struct TypeInfo { + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() + { + return Clusters::NordicDevKit::Id; + } + static constexpr AttributeId GetAttributeId() + { + return Attributes::DevKitName::Id; + } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 254; } + }; + } // namespace DevKitName + namespace UserLED + { + struct TypeInfo { + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; + + static constexpr ClusterId GetClusterId() + { + return Clusters::NordicDevKit::Id; + } + static constexpr AttributeId GetAttributeId() + { + return Attributes::UserLED::Id; + } + static constexpr bool MustUseTimedWrite() { return false; } + }; + } // namespace UserLED + namespace UserButton + { + struct TypeInfo { + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; + + static constexpr ClusterId GetClusterId() + { + return Clusters::NordicDevKit::Id; + } + static constexpr AttributeId GetAttributeId() + { + return Attributes::UserButton::Id; + } + static constexpr bool MustUseTimedWrite() { return false; } + }; + } // namespace UserButton struct TypeInfo { struct DecodableType { @@ -60005,11 +60048,6 @@ namespace app CHIP_ERROR Decode(TLV::TLVReader &reader, const ConcreteAttributePath &path); - Attributes::DevKitName::TypeInfo::DecodableType devKitName; - Attributes::UserLED::TypeInfo::DecodableType userLED = - static_cast(0); - Attributes::UserButton::TypeInfo::DecodableType userButton = - static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType @@ -60020,9 +60058,60 @@ namespace app static_cast(0); Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + Attributes::DevKitName::TypeInfo::DecodableType devKitName; + Attributes::UserLED::TypeInfo::DecodableType userLED = + static_cast(0); + Attributes::UserButton::TypeInfo::DecodableType userButton = + static_cast(0); }; }; } // namespace Attributes + namespace Events + { + namespace UserButtonChanged + { + static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + + enum class Fields : uint8_t {}; + + struct Type { + public: + static constexpr PriorityLevel GetPriorityLevel() + { + return kPriorityLevel; + } + static constexpr EventId GetEventId() + { + return Events::UserButtonChanged::Id; + } + static constexpr ClusterId GetClusterId() + { + return Clusters::NordicDevKit::Id; + } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const; + }; + + struct DecodableType { + public: + static constexpr PriorityLevel GetPriorityLevel() + { + return kPriorityLevel; + } + static constexpr EventId GetEventId() + { + return Events::UserButtonChanged::Id; + } + static constexpr ClusterId GetClusterId() + { + return Clusters::NordicDevKit::Id; + } + + CHIP_ERROR Decode(TLV::TLVReader &reader); + }; + } // namespace UserButtonChanged + } // namespace Events } // namespace NordicDevKit namespace UnitTesting { diff --git a/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/ids/Attributes.h b/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/ids/Attributes.h index c30883ccb8e2..a6820c60e178 100644 --- a/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/ids/Attributes.h +++ b/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/ids/Attributes.h @@ -9394,21 +9394,6 @@ namespace app namespace Attributes { - namespace DevKitName - { - static constexpr AttributeId Id = 0x00000001; - } // namespace DevKitName - - namespace UserLED - { - static constexpr AttributeId Id = 0x00000002; - } // namespace UserLED - - namespace UserButton - { - static constexpr AttributeId Id = 0x00000003; - } // namespace UserButton - namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; @@ -9439,6 +9424,21 @@ namespace app static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace ClusterRevision + namespace DevKitName + { + static constexpr AttributeId Id = 0xFFF10000; + } // namespace DevKitName + + namespace UserLED + { + static constexpr AttributeId Id = 0xFFF10001; + } // namespace UserLED + + namespace UserButton + { + static constexpr AttributeId Id = 0xFFF10002; + } // namespace UserButton + } // namespace Attributes } // namespace NordicDevKit diff --git a/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/ids/Commands.h b/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/ids/Commands.h index b76e6e58ca05..a9b666b38f48 100644 --- a/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/ids/Commands.h +++ b/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/ids/Commands.h @@ -2377,7 +2377,7 @@ namespace app namespace SetLED { - static constexpr CommandId Id = 0x00000000; + static constexpr CommandId Id = 0xFFF10000; } // namespace SetLED } // namespace Commands diff --git a/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/ids/Events.h b/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/ids/Events.h index 5e02cd2804b1..851accd04909 100644 --- a/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/ids/Events.h +++ b/samples/matter/manufacturer_specific/src/default_zap/zap-generated/app-common/zap-generated/ids/Events.h @@ -94,6 +94,11 @@ namespace app static constexpr EventId Id = 0x00000003; } // namespace ReachableChanged + namespace RandomNumberChanged + { + static constexpr EventId Id = 0x00000004; + } // namespace RandomNumberChanged + } // namespace Events } // namespace BasicInformation @@ -881,6 +886,19 @@ namespace app } // namespace Events } // namespace CommissionerControl + namespace NordicDevKit + { + namespace Events + { + + namespace UserButtonChanged + { + static constexpr EventId Id = 0xFFF10000; + } // namespace UserButtonChanged + + } // namespace Events + } // namespace NordicDevKit + namespace UnitTesting { namespace Events diff --git a/samples/matter/manufacturer_specific/src/default_zap/zap-generated/endpoint_config.h b/samples/matter/manufacturer_specific/src/default_zap/zap-generated/endpoint_config.h index 7e89378c8a03..6797413d4599 100644 --- a/samples/matter/manufacturer_specific/src/default_zap/zap-generated/endpoint_config.h +++ b/samples/matter/manufacturer_specific/src/default_zap/zap-generated/endpoint_config.h @@ -29,31 +29,91 @@ #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, \ + 0x00, \ + 0x00, \ + 0x00, \ + 0x00, \ + 0x00, \ + 0x00, \ + 0x00, \ + 0x00, \ + \ + /* Endpoint: 1, Cluster: NordicDevKit (server), big-endian */ \ \ - /* Endpoint: 1, Cluster: NordicDevKit (server), big-endian */ \ + /* 8 - DevKitName, */ \ + 22, \ + 'N', \ + 'o', \ + 'r', \ + 'd', \ + 'i', \ + 'c', \ + ' ', \ + 'D', \ + 'e', \ + 'v', \ + 'e', \ + 'l', \ + 'o', \ + 'p', \ + 'm', \ + 'e', \ + 'n', \ + 't', \ + ' ', \ + 'K', \ + 'i', \ + 't', \ \ - /* 8 - DevKitName, */ \ - 22, 'N', 'o', 'r', 'd', 'i', 'c', ' ', 'D', 'e', 'v', 'e', 'l', 'o', 'p', 'm', 'e', 'n', 't', \ - ' ', 'K', 'i', 't', \ } #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, \ + 0x00, \ + 0x00, \ + 0x00, \ + 0x00, \ + 0x00, \ + 0x00, \ + 0x00, \ + 0x00, \ \ - /* Endpoint: 1, Cluster: NordicDevKit (server), little-endian */ \ + /* Endpoint: 1, Cluster: NordicDevKit (server), little-endian */ \ + \ + /* 8 - DevKitName, */ \ + 22, \ + 'N', \ + 'o', \ + 'r', \ + 'd', \ + 'i', \ + 'c', \ + ' ', \ + 'D', \ + 'e', \ + 'v', \ + 'e', \ + 'l', \ + 'o', \ + 'p', \ + 'm', \ + 'e', \ + 'n', \ + 't', \ + ' ', \ + 'K', \ + 'i', \ + 't', \ \ - /* 8 - DevKitName, */ \ - 22, 'N', 'o', 'r', 'd', 'i', 'c', ' ', 'D', 'e', 'v', 'e', 'l', 'o', 'p', 'm', 'e', 'n', 't', \ - ' ', 'K', 'i', 't', \ } #endif // CHIP_CONFIG_BIG_ENDIAN_TARGET @@ -68,223 +128,214 @@ // This is an array of EmberAfAttributeMetadata structures. #define GENERATED_ATTRIBUTE_COUNT 91 -#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_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: 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), 0x00000017, 2, ZAP_TYPE(INT16U), \ - ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* RandomNumber */ \ - { 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: 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), 0 }, /* SupportedThreadFeatures */ \ - { ZAP_SIMPLE_DEFAULT(4), 0x0000000A, 2, ZAP_TYPE(INT16U), 0 }, /* ThreadVersion */ \ - { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), \ - ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(2), 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: 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_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* 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: 1, Cluster: NordicDevKit (server) */ \ - { ZAP_LONG_DEFAULTS_INDEX(8), 0x00000001, 255, ZAP_TYPE(CHAR_STRING), \ - ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* DevKitName */ \ - { ZAP_SIMPLE_DEFAULT(false), 0x00000002, 1, ZAP_TYPE(BOOLEAN), \ - ZAP_ATTRIBUTE_MASK(TOKENIZE) }, /* UserLED */ \ - { ZAP_SIMPLE_DEFAULT(false), 0x00000003, 1, ZAP_TYPE(BOOLEAN), 0 }, /* UserButton */ \ - { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ +#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_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: 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), 0x00000017, 2, ZAP_TYPE(INT16U), \ + ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* RandomNumber */ \ + { 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: 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), 0 }, /* SupportedThreadFeatures */ \ + { ZAP_SIMPLE_DEFAULT(4), 0x0000000A, 2, ZAP_TYPE(INT16U), 0 }, /* ThreadVersion */ \ + { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(2), 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: 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_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* 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: 1, Cluster: NordicDevKit (server) */ \ + { ZAP_LONG_DEFAULTS_INDEX(8), 0xFFF10000, 255, ZAP_TYPE(CHAR_STRING), \ + ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* DevKitName */ \ + { ZAP_SIMPLE_DEFAULT(false), 0xFFF10001, 1, ZAP_TYPE(BOOLEAN), 0 }, /* UserLED */ \ + { ZAP_SIMPLE_DEFAULT(false), 0xFFF10002, 1, ZAP_TYPE(BOOLEAN), 0 }, /* UserButton */ \ + { 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_EVENT_COUNT 8 #define GENERATED_EVENTS { \ /* Endpoint: 0, Cluster: Basic Information (server) */ \ /* EventList (index=0) */ \ 0x00000000, /* StartUp */ \ 0x00000001, /* ShutDown */ \ 0x00000002, /* Leave */ \ + 0x00000004, /* RandomNumberChanged */ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ - /* EventList (index=3) */ \ + /* EventList (index=4) */ \ 0x00000000, /* StateTransition */ \ 0x00000001, /* VersionApplied */ \ 0x00000002, /* DownloadError */ \ + /* Endpoint: 1, Cluster: NordicDevKit (server) */ \ + /* EventList (index=7) */ \ + 0xFFF10000, /* UserButtonChanged */ \ } // clang-format on @@ -371,7 +422,7 @@ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: NordicDevKit (server) */\ /* AcceptedCommandList (index=54) */ \ - 0x00000000 /* SetLED */, \ + 0xFFF10000 /* SetLED */, \ chip::kInvalidCommandId /* end of list */, \ } @@ -431,7 +482,7 @@ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ), \ .generatedCommandList = nullptr, \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 0 ), \ - .eventCount = 3, \ + .eventCount = 4, \ },\ { \ /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ @@ -456,7 +507,7 @@ .functions = NULL, \ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 2 ), \ .generatedCommandList = nullptr, \ - .eventList = ZAP_GENERATED_EVENTS_INDEX( 3 ), \ + .eventList = ZAP_GENERATED_EVENTS_INDEX( 4 ), \ .eventCount = 3, \ },\ { \ @@ -560,8 +611,8 @@ .functions = NULL, \ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ), \ .generatedCommandList = nullptr, \ - .eventList = nullptr, \ - .eventCount = 0, \ + .eventList = ZAP_GENERATED_EVENTS_INDEX( 7 ), \ + .eventCount = 1, \ },\ } @@ -572,7 +623,8 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 12, 86 }, { ZAP_CLUSTER_INDEX(12), 2, 263 }, \ + { ZAP_CLUSTER_INDEX(0), 12, 86 }, \ + { ZAP_CLUSTER_INDEX(12), 2, 263 }, \ } // Largest attribute size is needed for various buffers @@ -592,16 +644,10 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, // Array of endpoints that are supported, the data inside // the array is the endpoint number. -#define FIXED_ENDPOINT_ARRAY \ - { \ - 0x0000, 0x0001 \ - } +#define FIXED_ENDPOINT_ARRAY { 0x0000, 0x0001 } // Array of profile ids -#define FIXED_PROFILE_IDS \ - { \ - 0x0103, 0x0FFF \ - } +#define FIXED_PROFILE_IDS { 0x0103, 0x0FFF } // Array of device types #define FIXED_DEVICE_TYPES \ @@ -613,25 +659,13 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, } // Array of device type offsets -#define FIXED_DEVICE_TYPE_OFFSETS \ - { \ - 0, 2 \ - } +#define FIXED_DEVICE_TYPE_OFFSETS { 0, 2 } // Array of device type lengths -#define FIXED_DEVICE_TYPE_LENGTHS \ - { \ - 2, 1 \ - } +#define FIXED_DEVICE_TYPE_LENGTHS { 2, 1 } // Array of endpoint types supported on each endpoint -#define FIXED_ENDPOINT_TYPES \ - { \ - 0, 1 \ - } +#define FIXED_ENDPOINT_TYPES { 0, 1 } // Array of parent endpoints for each endpoint -#define FIXED_PARENT_ENDPOINTS \ - { \ - kInvalidEndpointId, kInvalidEndpointId \ - } +#define FIXED_PARENT_ENDPOINTS { kInvalidEndpointId, kInvalidEndpointId }