diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml new file mode 100644 index 00000000000000..1408cc972e8dc5 --- /dev/null +++ b/.github/workflows/examples-linux-imx.yaml @@ -0,0 +1,51 @@ +# 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. + +name: Build example - i.MX Linux + +on: + push: + pull_request: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +jobs: + imx: + name: Linux i.MX Build + timeout-minutes: 70 + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: connectedhomeip/chip-build-imx:0.5.52 + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: true + + - name: Build App + timeout-minutes: 10 + run: | + ./scripts/examples/imxlinux_example.sh \ + examples/lighting-app/linux/ examples/lighting-app/linux/out/aarch64 + - name: Build chip-tool + timeout-minutes: 10 + run: | + ./scripts/examples/imxlinux_example.sh \ + examples/chip-tool examples/chip-tool/out/aarch64 \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 0e2b2f6a4602d6..3669fb04581332 100644 --- a/.gitmodules +++ b/.gitmodules @@ -187,3 +187,6 @@ [submodule "perfetto"] path = third_party/perfetto/repo url = https://github.com/google/perfetto +[submodule "p6/serial-flash"] + path = third_party/p6/p6_sdk/libs/serial-flash + url = https://github.com/Infineon/serial-flash diff --git a/Matter - Multi Fabric Commissioning.ipynb b/Matter - Multi Fabric Commissioning.ipynb deleted file mode 100644 index c7f92aa331d5f6..00000000000000 --- a/Matter - Multi Fabric Commissioning.ipynb +++ /dev/null @@ -1,823 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "e8b2f5eb", - "metadata": {}, - "source": [ - "# Multi Fabric Commissioning\n", - "\n", - "_This notebook walks through a flow that sets up two separate commissioners on two different fabrics and commissions a target device onto those fabrics._" - ] - }, - { - "cell_type": "markdown", - "id": "99ce2877", - "metadata": {}, - "source": [ - "### Imports\n", - "\n", - "Let's first begin by setting up by importing some key modules that are needed to make it easier for us to interact with the Matter stack." - ] - }, - { - "cell_type": "code", - "execution_count": 35, - "id": "52b40db6", - "metadata": {}, - "outputs": [], - "source": [ - "from rich import print\n", - "from rich.pretty import pprint\n", - "from rich import inspect\n", - "import logging\n", - "import chip\n", - "import chip.logging\n", - "from chip import ChipDeviceCtrl\n", - "import chip.clusters as Clusters\n", - "from chip.ChipReplStartup import *\n", - "from chip.ChipStack import *\n", - "import subprocess, sys" - ] - }, - { - "cell_type": "markdown", - "id": "78e14359", - "metadata": {}, - "source": [ - "### Initialization\n", - "\n", - "Next, let's initialize the REPL environment and the Matter Stack." - ] - }, - { - "cell_type": "code", - "execution_count": 36, - "id": "e3057f9d", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
──────────────────────────────────────── Matter REPL ────────────────────────────────────────\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[92m──────────────────────────────────────── \u001b[0mMatter REPL\u001b[92m ────────────────────────────────────────\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
\n",
-       "            \n",
-       "    \n",
-       "            Welcome to the Matter Python REPL!\n",
-       "    \n",
-       "            For help, please type matterhelp()\n",
-       "    \n",
-       "            To get more information on a particular object/class, you can pass\n",
-       "            that into matterhelp() as well.\n",
-       "    \n",
-       "            \n",
-       "
\n" - ], - "text/plain": [ - "\n", - " \n", - "\u001b[1;34m \u001b[0m\n", - "\u001b[1;34m Welcome to the Matter Python REPL!\u001b[0m\n", - "\u001b[1;34m \u001b[0m\n", - "\u001b[1;34m For help, please type \u001b[0m\u001b[1;32mmatterhelp\u001b[0m\u001b[1;32m(\u001b[0m\u001b[1;32m)\u001b[0m\n", - "\u001b[1;34m \u001b[0m\n", - "\u001b[1;34m To get more information on a particular object/class, you can pass\u001b[0m\n", - "\u001b[1;34m that into \u001b[0m\u001b[1;32mmatterhelp\u001b[0m\u001b[1;32m(\u001b[0m\u001b[1;32m)\u001b[0m\u001b[1;34m as well.\u001b[0m\n", - "\u001b[1;34m \u001b[0m\n", - "\u001b[1;34m \u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
─────────────────────────────────────────────────────────────────────────────────────────────\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[92m─────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "ReplInit()\n", - "chipStack = ChipStack()" - ] - }, - { - "cell_type": "markdown", - "id": "9cb06305", - "metadata": {}, - "source": [ - "### Launch Server\n", - "\n", - "Let's launch an instance of the `chip-all-clusters-app`." - ] - }, - { - "cell_type": "code", - "execution_count": 37, - "id": "52ccd8c6", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
<subprocess.Popen object at 0x10d12db50>\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[1m<\u001b[0m\u001b[1;95msubprocess.Popen\u001b[0m\u001b[39m object at \u001b[0m\u001b[1;36m0x10d12db50\u001b[0m\u001b[1m>\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "subprocess.Popen(['killall', 'chip-all-clusters-app'])" - ] - }, - { - "cell_type": "code", - "execution_count": 38, - "id": "1a8022e6", - "metadata": {}, - "outputs": [], - "source": [ - "process = subprocess.Popen('./out/debug/chip-all-clusters-app', stdout=subprocess.DEVNULL)" - ] - }, - { - "cell_type": "markdown", - "id": "c22ea8ee", - "metadata": {}, - "source": [ - "### Create Controller on Fabric A" - ] - }, - { - "cell_type": "code", - "execution_count": 39, - "id": "5e964fe3", - "metadata": {}, - "outputs": [], - "source": [ - "devCtrl = ChipDeviceCtrl.ChipDeviceController(controllerNodeId=1)" - ] - }, - { - "cell_type": "markdown", - "id": "b33dec2e", - "metadata": {}, - "source": [ - "### Commission Target" - ] - }, - { - "cell_type": "code", - "execution_count": 40, - "id": "e98d8157", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2021-12-29 15:02:03 johnsj-macbookpro1.roam.corp.google.com chip.CTL[86631] ERROR Unable to find country code, defaulting to WW\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Established CASE with Device\n" - ] - }, - { - "data": { - "text/html": [ - "
True\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[3;92mTrue\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Node address has been updated\n", - "Commissioning complete\n" - ] - } - ], - "source": [ - "devCtrl.CommissionIP(b'127.0.0.1', 20202021, 1)" - ] - }, - { - "cell_type": "markdown", - "id": "820fcede", - "metadata": {}, - "source": [ - "### Read out the Fabric List to validate" - ] - }, - { - "cell_type": "code", - "execution_count": 41, - "id": "6802862a", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n",
-       "{\n",
-       "0: {\n",
-       "│   │   <class 'chip.clusters.Objects.OperationalCredentials'>: {\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.FabricsList'>: [\n",
-       "│   │   │   │   FabricDescriptor(\n",
-       "│   │   │   │   │   fabricIndex=1,\n",
-       "│   │   │   │   │   rootPublicKey=b'\\x040\\xa5d\\x8eX4]\\xa1\\xe18\\x04\\x9b\\xf2E\\x8eh\\x13dwQ\\xd9\\x19\\xa5\\xe4\\x88h\\xe5q\\xacPCtY\\xb9\\xcc\\x94KQ\\xa85\\xfa(\\x07\\x80q+\\xa6\\x9a%\\x8d\\x1f\\xf4MJ\\xa0\\x9e[\\xafW0\"\\x82\\xf4\\xbb',\n",
-       "│   │   │   │   │   vendorId=27424,\n",
-       "│   │   │   │   │   fabricId=3,\n",
-       "│   │   │   │   │   nodeId=1,\n",
-       "│   │   │   │   │   label=''\n",
-       "│   │   │   │   )\n",
-       "│   │   │   ],\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.SupportedFabrics'>: 16,\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.CommissionedFabrics'>: 1,\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.TrustedRootCertificates'>: [\n",
-       "│   │   │   │   b'\\x150\\x01\\x01\\x00$\\x02\\x017\\x03$\\x14\\x00$\\x15\\x03\\x18&\\x04\\x80\"\\x81\\'&\\x05\\x80%M:7\\x06$\\x14\\x00$\\x15\\x03\\x18$\\x07\\x01$\\x08\\x010\\tA\\x040\\xa5d\\x8eX4]\\xa1\\xe18\\x04\\x9b\\xf2E\\x8eh\\x13dwQ\\xd9\\x19\\xa5\\xe4\\x88h\\xe5q\\xacPCtY\\xb9\\xcc\\x94KQ\\xa85\\xfa(\\x07\\x80q+\\xa6\\x9a%\\x8d\\x1f\\xf4MJ\\xa0\\x9e[\\xafW0\"\\x82\\xf4\\xbb7\\n5\\x01)\\x01\\x18$\\x02`0\\x04\\x14j\\xf4P\\xfa\\x1dE\\xff28AZ\\xc9\\x05]u=\\x07X\\x91\\\\0\\x05\\x14j\\xf4P\\xfa\\x1dE\\xff28AZ\\xc9\\x05]u=\\x07X\\x91\\\\\\x180\\x0b@\\xbc@\\xe6\\xa9\\xc1\\xecjP!\\xb1N\\xc6_\\xe1k\\xaf\\xc2\\xc1~\\xb5\\xa38\\xb3\\x19\\t\\xbd\\xbd\\x96\\xfcV\\xb6\\x07\\xfe\\xec\\xc8q\"\\x9b\\xadX\\xdfg\\xfb\\xbaW\\x90(\\xfe\\xeb\\x14oqeV\\x119\\x06\\xae)Q\\x0e+G\\x89\\x18'\n",
-       "│   │   │   ],\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.CurrentFabricIndex'>: 1,\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.ClusterRevision'>: 1\n",
-       "│   │   }\n",
-       "}\n",
-       "}\n",
-       "
\n" - ], - "text/plain": [ - "\n", - "\u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[1;36m0\u001b[0m: \u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OperationalCredentials'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OperationalCredentials.Attributes.FabricsList'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;35mFabricDescriptor\u001b[0m\u001b[1m(\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mfabricIndex\u001b[0m=\u001b[1;36m1\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mrootPublicKey\u001b[0m=\u001b[32mb\u001b[0m\u001b[32m'\\x040\\xa5d\\x8eX4\u001b[0m\u001b[32m]\u001b[0m\u001b[32m\\xa1\\xe18\\x04\\x9b\\xf2E\\x8eh\\x13dwQ\\xd9\\x19\\xa5\\xe4\\x88h\\xe5q\\xacPCtY\\xb9\\xcc\\x94KQ\\xa85\\xfa\u001b[0m\u001b[32m(\u001b[0m\u001b[32m\\x07\\x80q+\\xa6\\x9a%\\x8d\\x1f\\xf4MJ\\xa0\\x9e\u001b[0m\u001b[32m[\u001b[0m\u001b[32m\\xafW0\"\\x82\\xf4\\xbb'\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mvendorId\u001b[0m=\u001b[1;36m27424\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mfabricId\u001b[0m=\u001b[1;36m3\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mnodeId\u001b[0m=\u001b[1;36m1\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mlabel\u001b[0m=\u001b[32m''\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1m)\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m]\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OperationalCredentials.Attributes.SupportedFabrics'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m16\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OperationalCredentials.Attributes.CommissionedFabrics'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m1\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OperationalCredentials.Attributes.TrustedRootCertificates'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[32mb'\\x150\\x01\\x01\\x00$\\x02\\x017\\x03$\\x14\\x00$\\x15\\x03\\x18&\\x04\\x80\"\\x81\\'&\\x05\\x80%M:7\\x06$\\x14\\x00$\\x15\\x03\\x18$\\x07\\x01$\\x08\\x010\\tA\\x040\\xa5d\\x8eX4\u001b[0m\u001b[32m]\u001b[0m\u001b[32m\\xa1\\xe18\\x04\\x9b\\xf2E\\x8eh\\x13dwQ\\xd9\\x19\\xa5\\xe4\\x88h\\xe5q\\xacPCtY\\xb9\\xcc\\x94KQ\\xa85\\xfa\u001b[0m\u001b[32m(\u001b[0m\u001b[32m\\x07\\x80q+\\xa6\\x9a%\\x8d\\x1f\\xf4MJ\\xa0\\x9e\u001b[0m\u001b[32m[\u001b[0m\u001b[32m\\xafW0\"\\x82\\xf4\\xbb7\\n5\\x01\u001b[0m\u001b[32m)\u001b[0m\u001b[32m\\x01\\x18$\\x02`0\\x04\\x14j\\xf4P\\xfa\\x1dE\\xff28AZ\\xc9\\x05\u001b[0m\u001b[32m]\u001b[0m\u001b[32mu\u001b[0m\u001b[32m=\\x07X\\x91\\\\0\\x05\\x14j\\xf4P\\xfa\\x1dE\\xff28AZ\\xc9\\x05\u001b[0m\u001b[32m]\u001b[0m\u001b[32mu\u001b[0m\u001b[32m=\\x07X\\x91\\\\\\x180\\x0b@\\xbc@\\xe6\\xa9\\xc1\\xecjP!\\xb1N\\xc6_\\xe1k\\xaf\\xc2\\xc1~\\xb5\\xa38\\xb3\\x19\\t\\xbd\\xbd\\x96\\xfcV\\xb6\\x07\\xfe\\xec\\xc8q\"\\x9b\\xadX\\xdfg\\xfb\\xbaW\\x90\u001b[0m\u001b[32m(\u001b[0m\u001b[32m\\xfe\\xeb\\x14oqeV\\x119\\x06\\xae\u001b[0m\u001b[32m)\u001b[0m\u001b[32mQ\\x0e+G\\x89\\x18'\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m]\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OperationalCredentials.Attributes.CurrentFabricIndex'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m1\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OperationalCredentials.Attributes.ClusterRevision'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m1\u001b[0m\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1m}\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[1m}\u001b[0m\n", - "\u001b[1m}\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "await devCtrl.ReadAttribute(1, [(Clusters.OperationalCredentials)])" - ] - }, - { - "cell_type": "markdown", - "id": "dbade62b", - "metadata": {}, - "source": [ - "Note that the `FabricsList` contains just a single item with a `fabriIndex` of 1, and a `fabricId` of 1." - ] - }, - { - "cell_type": "markdown", - "id": "7326ae6a", - "metadata": {}, - "source": [ - "### Create Controller on Fabric B" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "a975776b", - "metadata": {}, - "outputs": [], - "source": [ - "devCtrl2 = ChipDeviceCtrl.ChipDeviceController(controllerNodeId=30)" - ] - }, - { - "cell_type": "markdown", - "id": "72b857b3", - "metadata": {}, - "source": [ - "### Open Commissioning Window\n", - "\n", - "The target right now doesn't accept commissioning requests. So let's go ahead and open the commissioning window to permit the second controller on Fabric B to commission the target. This request has to originate from the 1st controller." - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "f4fca3f4", - "metadata": {}, - "outputs": [], - "source": [ - "await devCtrl.SendCommand(1, 0, Clusters.AdministratorCommissioning.Commands.OpenBasicCommissioningWindow(100))" - ] - }, - { - "cell_type": "markdown", - "id": "b7b2215e", - "metadata": {}, - "source": [ - "### Commission Target on Fabric B" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "41255a44", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2021-12-28 23:33:17 johnsj-macbookpro1.roam.corp.google.com chip.CTL[86631] ERROR Unable to find country code, defaulting to WW\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Established CASE with Device\n" - ] - }, - { - "data": { - "text/html": [ - "
True\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[3;92mTrue\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Node address has been updated\n", - "Commissioning complete\n" - ] - } - ], - "source": [ - "devCtrl2.CommissionIP(b'127.0.0.1', 20202021, 1)" - ] - }, - { - "cell_type": "markdown", - "id": "b17289ff", - "metadata": {}, - "source": [ - "### Read out the Fabric List to validate" - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "id": "903cb0fd", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n",
-       "{\n",
-       "0: {\n",
-       "│   │   <class 'chip.clusters.Objects.AccessControl'>: {\n",
-       "│   │   │   <class 'chip.clusters.Objects.AccessControl.Attributes.Acl'>: [],\n",
-       "│   │   │   <class 'chip.clusters.Objects.AccessControl.Attributes.Extension'>: [],\n",
-       "│   │   │   <class 'chip.clusters.Objects.AccessControl.Attributes.ClusterRevision'>: 1\n",
-       "│   │   }\n",
-       "}\n",
-       "}\n",
-       "
\n" - ], - "text/plain": [ - "\n", - "\u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[1;36m0\u001b[0m: \u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.AccessControl'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.AccessControl.Attributes.Acl'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m]\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.AccessControl.Attributes.Extension'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m]\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.AccessControl.Attributes.ClusterRevision'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m1\u001b[0m\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1m}\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[1m}\u001b[0m\n", - "\u001b[1m}\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "await devCtrl2.ReadAttribute(1, [(Clusters.AccessControl)])" - ] - }, - { - "cell_type": "markdown", - "id": "ebf71c37", - "metadata": {}, - "source": [ - "Note that the FabricsList contains two items now!" - ] - }, - { - "cell_type": "code", - "execution_count": 47, - "id": "cf9e453e", - "metadata": {}, - "outputs": [ - { - "ename": "ChipStackError", - "evalue": "Chip Stack Error 11", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mChipStackError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m/var/folders/nq/rnhbb96s3sl9n9lrzgx40tfw008537/T/ipykernel_12727/1832887926.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0ms\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mawait\u001b[0m \u001b[0mdevCtrl\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mReadAttribute\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mClusters\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mLevelControl\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m4\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m~/work/devel/ext-git/connectedhomeip-2/out/python_env/lib/python3.8/site-packages/chip/ChipDeviceCtrl.py\u001b[0m in \u001b[0;36mReadAttribute\u001b[0;34m(self, nodeid, attributes, returnClusterObject, reportInterval)\u001b[0m\n\u001b[1;32m 524\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mres\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 525\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_ChipStack\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mErrorToException\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mres\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 526\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0;32mawait\u001b[0m \u001b[0mfuture\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 527\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 528\u001b[0m async def ReadEvent(self, nodeid: int, events: typing.List[typing.Union[\n", - "\u001b[0;31mChipStackError\u001b[0m: Chip Stack Error 11" - ] - } - ], - "source": [ - "s = await devCtrl.ReadAttribute(1, [(Clusters.LevelControl)], True, (0, 4))" - ] - }, - { - "cell_type": "code", - "execution_count": 42, - "id": "713c1139-e0a2-469e-a471-593955a1b354", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
<Subscription (Id=13932082784090111118)>\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[1m<\u001b[0m\u001b[1;95mSubscription\u001b[0m\u001b[39m \u001b[0m\u001b[1;39m(\u001b[0m\u001b[33mId\u001b[0m\u001b[39m=\u001b[0m\u001b[1;36m13932082784090111118\u001b[0m\u001b[1;39m)\u001b[0m\u001b[1m>\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "s" - ] - }, - { - "cell_type": "code", - "execution_count": 43, - "id": "a92d3e5d-ff49-455e-8e8e-fd96ef258eb3", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n",
-       "{\n",
-       "1: {\n",
-       "│   │   <class 'chip.clusters.Objects.LevelControl'>: LevelControl(\n",
-       "│   │   │   currentLevel=0,\n",
-       "│   │   │   remainingTime=0,\n",
-       "│   │   │   minLevel=0,\n",
-       "│   │   │   maxLevel=255,\n",
-       "│   │   │   currentFrequency=0,\n",
-       "│   │   │   minFrequency=0,\n",
-       "│   │   │   maxFrequency=0,\n",
-       "│   │   │   options=0,\n",
-       "│   │   │   onOffTransitionTime=0,\n",
-       "│   │   │   onLevel=254,\n",
-       "│   │   │   onTransitionTime=0,\n",
-       "│   │   │   offTransitionTime=0,\n",
-       "│   │   │   defaultMoveRate=0,\n",
-       "│   │   │   startUpCurrentLevel=0,\n",
-       "│   │   │   attributeList=None,\n",
-       "│   │   │   featureMap=None,\n",
-       "│   │   │   clusterRevision=3\n",
-       "│   │   )\n",
-       "}\n",
-       "}\n",
-       "
\n" - ], - "text/plain": [ - "\n", - "\u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[1;36m1\u001b[0m: \u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.LevelControl'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;35mLevelControl\u001b[0m\u001b[1m(\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mcurrentLevel\u001b[0m=\u001b[1;36m0\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mremainingTime\u001b[0m=\u001b[1;36m0\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mminLevel\u001b[0m=\u001b[1;36m0\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mmaxLevel\u001b[0m=\u001b[1;36m255\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mcurrentFrequency\u001b[0m=\u001b[1;36m0\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mminFrequency\u001b[0m=\u001b[1;36m0\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mmaxFrequency\u001b[0m=\u001b[1;36m0\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33moptions\u001b[0m=\u001b[1;36m0\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33monOffTransitionTime\u001b[0m=\u001b[1;36m0\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33monLevel\u001b[0m=\u001b[1;36m254\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33monTransitionTime\u001b[0m=\u001b[1;36m0\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33moffTransitionTime\u001b[0m=\u001b[1;36m0\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mdefaultMoveRate\u001b[0m=\u001b[1;36m0\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mstartUpCurrentLevel\u001b[0m=\u001b[1;36m0\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mattributeList\u001b[0m=\u001b[3;35mNone\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mfeatureMap\u001b[0m=\u001b[3;35mNone\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mclusterRevision\u001b[0m=\u001b[1;36m3\u001b[0m\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1m)\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[1m}\u001b[0m\n", - "\u001b[1m}\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "s.GetAttributes()" - ] - }, - { - "cell_type": "code", - "execution_count": 40, - "id": "88032327-5acd-4d2f-892b-72dc41959ec0", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Attribute Changed:\n" - ] - }, - { - "data": { - "text/html": [ - "
{\n",
-       "'Endpoint': 1,\n",
-       "'Attribute': <class 'chip.clusters.Objects.OnOff.Attributes.OnTime'>,\n",
-       "'Value': 0\n",
-       "}\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Endpoint'\u001b[0m: \u001b[1;36m1\u001b[0m,\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Attribute'\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OnOff.Attributes.OnTime'\u001b[0m\u001b[1m>\u001b[0m,\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Value'\u001b[0m: \u001b[1;36m0\u001b[0m\n", - "\u001b[1m}\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Attribute Changed:\n" - ] - }, - { - "data": { - "text/html": [ - "
{\n",
-       "'Endpoint': 1,\n",
-       "'Attribute': <class 'chip.clusters.Objects.OnOff.Attributes.OnOff'>,\n",
-       "'Value': False\n",
-       "}\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Endpoint'\u001b[0m: \u001b[1;36m1\u001b[0m,\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Attribute'\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OnOff.Attributes.OnOff'\u001b[0m\u001b[1m>\u001b[0m,\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Value'\u001b[0m: \u001b[3;91mFalse\u001b[0m\n", - "\u001b[1m}\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Attribute Changed:\n" - ] - }, - { - "data": { - "text/html": [ - "
{\n",
-       "'Endpoint': 1,\n",
-       "'Attribute': <class 'chip.clusters.Objects.OnOff.Attributes.OnTime'>,\n",
-       "'Value': 0\n",
-       "}\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Endpoint'\u001b[0m: \u001b[1;36m1\u001b[0m,\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Attribute'\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OnOff.Attributes.OnTime'\u001b[0m\u001b[1m>\u001b[0m,\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Value'\u001b[0m: \u001b[1;36m0\u001b[0m\n", - "\u001b[1m}\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Attribute Changed:\n" - ] - }, - { - "data": { - "text/html": [ - "
{\n",
-       "'Endpoint': 1,\n",
-       "'Attribute': <class 'chip.clusters.Objects.OnOff.Attributes.OnOff'>,\n",
-       "'Value': False\n",
-       "}\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Endpoint'\u001b[0m: \u001b[1;36m1\u001b[0m,\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Attribute'\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OnOff.Attributes.OnOff'\u001b[0m\u001b[1m>\u001b[0m,\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Value'\u001b[0m: \u001b[3;91mFalse\u001b[0m\n", - "\u001b[1m}\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "await devCtrl.SendCommand(1, 1, Clusters.OnOff.Commands.Off())" - ] - }, - { - "cell_type": "code", - "execution_count": 39, - "id": "87046a41-08ff-4de2-9a9b-400922280bd6", - "metadata": {}, - "outputs": [], - "source": [ - "await devCtrl.SendCommand(1, 1, Clusters.OnOff.Commands.On())" - ] - }, - { - "cell_type": "code", - "execution_count": 45, - "id": "7957fc03-e91a-4a07-8b08-cc1e86e595c3", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Attribute Changed:\n" - ] - }, - { - "data": { - "text/html": [ - "
{\n",
-       "'Endpoint': 1,\n",
-       "'Attribute': <class 'chip.clusters.Objects.LevelControl.Attributes.CurrentLevel'>,\n",
-       "'Value': 1\n",
-       "}\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Endpoint'\u001b[0m: \u001b[1;36m1\u001b[0m,\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Attribute'\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.LevelControl.Attributes.CurrentLevel'\u001b[0m\u001b[1m>\u001b[0m,\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Value'\u001b[0m: \u001b[1;36m1\u001b[0m\n", - "\u001b[1m}\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Attribute Changed:\n" - ] - }, - { - "data": { - "text/html": [ - "
{\n",
-       "'Endpoint': 1,\n",
-       "'Attribute': <class 'chip.clusters.Objects.LevelControl.Attributes.CurrentLevel'>,\n",
-       "'Value': 100\n",
-       "}\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Endpoint'\u001b[0m: \u001b[1;36m1\u001b[0m,\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Attribute'\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.LevelControl.Attributes.CurrentLevel'\u001b[0m\u001b[1m>\u001b[0m,\n", - "\u001b[2;32m│ \u001b[0m\u001b[32m'Value'\u001b[0m: \u001b[1;36m100\u001b[0m\n", - "\u001b[1m}\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "await devCtrl.SendCommand(1, 1, Clusters.LevelControl.Commands.MoveToLevel(100, 10, 0, 0))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "cefa5cae-67f4-49a9-a4c1-285f315c51e2", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "matter-env", - "language": "python", - "name": "matter-env" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.2+chromium.10" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/Matter - REPL Basics.ipynb b/Matter - REPL Basics.ipynb deleted file mode 100644 index 1928f888710ea3..00000000000000 --- a/Matter - REPL Basics.ipynb +++ /dev/null @@ -1,1139 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "e8b2f5eb", - "metadata": {}, - "source": [ - "# Interaction Model Examples\n", - "\n", - "This notebook walks through the various interactions that can be initiated from the REPL towards a target using the Matter Interaction Model (IM) and Data Model (DM)." - ] - }, - { - "cell_type": "markdown", - "id": "99ce2877", - "metadata": {}, - "source": [ - "## Imports\n", - "\n", - "Let's first begin by setting up by importing some key modules that are needed to make it easier for us to interact with the Matter stack." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "52b40db6", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
──────────────────────────────────────── Matter REPL ────────────────────────────────────────\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[92m──────────────────────────────────────── \u001b[0mMatter REPL\u001b[92m ────────────────────────────────────────\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
\n",
-       "            \n",
-       "    \n",
-       "            Welcome to the Matter Python REPL!\n",
-       "    \n",
-       "            For help, please type matterhelp()\n",
-       "    \n",
-       "            To get more information on a particular object/class, you can pass\n",
-       "            that into matterhelp() as well.\n",
-       "    \n",
-       "            \n",
-       "
\n" - ], - "text/plain": [ - "\n", - " \n", - "\u001b[1;34m \u001b[0m\n", - "\u001b[1;34m Welcome to the Matter Python REPL!\u001b[0m\n", - "\u001b[1;34m \u001b[0m\n", - "\u001b[1;34m For help, please type \u001b[0m\u001b[1;32mmatterhelp\u001b[0m\u001b[1;32m(\u001b[0m\u001b[1;32m)\u001b[0m\n", - "\u001b[1;34m \u001b[0m\n", - "\u001b[1;34m To get more information on a particular object/class, you can pass\u001b[0m\n", - "\u001b[1;34m that into \u001b[0m\u001b[1;32mmatterhelp\u001b[0m\u001b[1;32m(\u001b[0m\u001b[1;32m)\u001b[0m\u001b[1;34m as well.\u001b[0m\n", - "\u001b[1;34m \u001b[0m\n", - "\u001b[1;34m \u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
─────────────────────────────────────────────────────────────────────────────────────────────\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[92m─────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2022-01-18 14:07:57 johnsj-macbookpro1.roam.corp.google.com root[52410] CRITICAL Loading configuration from /tmp/repl-storage.json...\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Loading CHIP DLL...\n" - ] - }, - { - "data": { - "text/html": [ - "
\n",
-       "\n",
-       "
\n" - ], - "text/plain": [ - "\n", - "\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
Restoring FabricAdmin from storage to manage FabricId 1, FabricIndex 1...\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[38;5;129mRestoring FabricAdmin from storage to manage FabricId \u001b[0m\u001b[1;38;5;129m1\u001b[0m\u001b[38;5;129m, FabricIndex \u001b[0m\u001b[1;38;5;129m1\u001b[0m\u001b[38;5;129m...\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "New FabricAdmin: FabricId: 1(1)\n" - ] - }, - { - "data": { - "text/html": [ - "
\n",
-       "Fabric Admins have been loaded and are available at fabricAdmins\n",
-       "
\n" - ], - "text/plain": [ - "\n", - "\u001b[34mFabric Admins have been loaded and are available at \u001b[0m\u001b[31mfabricAdmins\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
\n",
-       "\n",
-       "
\n" - ], - "text/plain": [ - "\n", - "\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
Creating default device controller on fabric 1...\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[38;5;129mCreating default device controller on fabric \u001b[0m\u001b[1;38;5;129m1\u001b[0m\u001b[38;5;129m...\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Allocating new controller with FabricId: 1(1), NodeId: 1\n" - ] - }, - { - "data": { - "text/html": [ - "
\n",
-       "\n",
-       "Default CHIP Device Controller has been initialized to manage fabricAdmins[0], and is \n",
-       "available as devCtrl\n",
-       "
\n" - ], - "text/plain": [ - "\n", - "\n", - "\u001b[34mDefault CHIP Device Controller has been initialized to manage \u001b[0m\u001b[1;31mfabricAdmins\u001b[0m\u001b[1;31m[\u001b[0m\u001b[1;31m0\u001b[0m\u001b[1;31m]\u001b[0m\u001b[1;34m, and is \u001b[0m\n", - "\u001b[1;34mavailable as \u001b[0m\u001b[1;31mdevCtrl\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "from rich import print\n", - "from rich.pretty import pprint\n", - "from rich import inspect\n", - "import logging\n", - "import chip\n", - "import chip.logging\n", - "from chip import ChipDeviceCtrl\n", - "import chip.clusters as Clusters\n", - "from chip.ChipReplStartup import *\n", - "from chip.ChipStack import *\n", - "import subprocess, sys" - ] - }, - { - "cell_type": "markdown", - "id": "78e14359", - "metadata": {}, - "source": [ - "## Initialization\n", - "\n", - "Next, let's initialize the REPL environment and the Matter Stack." - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "e3057f9d", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
──────────────────────────────────────── Matter REPL ────────────────────────────────────────\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[92m──────────────────────────────────────── \u001b[0mMatter REPL\u001b[92m ────────────────────────────────────────\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
\n",
-       "            \n",
-       "    \n",
-       "            Welcome to the Matter Python REPL!\n",
-       "    \n",
-       "            For help, please type matterhelp()\n",
-       "    \n",
-       "            To get more information on a particular object/class, you can pass\n",
-       "            that into matterhelp() as well.\n",
-       "    \n",
-       "            \n",
-       "
\n" - ], - "text/plain": [ - "\n", - " \n", - "\u001b[1;34m \u001b[0m\n", - "\u001b[1;34m Welcome to the Matter Python REPL!\u001b[0m\n", - "\u001b[1;34m \u001b[0m\n", - "\u001b[1;34m For help, please type \u001b[0m\u001b[1;32mmatterhelp\u001b[0m\u001b[1;32m(\u001b[0m\u001b[1;32m)\u001b[0m\n", - "\u001b[1;34m \u001b[0m\n", - "\u001b[1;34m To get more information on a particular object/class, you can pass\u001b[0m\n", - "\u001b[1;34m that into \u001b[0m\u001b[1;32mmatterhelp\u001b[0m\u001b[1;32m(\u001b[0m\u001b[1;32m)\u001b[0m\u001b[1;34m as well.\u001b[0m\n", - "\u001b[1;34m \u001b[0m\n", - "\u001b[1;34m \u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
─────────────────────────────────────────────────────────────────────────────────────────────\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[92m─────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "ReplInit()\n", - "chipStack = ChipStack()\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "id": "9cb06305", - "metadata": {}, - "source": [ - "## Launch Server\n", - "\n", - "Let's launch an instance of the `chip-all-clusters-app`." - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "52ccd8c6", - "metadata": {}, - "outputs": [], - "source": [ - "subprocess.Popen(['pkill', '-f', 'chip-all-clusters-app'])\n", - "process = subprocess.Popen('./out/debug/chip-all-clusters-app', stdout=subprocess.DEVNULL)" - ] - }, - { - "cell_type": "markdown", - "id": "b33dec2e", - "metadata": {}, - "source": [ - "### Commission Target\n", - "\n", - "Commission the target with a NodeId of 1." - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "5e964fe3", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2022-01-02 21:25:51 johnsj-macbookpro1.roam.corp.google.com chip.CTL[93727] ERROR Unable to find country code, defaulting to WW\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Established CASE with Device\n", - "Node address has been updated\n", - "Commissioning complete\n" - ] - }, - { - "data": { - "text/html": [ - "
True\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[3;92mTrue\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "devCtrl = ChipDeviceCtrl.ChipDeviceController(controllerNodeId=1)\n", - "devCtrl.CommissionIP(b'127.0.0.1', 20202021, 1)" - ] - }, - { - "cell_type": "markdown", - "id": "c22ea8ee", - "metadata": { - "tags": [] - }, - "source": [ - "## Invoke Commands" - ] - }, - { - "cell_type": "markdown", - "id": "4c94d599-e243-43de-8abe-bb4d9b1f52d4", - "metadata": {}, - "source": [ - "### Basic Command (Success Response)" - ] - }, - { - "cell_type": "markdown", - "id": "52e6e92e-0bc6-45f2-9b6b-74d43ba3048c", - "metadata": {}, - "source": [ - "Let's send a basic command to turn on/off the light on Endpoint 1." - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "bed38512-91f8-4d4e-b6e1-b30749137bbd", - "metadata": {}, - "outputs": [], - "source": [ - "await devCtrl.SendCommand(1, 1, Clusters.OnOff.Commands.On())" - ] - }, - { - "cell_type": "markdown", - "id": "b1c0fe3c-95da-4980-9b9b-2a5ab602af44", - "metadata": {}, - "source": [ - "The receipt of a successful status response will result in the command just returning successfully. Otherwise, an exception will be thrown." - ] - }, - { - "cell_type": "markdown", - "id": "80c604b9-f6dc-4ec5-91e8-a6e806c821a6", - "metadata": {}, - "source": [ - "### Basic Command (Failure Response)" - ] - }, - { - "cell_type": "markdown", - "id": "753f5a54-4a75-41ed-a7c0-99c8cca8b6de", - "metadata": { - "tags": [] - }, - "source": [ - "If we send the same command to an invalid endpoint, an exception is thrown:" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "2935f13b-ca16-4f9c-b320-8896c8465278", - "metadata": {}, - "outputs": [ - { - "ename": "InteractionModelError", - "evalue": "InteractionModelError: Failure (0x1)", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mInteractionModelError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m/var/folders/nq/rnhbb96s3sl9n9lrzgx40tfw008537/T/ipykernel_93727/18655580.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mawait\u001b[0m \u001b[0mdevCtrl\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSendCommand\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m100\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mClusters\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mOnOff\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mCommands\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mOn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m~/work/devel/ext-git/connectedhomeip-2/out/python_env/lib/python3.8/site-packages/chip/ChipDeviceCtrl.py\u001b[0m in \u001b[0;36mSendCommand\u001b[0;34m(self, nodeid, endpoint, payload, responseType)\u001b[0m\n\u001b[1;32m 420\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mres\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 421\u001b[0m \u001b[0mfuture\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_exception\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_ChipStack\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mErrorToException\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mres\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 422\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0;32mawait\u001b[0m \u001b[0mfuture\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 423\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 424\u001b[0m \u001b[0;32masync\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mWriteAttribute\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnodeid\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mint\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mattributes\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mtyping\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mList\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mtyping\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mTuple\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mint\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mClusterObjects\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mClusterAttributeDescriptor\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mInteractionModelError\u001b[0m: InteractionModelError: Failure (0x1)" - ] - } - ], - "source": [ - "await devCtrl.SendCommand(1, 100, Clusters.OnOff.Commands.On())" - ] - }, - { - "cell_type": "markdown", - "id": "5296f2bc-5e9d-4b06-a7c1-f247ebe5eac2", - "metadata": {}, - "source": [ - "### Basic Command (Data Response)" - ] - }, - { - "cell_type": "markdown", - "id": "bb196da4-5162-4c4b-ae64-ef1d23a04eb9", - "metadata": { - "tags": [] - }, - "source": [ - "Here's an example of a command that sends back a data response, and how that is presented:" - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "id": "33f34d12-79f4-4230-836b-2e66ea839440", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n",
-       "TestListInt8UReverseResponse(\n",
-       "arg1=[\n",
-       "│   │   7,\n",
-       "│   │   5,\n",
-       "│   │   3,\n",
-       "│   │   1\n",
-       "]\n",
-       ")\n",
-       "
\n" - ], - "text/plain": [ - "\n", - "\u001b[1;35mTestListInt8UReverseResponse\u001b[0m\u001b[1m(\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[33marg1\u001b[0m=\u001b[1m[\u001b[0m\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1;36m7\u001b[0m,\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1;36m5\u001b[0m,\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1;36m3\u001b[0m,\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1;36m1\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[1m]\u001b[0m\n", - "\u001b[1m)\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "await devCtrl.SendCommand(1, 1, Clusters.TestCluster.Commands.TestListInt8UReverseRequest([1, 3, 5, 7]))" - ] - }, - { - "cell_type": "markdown", - "id": "820fcede", - "metadata": { - "tags": [] - }, - "source": [ - "### Read out the Fabric List to validate" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "765fe963-80a6-41f6-a569-df5d71c6822c", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "data": { - "text/html": [ - "
\n",
-       "{\n",
-       "0: {\n",
-       "│   │   <class 'chip.clusters.Objects.OperationalCredentials'>: {\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.FabricsList'>: [\n",
-       "│   │   │   │   FabricDescriptor(\n",
-       "│   │   │   │   │   fabricIndex=1,\n",
-       "│   │   │   │   │   rootPublicKey=b'\\x04b\\xeeV\\x80\\x01\\xee\\xab1\\x0f|\\x01\\xc1\\xaf5\\x14\\xf0\\x18\\x8f\\xa2\\xa3\\xa8\\x8b \\x0c\\x8c\\xd5\\xb0\\xf6]BN\\rS=\\xa4U\\xeb\\xf5\\x82\\xbbdKU\\xc8\\xe9\\x16\\xeao}\\xcc\\xce<\\xbf^\\xd5\\xa5\\x06,L\\x93\\x1dX\\xc5\\xfc',\n",
-       "│   │   │   │   │   vendorId=26464,\n",
-       "│   │   │   │   │   fabricId=1,\n",
-       "│   │   │   │   │   nodeId=1,\n",
-       "│   │   │   │   │   label=''\n",
-       "│   │   │   │   )\n",
-       "│   │   │   ],\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.SupportedFabrics'>: 16,\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.CommissionedFabrics'>: 1,\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.TrustedRootCertificates'>: [\n",
-       "│   │   │   │   b'\\x150\\x01\\x01\\x00$\\x02\\x017\\x03$\\x14\\x00$\\x15\\x01\\x18&\\x04\\x80\"\\x81\\'&\\x05\\x80%M:7\\x06$\\x14\\x00$\\x15\\x01\\x18$\\x07\\x01$\\x08\\x010\\tA\\x04b\\xeeV\\x80\\x01\\xee\\xab1\\x0f|\\x01\\xc1\\xaf5\\x14\\xf0\\x18\\x8f\\xa2\\xa3\\xa8\\x8b \\x0c\\x8c\\xd5\\xb0\\xf6]BN\\rS=\\xa4U\\xeb\\xf5\\x82\\xbbdKU\\xc8\\xe9\\x16\\xeao}\\xcc\\xce<\\xbf^\\xd5\\xa5\\x06,L\\x93\\x1dX\\xc5\\xfc7\\n5\\x01)\\x01\\x18$\\x02`0\\x04\\x14q9\\x96)~h\\xbc\\x04:\\xc5\\x12\\xeb\\xa8\\x16y\\xd4\\xb2C\\xba\\xf50\\x05\\x14q9\\x96)~h\\xbc\\x04:\\xc5\\x12\\xeb\\xa8\\x16y\\xd4\\xb2C\\xba\\xf5\\x180\\x0b@\\x13K\\x909\\xd6\\xf2\\xbb\\x1c\\\\R/E\\xe7\\x00y\\xbf^d8\\x05\\x89\\x8c\\xbeK\\x14O\\xac\\x8c\\xd44\\x93\\n\\xb1\\xe6k\\xa7\\x9c\\xdc\\xc5\\xffR,\\xcc\\xb5\\xc4\\x84\\x01\\x92\\x9d.\\x9b\\xda\\x0f\\x1d\\xa2\\xccEz-\\x13\\x05\\x12\\x1d\\xcb\\x18'\n",
-       "│   │   │   ],\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.CurrentFabricIndex'>: 1,\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.ClusterRevision'>: 1\n",
-       "│   │   }\n",
-       "}\n",
-       "}\n",
-       "
\n" - ], - "text/plain": [ - "\n", - "\u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[1;36m0\u001b[0m: \u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OperationalCredentials'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OperationalCredentials.Attributes.FabricsList'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;35mFabricDescriptor\u001b[0m\u001b[1m(\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mfabricIndex\u001b[0m=\u001b[1;36m1\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mrootPublicKey\u001b[0m=\u001b[32mb\u001b[0m\u001b[32m'\\x04b\\xeeV\\x80\\x01\\xee\\xab1\\x0f|\\x01\\xc1\\xaf5\\x14\\xf0\\x18\\x8f\\xa2\\xa3\\xa8\\x8b \\x0c\\x8c\\xd5\\xb0\\xf6\u001b[0m\u001b[32m]\u001b[0m\u001b[32mBN\\\u001b[0m\u001b[32mrS\u001b[0m\u001b[32m=\\xa4U\\xeb\\xf5\\x82\\xbbdKU\\xc8\\xe9\\x16\\xeao\u001b[0m\u001b[32m}\u001b[0m\u001b[32m\\xcc\\xce\u001b[0m\u001b[32m<\u001b[0m\u001b[32m\\xbf^\\xd5\\xa5\\x06,L\\x93\\x1dX\\xc5\\xfc'\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mvendorId\u001b[0m\u001b[39m=\u001b[0m\u001b[1;36m26464\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mfabricId\u001b[0m\u001b[39m=\u001b[0m\u001b[1;36m1\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mnodeId\u001b[0m\u001b[39m=\u001b[0m\u001b[1;36m1\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mlabel\u001b[0m\u001b[39m=\u001b[0m\u001b[32m''\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;39m)\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1;39m]\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[39m\u001b[0m: \u001b[1;36m16\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OperationalCredentials.Attributes.CommissionedFabrics'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m1\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OperationalCredentials.Attributes.TrustedRootCertificates'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[32mb'\\x150\\x01\\x01\\x00$\\x02\\x017\\x03$\\x14\\x00$\\x15\\x01\\x18&\\x04\\x80\"\\x81\\'&\\x05\\x80%M:7\\x06$\\x14\\x00$\\x15\\x01\\x18$\\x07\\x01$\\x08\\x010\\tA\\x04b\\xeeV\\x80\\x01\\xee\\xab1\\x0f|\\x01\\xc1\\xaf5\\x14\\xf0\\x18\\x8f\\xa2\\xa3\\xa8\\x8b \\x0c\\x8c\\xd5\\xb0\\xf6\u001b[0m\u001b[32m]\u001b[0m\u001b[32mBN\\\u001b[0m\u001b[32mrS\u001b[0m\u001b[32m=\\xa4U\\xeb\\xf5\\x82\\xbbdKU\\xc8\\xe9\\x16\\xeao\u001b[0m\u001b[32m}\u001b[0m\u001b[32m\\xcc\\xce\u001b[0m\u001b[32m<\u001b[0m\u001b[32m\\xbf^\\xd5\\xa5\\x06,L\\x93\\x1dX\\xc5\\xfc7\\n5\\x01\u001b[0m\u001b[32m)\u001b[0m\u001b[32m\\x01\\x18$\\x02`0\\x04\\x14q9\\x96\u001b[0m\u001b[32m)\u001b[0m\u001b[32m~h\\xbc\\x04:\\xc5\\x12\\xeb\\xa8\\x16y\\xd4\\xb2C\\xba\\xf50\\x05\\x14q9\\x96\u001b[0m\u001b[32m)\u001b[0m\u001b[32m~h\\xbc\\x04:\\xc5\\x12\\xeb\\xa8\\x16y\\xd4\\xb2C\\xba\\xf5\\x180\\x0b@\\x13K\\x909\\xd6\\xf2\\xbb\\x1c\\\\R/E\\xe7\\x00y\\xbf^d8\\x05\\x89\\x8c\\xbeK\\x14O\\xac\\x8c\\xd44\\x93\\n\\xb1\\xe6k\\xa7\\x9c\\xdc\\xc5\\xffR,\\xcc\\xb5\\xc4\\x84\\x01\\x92\\x9d.\\x9b\\xda\\x0f\\x1d\\xa2\\xccEz-\\x13\\x05\\x12\\x1d\\xcb\\x18'\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1;39m]\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[39m\u001b[0m: \u001b[1;36m1\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OperationalCredentials.Attributes.ClusterRevision'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m1\u001b[0m\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1m}\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[1m}\u001b[0m\n", - "\u001b[1m}\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "await devCtrl.ReadAttribute(1, [(Clusters.OperationalCredentials)])" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "id": "6802862a", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "data": { - "text/html": [ - "
\n",
-       "{\n",
-       "0: {\n",
-       "│   │   <class 'chip.clusters.Objects.Descriptor'>: Descriptor(\n",
-       "│   │   │   deviceList=[\n",
-       "│   │   │   │   DeviceType(\n",
-       "│   │   │   │   │   type=22,\n",
-       "│   │   │   │   │   revision=1\n",
-       "│   │   │   │   )\n",
-       "│   │   │   ],\n",
-       "│   │   │   serverList=[\n",
-       "│   │   │   │   3,\n",
-       "│   │   │   │   4,\n",
-       "│   │   │   │   29,\n",
-       "│   │   │   │   30,\n",
-       "│   │   │   │   31,\n",
-       "│   │   │   │   40,\n",
-       "│   │   │   │   41,\n",
-       "│   │   │   │   42,\n",
-       "│   │   │   │   46,\n",
-       "│   │   │   │   48,\n",
-       "│   │   │   │   49,\n",
-       "│   │   │   │   50,\n",
-       "│   │   │   │   51,\n",
-       "│   │   │   │   52,\n",
-       "│   │   │   │   53,\n",
-       "│   │   │   │   54,\n",
-       "│   │   │   │   55,\n",
-       "│   │   │   │   60,\n",
-       "│   │   │   │   62,\n",
-       "│   │   │   │   63,\n",
-       "│   │   │   │   64,\n",
-       "│   │   │   │   65,\n",
-       "│   │   │   │   1029\n",
-       "│   │   │   ],\n",
-       "│   │   │   clientList=[],\n",
-       "│   │   │   partsList=[\n",
-       "│   │   │   │   1,\n",
-       "│   │   │   │   2\n",
-       "│   │   │   ],\n",
-       "│   │   │   attributeList=None,\n",
-       "│   │   │   featureMap=None,\n",
-       "│   │   │   clusterRevision=1\n",
-       "│   │   )\n",
-       "},\n",
-       "1: {\n",
-       "│   │   <class 'chip.clusters.Objects.Descriptor'>: Descriptor(\n",
-       "│   │   │   deviceList=[\n",
-       "│   │   │   │   DeviceType(\n",
-       "│   │   │   │   │   type=22,\n",
-       "│   │   │   │   │   revision=1\n",
-       "│   │   │   │   )\n",
-       "│   │   │   ],\n",
-       "│   │   │   serverList=[\n",
-       "│   │   │   │   3,\n",
-       "│   │   │   │   4,\n",
-       "│   │   │   │   5,\n",
-       "│   │   │   │   6,\n",
-       "│   │   │   │   7,\n",
-       "│   │   │   │   8,\n",
-       "│   │   │   │   15,\n",
-       "│   │   │   │   29,\n",
-       "│   │   │   │   30,\n",
-       "│   │   │   │   37,\n",
-       "│   │   │   │   47,\n",
-       "│   │   │   │   57,\n",
-       "│   │   │   │   59,\n",
-       "│   │   │   │   64,\n",
-       "│   │   │   │   65,\n",
-       "│   │   │   │   69,\n",
-       "│   │   │   │   80,\n",
-       "│   │   │   │   257,\n",
-       "│   │   │   │   258,\n",
-       "│   │   │   │   259,\n",
-       "│   │   │   │   512,\n",
-       "│   │   │   │   513,\n",
-       "│   │   │   │   516,\n",
-       "│   │   │   │   768,\n",
-       "│   │   │   │   1024,\n",
-       "│   │   │   │   1026,\n",
-       "│   │   │   │   1027,\n",
-       "│   │   │   │   1028,\n",
-       "│   │   │   │   1029,\n",
-       "│   │   │   │   1030,\n",
-       "│   │   │   │   1280,\n",
-       "│   │   │   │   1283,\n",
-       "│   │   │   │   1284,\n",
-       "│   │   │   │   1285,\n",
-       "│   │   │   │   1286,\n",
-       "│   │   │   │   1287,\n",
-       "│   │   │   │   1288,\n",
-       "│   │   │   │   1289,\n",
-       "│   │   │   │   1290,\n",
-       "│   │   │   │   1291,\n",
-       "│   │   │   │   1292,\n",
-       "│   │   │   │   1293,\n",
-       "│   │   │   │   1294,\n",
-       "│   │   │   │   1295,\n",
-       "│   │   │   │   2820\n",
-       "│   │   │   ],\n",
-       "│   │   │   clientList=[],\n",
-       "│   │   │   partsList=[],\n",
-       "│   │   │   attributeList=None,\n",
-       "│   │   │   featureMap=None,\n",
-       "│   │   │   clusterRevision=1\n",
-       "│   │   )\n",
-       "},\n",
-       "2: {\n",
-       "│   │   <class 'chip.clusters.Objects.Descriptor'>: Descriptor(\n",
-       "│   │   │   deviceList=[\n",
-       "│   │   │   │   DeviceType(\n",
-       "│   │   │   │   │   type=22,\n",
-       "│   │   │   │   │   revision=1\n",
-       "│   │   │   │   )\n",
-       "│   │   │   ],\n",
-       "│   │   │   serverList=[\n",
-       "│   │   │   │   4,\n",
-       "│   │   │   │   6,\n",
-       "│   │   │   │   29,\n",
-       "│   │   │   │   1030\n",
-       "│   │   │   ],\n",
-       "│   │   │   clientList=[],\n",
-       "│   │   │   partsList=[],\n",
-       "│   │   │   attributeList=None,\n",
-       "│   │   │   featureMap=None,\n",
-       "│   │   │   clusterRevision=1\n",
-       "│   │   )\n",
-       "}\n",
-       "}\n",
-       "
\n" - ], - "text/plain": [ - "\n", - "\u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[1;36m0\u001b[0m: \u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.Descriptor'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;35mDescriptor\u001b[0m\u001b[1m(\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mdeviceList\u001b[0m=\u001b[1m[\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;35mDeviceType\u001b[0m\u001b[1m(\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mtype\u001b[0m=\u001b[1;36m22\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mrevision\u001b[0m=\u001b[1;36m1\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1m)\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m]\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mserverList\u001b[0m=\u001b[1m[\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m3\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m4\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m29\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m30\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m31\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m40\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m41\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m42\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m46\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m48\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m49\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m50\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m51\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m52\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m53\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m54\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m55\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m60\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m62\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m63\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m64\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m65\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1029\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m]\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mclientList\u001b[0m=\u001b[1m[\u001b[0m\u001b[1m]\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mpartsList\u001b[0m=\u001b[1m[\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m2\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m]\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mattributeList\u001b[0m=\u001b[3;35mNone\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mfeatureMap\u001b[0m=\u001b[3;35mNone\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mclusterRevision\u001b[0m=\u001b[1;36m1\u001b[0m\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1m)\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[1m}\u001b[0m,\n", - "\u001b[2;32m│ \u001b[0m\u001b[1;36m1\u001b[0m: \u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.Descriptor'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;35mDescriptor\u001b[0m\u001b[1m(\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mdeviceList\u001b[0m=\u001b[1m[\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;35mDeviceType\u001b[0m\u001b[1m(\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mtype\u001b[0m=\u001b[1;36m22\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mrevision\u001b[0m=\u001b[1;36m1\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1m)\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m]\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mserverList\u001b[0m=\u001b[1m[\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m3\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m4\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m5\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m6\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m7\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m8\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m15\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m29\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m30\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m37\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m47\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m57\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m59\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m64\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m65\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m69\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m80\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m257\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m258\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m259\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m512\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m513\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m516\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m768\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1024\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1026\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1027\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1028\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1029\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1030\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1280\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1283\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1284\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1285\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1286\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1287\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1288\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1289\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1290\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1291\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1292\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1293\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1294\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1295\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m2820\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m]\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mclientList\u001b[0m=\u001b[1m[\u001b[0m\u001b[1m]\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mpartsList\u001b[0m=\u001b[1m[\u001b[0m\u001b[1m]\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mattributeList\u001b[0m=\u001b[3;35mNone\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mfeatureMap\u001b[0m=\u001b[3;35mNone\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mclusterRevision\u001b[0m=\u001b[1;36m1\u001b[0m\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1m)\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[1m}\u001b[0m,\n", - "\u001b[2;32m│ \u001b[0m\u001b[1;36m2\u001b[0m: \u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.Descriptor'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;35mDescriptor\u001b[0m\u001b[1m(\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mdeviceList\u001b[0m=\u001b[1m[\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;35mDeviceType\u001b[0m\u001b[1m(\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mtype\u001b[0m=\u001b[1;36m22\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mrevision\u001b[0m=\u001b[1;36m1\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1m)\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m]\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mserverList\u001b[0m=\u001b[1m[\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m4\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m6\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m29\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;36m1030\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m]\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mclientList\u001b[0m=\u001b[1m[\u001b[0m\u001b[1m]\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mpartsList\u001b[0m=\u001b[1m[\u001b[0m\u001b[1m]\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mattributeList\u001b[0m=\u001b[3;35mNone\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mfeatureMap\u001b[0m=\u001b[3;35mNone\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[33mclusterRevision\u001b[0m=\u001b[1;36m1\u001b[0m\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1m)\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[1m}\u001b[0m\n", - "\u001b[1m}\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "await devCtrl.ReadAttribute(1, [(Clusters.Descriptor)], True)" - ] - }, - { - "cell_type": "markdown", - "id": "dbade62b", - "metadata": {}, - "source": [ - "Note that the `FabricsList` contains just a single item with a `fabriIndex` of 1, and a `fabricId` of 1." - ] - }, - { - "cell_type": "markdown", - "id": "7326ae6a", - "metadata": { - "tags": [] - }, - "source": [ - "### Create Controller on Fabric B" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "id": "a975776b", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n",
-       "[\n",
-       "1,\n",
-       "2,\n",
-       "3,\n",
-       "4\n",
-       "]\n",
-       "
\n" - ], - "text/plain": [ - "\n", - "\u001b[1m[\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[1;36m1\u001b[0m,\n", - "\u001b[2;32m│ \u001b[0m\u001b[1;36m2\u001b[0m,\n", - "\u001b[2;32m│ \u001b[0m\u001b[1;36m3\u001b[0m,\n", - "\u001b[2;32m│ \u001b[0m\u001b[1;36m4\u001b[0m\n", - "\u001b[1m]\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "a = [1, 2, 3, 4]\n", - "a" - ] - }, - { - "cell_type": "markdown", - "id": "72b857b3", - "metadata": {}, - "source": [ - "### Open Commissioning Window\n", - "\n", - "The target right now doesn't accept commissioning requests. So let's go ahead and open the commissioning window to permit the second controller on Fabric B to commission the target. This request has to originate from the 1st controller." - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "f4fca3f4", - "metadata": {}, - "outputs": [], - "source": [ - "await devCtrl.SendCommand(1, 0, Clusters.AdministratorCommissioning.Commands.OpenBasicCommissioningWindow(100))" - ] - }, - { - "cell_type": "markdown", - "id": "b7b2215e", - "metadata": {}, - "source": [ - "### Commission Target on Fabric B" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "41255a44", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2021-12-30 21:35:59 johnsj-macbookpro1.roam.corp.google.com chip.CTL[58883] ERROR Unable to find country code, defaulting to WW\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Established CASE with Device\n" - ] - }, - { - "data": { - "text/html": [ - "
True\n",
-       "
\n" - ], - "text/plain": [ - "\u001b[3;92mTrue\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Node address has been updated\n", - "Commissioning complete\n" - ] - } - ], - "source": [ - "devCtrl2.CommissionIP(b'127.0.0.1', 20202021, 1)" - ] - }, - { - "cell_type": "markdown", - "id": "b17289ff", - "metadata": {}, - "source": [ - "### Read out the Fabric List to validate" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "903cb0fd", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n",
-       "{\n",
-       "0: {\n",
-       "│   │   <class 'chip.clusters.Objects.OperationalCredentials'>: {\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.FabricsList'>: [\n",
-       "│   │   │   │   FabricDescriptor(\n",
-       "│   │   │   │   │   fabricIndex=1,\n",
-       "│   │   │   │   │   rootPublicKey=b'\\x04b\\xeeV\\x80\\x01\\xee\\xab1\\x0f|\\x01\\xc1\\xaf5\\x14\\xf0\\x18\\x8f\\xa2\\xa3\\xa8\\x8b \\x0c\\x8c\\xd5\\xb0\\xf6]BN\\rS=\\xa4U\\xeb\\xf5\\x82\\xbbdKU\\xc8\\xe9\\x16\\xeao}\\xcc\\xce<\\xbf^\\xd5\\xa5\\x06,L\\x93\\x1dX\\xc5\\xfc',\n",
-       "│   │   │   │   │   vendorId=26464,\n",
-       "│   │   │   │   │   fabricId=1,\n",
-       "│   │   │   │   │   nodeId=1,\n",
-       "│   │   │   │   │   label=''\n",
-       "│   │   │   │   ),\n",
-       "│   │   │   │   FabricDescriptor(\n",
-       "│   │   │   │   │   fabricIndex=2,\n",
-       "│   │   │   │   │   rootPublicKey=b'\\x04G+A\\xc6\\x15\\xb0\\xa6\\x1e\\xb2_J\\x8e\\xb1b\\xc6\\x16\\xcd\\xa8\\xe63\\x98\\xb8\\x7fr\\x9a\\xfe\\x01#\\xe0\\x8fw4\\xc1[\\x17\\xd1\\x81.\\xa0\\r\\x90\\xef|\\xf2\\xe3\\xe3\\xf6\\x82\\x91@U\\x90N\\xbd\\xdb\\xb2 h\\r\\x10w\\xf69\\x93',\n",
-       "│   │   │   │   │   vendorId=26464,\n",
-       "│   │   │   │   │   fabricId=2,\n",
-       "│   │   │   │   │   nodeId=1,\n",
-       "│   │   │   │   │   label=''\n",
-       "│   │   │   │   )\n",
-       "│   │   │   ],\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.SupportedFabrics'>: 16,\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.CommissionedFabrics'>: 2,\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.TrustedRootCertificates'>: [\n",
-       "│   │   │   │   b'\\x150\\x01\\x01\\x00$\\x02\\x017\\x03$\\x14\\x00$\\x15\\x01\\x18&\\x04\\x80\"\\x81\\'&\\x05\\x80%M:7\\x06$\\x14\\x00$\\x15\\x01\\x18$\\x07\\x01$\\x08\\x010\\tA\\x04b\\xeeV\\x80\\x01\\xee\\xab1\\x0f|\\x01\\xc1\\xaf5\\x14\\xf0\\x18\\x8f\\xa2\\xa3\\xa8\\x8b \\x0c\\x8c\\xd5\\xb0\\xf6]BN\\rS=\\xa4U\\xeb\\xf5\\x82\\xbbdKU\\xc8\\xe9\\x16\\xeao}\\xcc\\xce<\\xbf^\\xd5\\xa5\\x06,L\\x93\\x1dX\\xc5\\xfc7\\n5\\x01)\\x01\\x18$\\x02`0\\x04\\x14q9\\x96)~h\\xbc\\x04:\\xc5\\x12\\xeb\\xa8\\x16y\\xd4\\xb2C\\xba\\xf50\\x05\\x14q9\\x96)~h\\xbc\\x04:\\xc5\\x12\\xeb\\xa8\\x16y\\xd4\\xb2C\\xba\\xf5\\x180\\x0b@\\x13K\\x909\\xd6\\xf2\\xbb\\x1c\\\\R/E\\xe7\\x00y\\xbf^d8\\x05\\x89\\x8c\\xbeK\\x14O\\xac\\x8c\\xd44\\x93\\n\\xb1\\xe6k\\xa7\\x9c\\xdc\\xc5\\xffR,\\xcc\\xb5\\xc4\\x84\\x01\\x92\\x9d.\\x9b\\xda\\x0f\\x1d\\xa2\\xccEz-\\x13\\x05\\x12\\x1d\\xcb\\x18',\n",
-       "│   │   │   │   b'\\x150\\x01\\x01\\x00$\\x02\\x017\\x03$\\x14\\x00$\\x15\\x02\\x18&\\x04\\x80\"\\x81\\'&\\x05\\x80%M:7\\x06$\\x14\\x00$\\x15\\x02\\x18$\\x07\\x01$\\x08\\x010\\tA\\x04G+A\\xc6\\x15\\xb0\\xa6\\x1e\\xb2_J\\x8e\\xb1b\\xc6\\x16\\xcd\\xa8\\xe63\\x98\\xb8\\x7fr\\x9a\\xfe\\x01#\\xe0\\x8fw4\\xc1[\\x17\\xd1\\x81.\\xa0\\r\\x90\\xef|\\xf2\\xe3\\xe3\\xf6\\x82\\x91@U\\x90N\\xbd\\xdb\\xb2 h\\r\\x10w\\xf69\\x937\\n5\\x01)\\x01\\x18$\\x02`0\\x04\\x14\\xc6\\xb8;\\xbf\"u\\xb8f\"\\x99\\x10\\xc5o\\xdf\\xc4(\\x1b\\xbd\\xeeh0\\x05\\x14\\xc6\\xb8;\\xbf\"u\\xb8f\"\\x99\\x10\\xc5o\\xdf\\xc4(\\x1b\\xbd\\xeeh\\x180\\x0b@\\tQ;Y\\xb6\\x82I[\\x85k\\xfdot\\xb6\\x98\\x04\\x1d\\xf9SJ\\xf74\\xfa\\xbc\\xa1OWM\\xef\\xec\\xcf|\\xad[\\x17\\xd5/\\xa9\\xbb\\xb4\\xbc\\xb1\\xafa\\x06\\xdb\\xcd]E\\xdf\\x84\\xcf\\xb6\\x10\\xd9\\xc7\\xf5l\\xef\\x96K6\\xbd\\xa5\\x18'\n",
-       "│   │   │   ],\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.CurrentFabricIndex'>: 2,\n",
-       "│   │   │   <class 'chip.clusters.Objects.OperationalCredentials.Attributes.ClusterRevision'>: 1\n",
-       "│   │   }\n",
-       "}\n",
-       "}\n",
-       "
\n" - ], - "text/plain": [ - "\n", - "\u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[1;36m0\u001b[0m: \u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OperationalCredentials'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OperationalCredentials.Attributes.FabricsList'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;35mFabricDescriptor\u001b[0m\u001b[1m(\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mfabricIndex\u001b[0m=\u001b[1;36m1\u001b[0m,\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mrootPublicKey\u001b[0m=\u001b[32mb\u001b[0m\u001b[32m'\\x04b\\xeeV\\x80\\x01\\xee\\xab1\\x0f|\\x01\\xc1\\xaf5\\x14\\xf0\\x18\\x8f\\xa2\\xa3\\xa8\\x8b \\x0c\\x8c\\xd5\\xb0\\xf6\u001b[0m\u001b[32m]\u001b[0m\u001b[32mBN\\\u001b[0m\u001b[32mrS\u001b[0m\u001b[32m=\\xa4U\\xeb\\xf5\\x82\\xbbdKU\\xc8\\xe9\\x16\\xeao\u001b[0m\u001b[32m}\u001b[0m\u001b[32m\\xcc\\xce\u001b[0m\u001b[32m<\u001b[0m\u001b[32m\\xbf^\\xd5\\xa5\\x06,L\\x93\\x1dX\\xc5\\xfc'\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mvendorId\u001b[0m\u001b[39m=\u001b[0m\u001b[1;36m26464\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mfabricId\u001b[0m\u001b[39m=\u001b[0m\u001b[1;36m1\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mnodeId\u001b[0m\u001b[39m=\u001b[0m\u001b[1;36m1\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mlabel\u001b[0m\u001b[39m=\u001b[0m\u001b[32m''\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;39m)\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;35mFabricDescriptor\u001b[0m\u001b[1;39m(\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mfabricIndex\u001b[0m\u001b[39m=\u001b[0m\u001b[1;36m2\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mrootPublicKey\u001b[0m\u001b[39m=\u001b[0m\u001b[32mb\u001b[0m\u001b[32m'\\x04G+A\\xc6\\x15\\xb0\\xa6\\x1e\\xb2_J\\x8e\\xb1b\\xc6\\x16\\xcd\\xa8\\xe63\\x98\\xb8\\x7fr\\x9a\\xfe\\x01#\\xe0\\x8fw4\\xc1\u001b[0m\u001b[32m[\u001b[0m\u001b[32m\\x17\\xd1\\x81.\\xa0\\r\\x90\\xef|\\xf2\\xe3\\xe3\\xf6\\x82\\x91@U\\x90N\\xbd\\xdb\\xb2 h\\r\\x10w\\xf69\\x93'\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mvendorId\u001b[0m\u001b[39m=\u001b[0m\u001b[1;36m26464\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mfabricId\u001b[0m\u001b[39m=\u001b[0m\u001b[1;36m2\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mnodeId\u001b[0m\u001b[39m=\u001b[0m\u001b[1;36m1\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ │ │ \u001b[0m\u001b[33mlabel\u001b[0m\u001b[39m=\u001b[0m\u001b[32m''\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[1;39m)\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1;39m]\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[39m\u001b[0m: \u001b[1;36m16\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OperationalCredentials.Attributes.CommissionedFabrics'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m2\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OperationalCredentials.Attributes.TrustedRootCertificates'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[32mb'\\x150\\x01\\x01\\x00$\\x02\\x017\\x03$\\x14\\x00$\\x15\\x01\\x18&\\x04\\x80\"\\x81\\'&\\x05\\x80%M:7\\x06$\\x14\\x00$\\x15\\x01\\x18$\\x07\\x01$\\x08\\x010\\tA\\x04b\\xeeV\\x80\\x01\\xee\\xab1\\x0f|\\x01\\xc1\\xaf5\\x14\\xf0\\x18\\x8f\\xa2\\xa3\\xa8\\x8b \\x0c\\x8c\\xd5\\xb0\\xf6\u001b[0m\u001b[32m]\u001b[0m\u001b[32mBN\\\u001b[0m\u001b[32mrS\u001b[0m\u001b[32m=\\xa4U\\xeb\\xf5\\x82\\xbbdKU\\xc8\\xe9\\x16\\xeao\u001b[0m\u001b[32m}\u001b[0m\u001b[32m\\xcc\\xce\u001b[0m\u001b[32m<\u001b[0m\u001b[32m\\xbf^\\xd5\\xa5\\x06,L\\x93\\x1dX\\xc5\\xfc7\\n5\\x01\u001b[0m\u001b[32m)\u001b[0m\u001b[32m\\x01\\x18$\\x02`0\\x04\\x14q9\\x96\u001b[0m\u001b[32m)\u001b[0m\u001b[32m~h\\xbc\\x04:\\xc5\\x12\\xeb\\xa8\\x16y\\xd4\\xb2C\\xba\\xf50\\x05\\x14q9\\x96\u001b[0m\u001b[32m)\u001b[0m\u001b[32m~h\\xbc\\x04:\\xc5\\x12\\xeb\\xa8\\x16y\\xd4\\xb2C\\xba\\xf5\\x180\\x0b@\\x13K\\x909\\xd6\\xf2\\xbb\\x1c\\\\R/E\\xe7\\x00y\\xbf^d8\\x05\\x89\\x8c\\xbeK\\x14O\\xac\\x8c\\xd44\\x93\\n\\xb1\\xe6k\\xa7\\x9c\\xdc\\xc5\\xffR,\\xcc\\xb5\\xc4\\x84\\x01\\x92\\x9d.\\x9b\\xda\\x0f\\x1d\\xa2\\xccEz-\\x13\\x05\\x12\\x1d\\xcb\\x18'\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ │ \u001b[0m\u001b[32mb'\\x150\\x01\\x01\\x00$\\x02\\x017\\x03$\\x14\\x00$\\x15\\x02\\x18&\\x04\\x80\"\\x81\\'&\\x05\\x80%M:7\\x06$\\x14\\x00$\\x15\\x02\\x18$\\x07\\x01$\\x08\\x010\\tA\\x04G+A\\xc6\\x15\\xb0\\xa6\\x1e\\xb2_J\\x8e\\xb1b\\xc6\\x16\\xcd\\xa8\\xe63\\x98\\xb8\\x7fr\\x9a\\xfe\\x01#\\xe0\\x8fw4\\xc1\u001b[0m\u001b[32m[\u001b[0m\u001b[32m\\x17\\xd1\\x81.\\xa0\\r\\x90\\xef|\\xf2\\xe3\\xe3\\xf6\\x82\\x91@U\\x90N\\xbd\\xdb\\xb2 h\\r\\x10w\\xf69\\x937\\n5\\x01\u001b[0m\u001b[32m)\u001b[0m\u001b[32m\\x01\\x18$\\x02`0\\x04\\x14\\xc6\\xb8;\\xbf\"u\\xb8f\"\\x99\\x10\\xc5o\\xdf\\xc4\u001b[0m\u001b[32m(\u001b[0m\u001b[32m\\x1b\\xbd\\xeeh0\\x05\\x14\\xc6\\xb8;\\xbf\"u\\xb8f\"\\x99\\x10\\xc5o\\xdf\\xc4\u001b[0m\u001b[32m(\u001b[0m\u001b[32m\\x1b\\xbd\\xeeh\\x180\\x0b@\\tQ;Y\\xb6\\x82I\u001b[0m\u001b[32m[\u001b[0m\u001b[32m\\x85k\\xfdot\\xb6\\x98\\x04\\x1d\\xf9SJ\\xf74\\xfa\\xbc\\xa1OWM\\xef\\xec\\xcf|\\xad\u001b[0m\u001b[32m[\u001b[0m\u001b[32m\\x17\\xd5/\\xa9\\xbb\\xb4\\xbc\\xb1\\xafa\\x06\\xdb\\xcd\u001b[0m\u001b[32m]\u001b[0m\u001b[32mE\\xdf\\x84\\xcf\\xb6\\x10\\xd9\\xc7\\xf5l\\xef\\x96K6\\xbd\\xa5\\x18'\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1;39m]\u001b[0m\u001b[39m,\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[39m\u001b[0m: \u001b[1;36m2\u001b[0m,\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OperationalCredentials.Attributes.ClusterRevision'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m1\u001b[0m\n", - "\u001b[2;32m│ │ \u001b[0m\u001b[1m}\u001b[0m\n", - "\u001b[2;32m│ \u001b[0m\u001b[1m}\u001b[0m\n", - "\u001b[1m}\u001b[0m\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "await devCtrl2.ReadAttribute(1, [(Clusters.OperationalCredentials)])" - ] - }, - { - "cell_type": "markdown", - "id": "ebf71c37", - "metadata": {}, - "source": [ - "Note that the FabricsList contains two items now!" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "matter-env-2", - "language": "python", - "name": "matter-env-2" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.2+chromium.10" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/README.md b/README.md index 462457a3307e2e..f99153876e7b43 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ ![Examples - Linux Standalone](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20Linux%20Standalone/badge.svg) ![Examples - ESP32](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20ESP32/badge.svg) ![Examples - K32W with SE051](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20K32W%20with%20SE051/badge.svg) +![Examples - i.MX Linux](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20i.MX%20Linux/badge.svg) ![Android](https://github.com/project-chip/connectedhomeip/workflows/Android/badge.svg) diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 63535664264835..be7a942a113339 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -47,6 +47,16 @@ menu "CHIP Core" A Binding object is used to configure how the local device communicates with a remote entity, be it a cloud service, a mobile application, or another device. + config MAX_FABRICS + int "Max Fabrics" + range 5 255 + default 5 + help + The maxinum number of fabrics the device can participate in. + + Each fabric can provision the device with its unique operational credentials and + manage its own access control lists. + config MAX_PEER_NODES int "Max Peer Nodes" range 0 65535 diff --git a/config/nrfconnect/chip-module/Kconfig b/config/nrfconnect/chip-module/Kconfig index 09f6343bbfeceb..ee537f146114a4 100644 --- a/config/nrfconnect/chip-module/Kconfig +++ b/config/nrfconnect/chip-module/Kconfig @@ -47,4 +47,5 @@ config CHIP_OTA_REQUESTOR_BUFFER_SIZE # See config/zephyr/Kconfig for full definition config CHIP_OTA_IMAGE_BUILD bool + default y if CHIP_OTA_REQUESTOR depends on SIGN_IMAGES diff --git a/docs/guides/troubleshooting_avahi.md b/docs/guides/troubleshooting_avahi.md new file mode 100644 index 00000000000000..c86b3ec1071cc6 --- /dev/null +++ b/docs/guides/troubleshooting_avahi.md @@ -0,0 +1,36 @@ +# Troubleshooting Avahi + +## Resetting the cache + +Avahi keeps a cache of old results. To reset the cache, kill the daemon. It will +auto-restart. + +`sudo avahi-daemon --kill` + +## Stopping the daemon + +If you really want to stop the daemon, killing it is not sufficient because it +will just restart. To stop it completely: + +``` +sudo systemctl mask avahi-daemon.socket +sudo systemctl disable avahi-daemon +sudo systemctl stop avahi-daemon +``` + +## Problem: Failed to create avahi group: Not permitted + +Avahi is not set up to publish records by default. This has to be explicitly +allowed in the config file. In /etc/avahi/avahi-daemon.conf, add the following +lines: + +``` +[publish] +disable-user-service-publishing=no +``` + +Then restart the daemon + +``` +sudo systemctl restart avahi +``` diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 6bc0884da2e69e..cdfba66a341c61 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -235,15 +235,24 @@ server cluster BinaryInputBasic = 15 { } server cluster Binding = 30 { - struct BindingEntry { + readonly global attribute int16u clusterRevision = 65533; + + request struct BindRequest { NODE_ID nodeId = 0; GROUP_ID groupId = 1; ENDPOINT_NO endpointId = 2; CLUSTER_ID clusterId = 3; } - attribute BindingEntry bindingList[] = 0; - readonly global attribute int16u clusterRevision = 65533; + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; } server cluster BooleanState = 69 { @@ -380,9 +389,9 @@ server cluster Channel = 1284 { struct ChannelInfo { INT16U majorNumber = 0; INT16U minorNumber = 1; - CHAR_STRING<32> name = 2; - CHAR_STRING<32> callSign = 3; - CHAR_STRING<32> affiliateCallSign = 4; + optional CHAR_STRING<32> name = 2; + optional CHAR_STRING<32> callSign = 3; + optional CHAR_STRING<32> affiliateCallSign = 4; } readonly attribute ChannelInfo channelList[] = 0; @@ -719,7 +728,7 @@ server cluster ContentLauncher = 1290 { struct Parameter { ParameterEnum type = 0; CHAR_STRING value = 1; - AdditionalInfo externalIDList[] = 2; + optional AdditionalInfo externalIDList[] = 2; } struct AdditionalInfo { @@ -729,17 +738,17 @@ server cluster ContentLauncher = 1290 { struct BrandingInformation { CHAR_STRING providerName = 0; - StyleInformation background = 1; - StyleInformation logo = 2; - StyleInformation progressBar = 3; - StyleInformation splash = 4; - StyleInformation waterMark = 5; + optional StyleInformation background = 1; + optional StyleInformation logo = 2; + optional StyleInformation progressBar = 3; + optional StyleInformation splash = 4; + optional StyleInformation waterMark = 5; } struct StyleInformation { - CHAR_STRING imageUrl = 0; - CHAR_STRING color = 1; - Dimension size = 2; + optional CHAR_STRING imageUrl = 0; + optional CHAR_STRING color = 1; + optional Dimension size = 2; } struct Dimension { @@ -1985,11 +1994,11 @@ server cluster MediaPlayback = 1286 { } readonly attribute PlaybackStateEnum playbackState = 0; - readonly attribute epoch_us startTime = 1; - readonly attribute int64u duration = 2; + readonly attribute nullable epoch_us startTime = 1; + readonly attribute nullable int64u duration = 2; readonly attribute single playbackSpeed = 4; - readonly attribute int64u seekRangeEnd = 5; - readonly attribute int64u seekRangeStart = 6; + readonly attribute nullable int64u seekRangeEnd = 5; + readonly attribute nullable int64u seekRangeStart = 6; readonly global attribute int16u clusterRevision = 65533; } diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 1e5e0e28d6477c..b7d934aab2759d 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -877,7 +877,24 @@ "define": "BINDING_CLUSTER", "side": "client", "enabled": 0, - "commands": [], + "commands": [ + { + "name": "Bind", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Unbind", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], "attributes": [ { "name": "ClusterRevision", @@ -905,21 +922,6 @@ "enabled": 1, "commands": [], "attributes": [ - { - "name": "binding list", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, @@ -8704,7 +8706,24 @@ "define": "BINDING_CLUSTER", "side": "client", "enabled": 0, - "commands": [], + "commands": [ + { + "name": "Bind", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Unbind", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], "attributes": [ { "name": "ClusterRevision", @@ -8732,21 +8751,6 @@ "enabled": 1, "commands": [], "attributes": [ - { - "name": "binding list", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, @@ -21099,4 +21103,4 @@ "deviceIdentifier": 256 } ] -} +} \ No newline at end of file diff --git a/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp index 3b2e3a3391463f..af3b4763054ef0 100644 --- a/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp @@ -37,7 +37,7 @@ class BridgedActionsAttrAccess : public AttributeAccessInterface // Register for the Bridged Actions cluster on all endpoints. BridgedActionsAttrAccess() : AttributeAccessInterface(Optional::Missing(), BridgedActions::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; private: static constexpr uint16_t ClusterRevision = 1; @@ -75,8 +75,7 @@ CHIP_ERROR BridgedActionsAttrAccess::ReadClusterRevision(EndpointId endpoint, At BridgedActionsAttrAccess gAttrAccess; -CHIP_ERROR BridgedActionsAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR BridgedActionsAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { VerifyOrDie(aPath.mClusterId == BridgedActions::Id); diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index a50444821800a6..86c6fd10d8d3b2 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -540,6 +540,12 @@ void SetupPretendDevices() AddCluster("Humidity Sensor"); AddAttribute("MeasuredValue", "30"); app::Clusters::RelativeHumidityMeasurement::Attributes::MeasuredValue::Set(1, static_cast(30 * 100)); + + AddDevice("Light Sensor"); + AddEndpoint("External"); + AddCluster("Illuminance Measurement"); + AddAttribute("MeasuredValue", "1000"); + app::Clusters::IlluminanceMeasurement::Attributes::MeasuredValue::Set(1, static_cast(1000)); } WiFiWidget pairingWindowLED; diff --git a/examples/all-clusters-app/p6/src/main.cpp b/examples/all-clusters-app/p6/src/main.cpp index a943c132dc3620..a8f415ffa3744d 100644 --- a/examples/all-clusters-app/p6/src/main.cpp +++ b/examples/all-clusters-app/p6/src/main.cpp @@ -41,12 +41,16 @@ #ifdef HEAP_MONITORING #include "MemMonitoring.h" #endif +#define MAIN_TASK_STACK_SIZE (4096) +#define MAIN_TASK_PRIORITY 2 using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::DeviceLayer; volatile int apperror_cnt; +static void main_task(void * pvParameters); + // ================================================================================ // App Error //================================================================================= @@ -71,24 +75,17 @@ extern "C" void vApplicationIdleHook(void) // FreeRTOS Idle callback } -// ================================================================================ -// Main Code -// ================================================================================ -int main(void) +extern "C" void vApplicationDaemonTaskStartupHook() { - init_p6Platform(); - -#ifdef HEAP_MONITORING - MemMonitoring::startHeapMonitoring(); -#endif - - P6_LOG("==================================================\r\n"); - P6_LOG("chip-p6-all-clusters-example starting\r\n"); - P6_LOG("==================================================\r\n"); - // Init Chip memory management before the stack chip::Platform::MemoryInit(); + /* Create the Main task. */ + xTaskCreate(main_task, "Main task", MAIN_TASK_STACK_SIZE, NULL, MAIN_TASK_PRIORITY, NULL); +} + +static void main_task(void * pvParameters) +{ CHIP_ERROR ret = chip::DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init(); if (ret != CHIP_NO_ERROR) { @@ -123,6 +120,26 @@ int main(void) P6_LOG("GetAppTask().Init() failed"); appError(ret); } + + /* Delete task */ + vTaskDelete(NULL); +} + +// ================================================================================ +// Main Code +// ================================================================================ +int main(void) +{ + init_p6Platform(); + +#ifdef HEAP_MONITORING + MemMonitoring::startHeapMonitoring(); +#endif + + P6_LOG("==================================================\r\n"); + P6_LOG("chip-p6-all-clusters-example starting\r\n"); + P6_LOG("==================================================\r\n"); + /* Start the FreeRTOS scheduler */ vTaskStartScheduler(); @@ -132,5 +149,4 @@ int main(void) // Should never get here. P6_LOG("vTaskStartScheduler() failed"); - appError(ret); } diff --git a/examples/bridge-app/esp32/main/CMakeLists.txt b/examples/bridge-app/esp32/main/CMakeLists.txt index f0fdad26397bee..0dee0976538a1a 100644 --- a/examples/bridge-app/esp32/main/CMakeLists.txt +++ b/examples/bridge-app/esp32/main/CMakeLists.txt @@ -43,6 +43,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/group-key-mgmt-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning-old" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/on-off-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server" diff --git a/examples/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp index d12a81b2c10ed8..f6dbb77c9dd217 100644 --- a/examples/bridge-app/esp32/main/main.cpp +++ b/examples/bridge-app/esp32/main/main.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -30,6 +31,7 @@ #include #include #include +#include #include @@ -43,6 +45,11 @@ using namespace ::chip::Platform; static DeviceCallbacks AppCallback; +namespace { +app::Clusters::NetworkCommissioning::Instance + sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::ESPWiFiDriver::GetInstance())); +} // namespace + static const int kNodeLabelSize = 32; // Current ZCL implementation of Struct uses a max-size array of 254 bytes static const int kDescriptorAttributeArraySize = 254; @@ -368,6 +375,8 @@ static void InitServer(intptr_t context) // Initialize device attestation config SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + sWiFiNetworkCommissioningInstance.Init(); + // Set starting endpoint id where dynamic endpoints will be assigned, which // will be the next consecutive endpoint id after the last fixed endpoint. gFirstDynamicEndpointId = static_cast( diff --git a/examples/chip-tool/commands/clusters/ComplexArgument.h b/examples/chip-tool/commands/clusters/ComplexArgument.h index fd06b458f69ce5..07b5b871784c85 100644 --- a/examples/chip-tool/commands/clusters/ComplexArgument.h +++ b/examples/chip-tool/commands/clusters/ComplexArgument.h @@ -205,14 +205,14 @@ class ComplexArgumentParser return CHIP_NO_ERROR; } - static CHIP_ERROR EnsureMemberExist(const char * label, bool hasMember) + static CHIP_ERROR EnsureMemberExist(const char * label, const char * memberName, bool hasMember) { if (hasMember) { return CHIP_NO_ERROR; } - ChipLogError(chipTool, "%s is required.", label); + ChipLogError(chipTool, "%s is required. Should be provided as {\"%s\": value}", label, memberName); return CHIP_ERROR_INVALID_ARGUMENT; } diff --git a/examples/chip-tool/templates/ComplexArgumentParser-src.zapt b/examples/chip-tool/templates/ComplexArgumentParser-src.zapt index c9fc765aa48122..dbc62bf3024ca9 100644 --- a/examples/chip-tool/templates/ComplexArgumentParser-src.zapt +++ b/examples/chip-tool/templates/ComplexArgumentParser-src.zapt @@ -9,7 +9,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, {{zapTypeToEncodable {{#zcl_struct_items}} {{#unless isOptional}} - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("{{parent.name}}.{{asLowerCamelCase label}}", value.isMember("{{asLowerCamelCase label}}"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("{{parent.name}}.{{asLowerCamelCase label}}", "{{asLowerCamelCase label}}", value.isMember("{{asLowerCamelCase label}}"))); {{/unless}} {{/zcl_struct_items}} diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index f586034eae2f6c..aaf72e6e311630 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -143,6 +143,23 @@ server cluster Basic = 40 { server cluster Binding = 30 { readonly global attribute int16u clusterRevision = 65533; + + request struct BindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; } client cluster ColorControl = 768 { diff --git a/examples/lighting-app/ameba/main/chipinterface.cpp b/examples/lighting-app/ameba/main/chipinterface.cpp index 32b3e82cf0c6d8..2665040b47c0e2 100644 --- a/examples/lighting-app/ameba/main/chipinterface.cpp +++ b/examples/lighting-app/ameba/main/chipinterface.cpp @@ -30,9 +30,12 @@ #include #include +#include #include #include #include +#include +#include #include #include @@ -51,6 +54,16 @@ using namespace ::chip::DeviceManager; using namespace ::chip::DeviceLayer; using namespace ::chip::System; +namespace { +app::Clusters::NetworkCommissioning::Instance + sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::AmebaWiFiDriver::GetInstance())); +} // namespace + +void NetWorkCommissioningInstInit() +{ + sWiFiNetworkCommissioningInstance.Init(); +} + #ifdef CONFIG_PLATFORM_8721D #define STATUS_LED_GPIO_NUM PB_5 #elif defined(CONFIG_PLATFORM_8710C) @@ -147,31 +160,34 @@ static Identify gIdentify1 = { extern "C" void ChipTest(void) { - printf("In ChipTest()\r\n"); + ChipLogProgress(DeviceLayer, "Lighting App Demo!"); CHIP_ERROR err = CHIP_NO_ERROR; - printf("initPrefr\n"); initPref(); CHIPDeviceManager & deviceMgr = CHIPDeviceManager::GetInstance(); - err = deviceMgr.Init(&EchoCallbacks); + err = deviceMgr.Init(&EchoCallbacks); if (err != CHIP_NO_ERROR) { - printf("DeviceManagerInit() - ERROR!\r\n"); + ChipLogError(DeviceLayer, "DeviceManagerInit() - ERROR!\r\n"); } else { - printf("DeviceManagerInit() - OK\r\n"); + ChipLogProgress(DeviceLayer, "DeviceManagerInit() - OK\r\n"); } chip::Server::GetInstance().Init(); // Initialize device attestation config SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + NetWorkCommissioningInstInit(); - // QR code will be used with CHIP Tool - PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); + if (RTW_SUCCESS != wifi_is_connected_to_ap()) + { + // QR code will be used with CHIP Tool + PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); + } statusLED1.Init(STATUS_LED_GPIO_NUM); diff --git a/examples/lighting-app/esp32/main/CMakeLists.txt b/examples/lighting-app/esp32/main/CMakeLists.txt index edbb28466a368c..f928ea2d243aed 100644 --- a/examples/lighting-app/esp32/main/CMakeLists.txt +++ b/examples/lighting-app/esp32/main/CMakeLists.txt @@ -47,6 +47,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-format-localization-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/level-control" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning-old" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/on-off-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server" diff --git a/examples/lighting-app/esp32/main/main.cpp b/examples/lighting-app/esp32/main/main.cpp index c3114e04c2b363..f08024dd7b22ba 100644 --- a/examples/lighting-app/esp32/main/main.cpp +++ b/examples/lighting-app/esp32/main/main.cpp @@ -26,12 +26,14 @@ #include "freertos/task.h" #include "nvs_flash.h" #include "shell_extension/launch.h" +#include #include #include #include #include #include #include +#include #include #include @@ -53,6 +55,11 @@ static const char * TAG = "light-app"; static DeviceCallbacks EchoCallbacks; +namespace { +app::Clusters::NetworkCommissioning::Instance + sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::ESPWiFiDriver::GetInstance())); +} // namespace + static void InitOTARequestor(void) { #if CONFIG_ENABLE_OTA_REQUESTOR @@ -73,6 +80,8 @@ static void InitServer(intptr_t context) // Initialize device attestation config SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + + sWiFiNetworkCommissioningInstance.Init(); } extern "C" void app_main() diff --git a/examples/lighting-app/nrfconnect/prj.conf b/examples/lighting-app/nrfconnect/prj.conf index bc0052bbb7bc28..e88e52d6b50fca 100644 --- a/examples/lighting-app/nrfconnect/prj.conf +++ b/examples/lighting-app/nrfconnect/prj.conf @@ -37,6 +37,8 @@ CONFIG_MPU_STACK_GUARD=y # CHIP configuration CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h" +# 20044 == 0x4E4C - "[N]ordic [L]ight" +CONFIG_CHIP_DEVICE_PRODUCT_ID=20044 # Enable CHIP pairing automatically on application start. CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y diff --git a/examples/lighting-app/p6/src/main.cpp b/examples/lighting-app/p6/src/main.cpp index 7d493daff2a25e..a38d25811c2e1e 100644 --- a/examples/lighting-app/p6/src/main.cpp +++ b/examples/lighting-app/p6/src/main.cpp @@ -40,12 +40,16 @@ #ifdef HEAP_MONITORING #include "MemMonitoring.h" #endif +#define MAIN_TASK_STACK_SIZE (4096) +#define MAIN_TASK_PRIORITY 2 using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::DeviceLayer; volatile int apperror_cnt; +static void main_task(void * pvParameters); + // ================================================================================ // App Error //================================================================================= @@ -70,24 +74,17 @@ extern "C" void vApplicationIdleHook(void) // FreeRTOS Idle callback } -// ================================================================================ -// Main Code -// ================================================================================ -int main(void) +extern "C" void vApplicationDaemonTaskStartupHook() { - init_p6Platform(); - -#ifdef HEAP_MONITORING - MemMonitoring::startHeapMonitoring(); -#endif - - P6_LOG("==================================================\r\n"); - P6_LOG("chip-p6-lighting-example starting\r\n"); - P6_LOG("==================================================\r\n"); - // Init Chip memory management before the stack chip::Platform::MemoryInit(); + /* Create the Main task. */ + xTaskCreate(main_task, "Main task", MAIN_TASK_STACK_SIZE, NULL, MAIN_TASK_PRIORITY, NULL); +} + +static void main_task(void * pvParameters) +{ CHIP_ERROR ret = chip::DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init(); if (ret != CHIP_NO_ERROR) { @@ -115,6 +112,26 @@ int main(void) P6_LOG("GetAppTask().Init() failed"); appError(ret); } + + /* Delete task */ + vTaskDelete(NULL); +} + +// ================================================================================ +// Main Code +// ================================================================================ +int main(void) +{ + init_p6Platform(); + +#ifdef HEAP_MONITORING + MemMonitoring::startHeapMonitoring(); +#endif + + P6_LOG("==================================================\r\n"); + P6_LOG("chip-p6-lighting-example starting\r\n"); + P6_LOG("==================================================\r\n"); + /* Start the FreeRTOS scheduler */ vTaskStartScheduler(); @@ -124,5 +141,4 @@ int main(void) // Should never get here. P6_LOG("vTaskStartScheduler() failed"); - appError(ret); } diff --git a/examples/lock-app/esp32/main/main.cpp b/examples/lock-app/esp32/main/main.cpp index 812fd46b952b8a..1a9cfb6424ef78 100644 --- a/examples/lock-app/esp32/main/main.cpp +++ b/examples/lock-app/esp32/main/main.cpp @@ -28,7 +28,9 @@ #include "freertos/task.h" #include "nvs_flash.h" #include "shell_extension/launch.h" +#include #include +#include #include #include @@ -54,6 +56,11 @@ static const char * TAG = "lock-app"; static DeviceCallbacks EchoCallbacks; +namespace { +app::Clusters::NetworkCommissioning::Instance + sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::ESPWiFiDriver::GetInstance())); +} // namespace + static void InitServer(intptr_t context) { chip::Server::GetInstance().Init(); @@ -61,6 +68,8 @@ static void InitServer(intptr_t context) // Initialize device attestation config SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + sWiFiNetworkCommissioningInstance.Init(); + ESP_LOGI(TAG, "------------------------Starting App Task---------------------------"); CHIP_ERROR error = GetAppTask().StartAppTask(); if (error != CHIP_NO_ERROR) diff --git a/examples/lock-app/p6/src/main.cpp b/examples/lock-app/p6/src/main.cpp index aceba9a2183528..9c213eeb8137fa 100644 --- a/examples/lock-app/p6/src/main.cpp +++ b/examples/lock-app/p6/src/main.cpp @@ -37,11 +37,16 @@ #include "init_p6Platform.h" #include +#define MAIN_TASK_STACK_SIZE (4096) +#define MAIN_TASK_PRIORITY 2 + using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::DeviceLayer; volatile int apperror_cnt; +static void main_task(void * pvParameters); + // ================================================================================ // App Error //================================================================================= @@ -66,20 +71,17 @@ extern "C" void vApplicationIdleHook(void) // FreeRTOS Idle callback } -// ================================================================================ -// Main Code -// ================================================================================ -int main(void) +extern "C" void vApplicationDaemonTaskStartupHook() { - init_p6Platform(); - - P6_LOG("==================================================\r\n"); - P6_LOG("chip-p6-lock-example starting\r\n"); - P6_LOG("==================================================\r\n"); - // Init Chip memory management before the stack chip::Platform::MemoryInit(); + /* Create the Main task. */ + xTaskCreate(main_task, "Main task", MAIN_TASK_STACK_SIZE, NULL, MAIN_TASK_PRIORITY, NULL); +} + +static void main_task(void * pvParameters) +{ CHIP_ERROR ret = chip::DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init(); if (ret != CHIP_NO_ERROR) { @@ -107,6 +109,22 @@ int main(void) P6_LOG("GetAppTask().Init() failed"); appError(ret); } + + /* Delete task */ + vTaskDelete(NULL); +} + +// ================================================================================ +// Main Code +// ================================================================================ +int main(void) +{ + init_p6Platform(); + + P6_LOG("==================================================\r\n"); + P6_LOG("chip-p6-lock-example starting\r\n"); + P6_LOG("==================================================\r\n"); + /* Start the FreeRTOS scheduler */ vTaskStartScheduler(); @@ -116,5 +134,4 @@ int main(void) // Should never get here. P6_LOG("vTaskStartScheduler() failed"); - appError(ret); } diff --git a/examples/ota-provider-app/esp32/main/CMakeLists.txt b/examples/ota-provider-app/esp32/main/CMakeLists.txt index 11e93389296a10..4b7fdf20a263cf 100644 --- a/examples/ota-provider-app/esp32/main/CMakeLists.txt +++ b/examples/ota-provider-app/esp32/main/CMakeLists.txt @@ -47,6 +47,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/group-key-mgmt-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning-old" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-provider" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/ota-provider-app/ota-provider-common" diff --git a/examples/ota-provider-app/esp32/main/main.cpp b/examples/ota-provider-app/esp32/main/main.cpp index 7c5ea0aa337e93..6d836cfa0b709d 100644 --- a/examples/ota-provider-app/esp32/main/main.cpp +++ b/examples/ota-provider-app/esp32/main/main.cpp @@ -21,11 +21,13 @@ #include "esp_spi_flash.h" #include "esp_spiffs.h" #include "nvs_flash.h" +#include #include #include #include #include #include +#include #include #include @@ -61,6 +63,20 @@ static OTAProviderExample otaProvider; chip::Callback::Callback onBlockQueryCallback(OnBlockQuery, nullptr); chip::Callback::Callback onTransferCompleteCallback(OnTransferComplete, nullptr); chip::Callback::Callback onTransferFailedCallback(OnTransferFailed, nullptr); + +app::Clusters::NetworkCommissioning::Instance + sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::ESPWiFiDriver::GetInstance())); + +static void InitServer(intptr_t context) +{ + chip::Server::GetInstance().Init(); + + // Initialize device attestation config + SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + + sWiFiNetworkCommissioningInstance.Init(); +} + } // namespace CHIP_ERROR OnBlockQuery(void * context, chip::System::PacketBufferHandle & blockBuf, size_t & size, bool & isEof, uint32_t offset) @@ -136,10 +152,7 @@ extern "C" void app_main() return; } - chip::Server::GetInstance().Init(); - - // Initialize device attestation config - SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, reinterpret_cast(nullptr)); BdxOtaSender * bdxOtaSender = otaProvider.GetBdxOtaSender(); VerifyOrReturn(bdxOtaSender != nullptr, ESP_LOGE(TAG, "bdxOtaSender is nullptr")); diff --git a/examples/ota-requestor-app/ameba/main/chipinterface.cpp b/examples/ota-requestor-app/ameba/main/chipinterface.cpp index bdff13a45b0ee1..d028fbcf3fdcb4 100644 --- a/examples/ota-requestor-app/ameba/main/chipinterface.cpp +++ b/examples/ota-requestor-app/ameba/main/chipinterface.cpp @@ -21,11 +21,14 @@ #include "DeviceCallbacks.h" #include "chip_porting.h" +#include #include #include #include + #include #include +#include #include #include @@ -62,6 +65,16 @@ using namespace ::chip::Credentials; using namespace ::chip::DeviceManager; using namespace ::chip::DeviceLayer; +namespace { +app::Clusters::NetworkCommissioning::Instance + sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::AmebaWiFiDriver::GetInstance())); +} // namespace + +void NetWorkCommissioningInstInit() +{ + sWiFiNetworkCommissioningInstance.Init(); +} + static DeviceCallbacks EchoCallbacks; OTARequestor gRequestorCore; @@ -130,6 +143,7 @@ extern "C" void ChipTest(void) // Initialize device attestation config SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + NetWorkCommissioningInstInit(); InitOTARequestor(); diff --git a/examples/ota-requestor-app/esp32/main/CMakeLists.txt b/examples/ota-requestor-app/esp32/main/CMakeLists.txt index d6fc50cc130e89..e634ab659eca5c 100644 --- a/examples/ota-requestor-app/esp32/main/CMakeLists.txt +++ b/examples/ota-requestor-app/esp32/main/CMakeLists.txt @@ -47,6 +47,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/group-key-mgmt-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning-old" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-requestor" PRIV_REQUIRES chip QRCode bt console app_update) diff --git a/examples/ota-requestor-app/esp32/main/main.cpp b/examples/ota-requestor-app/esp32/main/main.cpp index 06084e7994a004..06a791874bbb3f 100644 --- a/examples/ota-requestor-app/esp32/main/main.cpp +++ b/examples/ota-requestor-app/esp32/main/main.cpp @@ -28,9 +28,11 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "nvs_flash.h" +#include #include #include #include +#include #include #include @@ -55,6 +57,20 @@ OTARequestor gRequestorCore; GenericOTARequestorDriver gRequestorUser; BDXDownloader gDownloader; OTAImageProcessorImpl gImageProcessor; + +app::Clusters::NetworkCommissioning::Instance + sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::ESPWiFiDriver::GetInstance())); + +static void InitServer(intptr_t context) +{ + chip::Server::GetInstance().Init(); + + // Initialize device attestation config + SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + + sWiFiNetworkCommissioningInstance.Init(); +} + } // namespace extern "C" void app_main() @@ -89,10 +105,7 @@ extern "C" void app_main() return; } - chip::Server::GetInstance().Init(); - - // Initialize device attestation config - SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, reinterpret_cast(nullptr)); SetRequestorInstance(&gRequestorCore); gRequestorCore.Init(&(Server::GetInstance()), &gRequestorUser, &gDownloader); diff --git a/examples/temperature-measurement-app/esp32/main/CMakeLists.txt b/examples/temperature-measurement-app/esp32/main/CMakeLists.txt index e1affc2fa6e11b..ba5b2c41c3c89e 100644 --- a/examples/temperature-measurement-app/esp32/main/CMakeLists.txt +++ b/examples/temperature-measurement-app/esp32/main/CMakeLists.txt @@ -47,6 +47,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/group-key-mgmt-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning-old" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/route_hook" PRIV_REQUIRES chip QRCode bt) diff --git a/examples/temperature-measurement-app/esp32/main/main.cpp b/examples/temperature-measurement-app/esp32/main/main.cpp index 146dcab7e527bd..c35d4f13b2941d 100644 --- a/examples/temperature-measurement-app/esp32/main/main.cpp +++ b/examples/temperature-measurement-app/esp32/main/main.cpp @@ -33,8 +33,10 @@ #include #include +#include #include #include +#include #include @@ -47,6 +49,19 @@ const char * TAG = "temperature-measurement-app"; static DeviceCallbacks EchoCallbacks; +namespace { + +app::Clusters::NetworkCommissioning::Instance + sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::ESPWiFiDriver::GetInstance())); + +static void InitServer(intptr_t context) +{ + chip::Server::GetInstance().Init(); + sWiFiNetworkCommissioningInstance.Init(); +} + +} // namespace + extern "C" void app_main() { ESP_LOGI(TAG, "Temperature sensor!"); @@ -80,7 +95,7 @@ extern "C" void app_main() return; } - chip::Server::GetInstance().Init(); + chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, reinterpret_cast(nullptr)); // Initialize device attestation config SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index c2220cca08caa8..5cd74fd6e15500 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -142,15 +142,24 @@ server cluster Basic = 40 { } server cluster Binding = 30 { - struct BindingEntry { + readonly global attribute int16u clusterRevision = 65533; + + request struct BindRequest { NODE_ID nodeId = 0; GROUP_ID groupId = 1; ENDPOINT_NO endpointId = 2; CLUSTER_ID clusterId = 3; } - attribute BindingEntry bindingList[] = 0; - readonly global attribute int16u clusterRevision = 65533; + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; } server cluster Descriptor = 29 { diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index bb65191df516ee..b44dca42e2df12 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -854,7 +854,24 @@ "define": "BINDING_CLUSTER", "side": "client", "enabled": 0, - "commands": [], + "commands": [ + { + "name": "Bind", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Unbind", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], "attributes": [ { "name": "ClusterRevision", @@ -882,21 +899,6 @@ "enabled": 1, "commands": [], "attributes": [ - { - "name": "binding list", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, @@ -8156,7 +8158,24 @@ "define": "BINDING_CLUSTER", "side": "client", "enabled": 0, - "commands": [], + "commands": [ + { + "name": "Bind", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Unbind", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], "attributes": [ { "name": "ClusterRevision", @@ -8184,21 +8203,6 @@ "enabled": 0, "commands": [], "attributes": [ - { - "name": "binding list", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp b/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp index 9f04faa15c9ff1..5b8a0ad46d2109 100644 --- a/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp +++ b/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp @@ -47,7 +47,7 @@ void TargetNavigatorManager::HandleNavigateTarget(CommandResponseHelper(chip::CharSpan::fromCharString("data response")); response.status = chip::app::Clusters::TargetNavigator::StatusEnum::kSuccess; helper.Success(response); } diff --git a/examples/tv-app/android/java/ChannelManager.cpp b/examples/tv-app/android/java/ChannelManager.cpp index cda334cb0022a9..8322bfe5dd5252 100644 --- a/examples/tv-app/android/java/ChannelManager.cpp +++ b/examples/tv-app/android/java/ChannelManager.cpp @@ -84,7 +84,7 @@ CHIP_ERROR ChannelManager::HandleGetChannelList(AttributeValueEncoder & aEncoder if (jcallSign != NULL) { JniUtfString callsign(env, jcallSign); - channelInfo.callSign = callsign.charSpan(); + channelInfo.callSign = Optional(callsign.charSpan()); } jfieldID getNameField = env->GetFieldID(channelClass, "name", "Ljava/lang/String;"); @@ -92,7 +92,7 @@ CHIP_ERROR ChannelManager::HandleGetChannelList(AttributeValueEncoder & aEncoder if (jname != NULL) { JniUtfString name(env, jname); - channelInfo.name = name.charSpan(); + channelInfo.name = Optional(name.charSpan()); } jfieldID getJaffiliateCallSignField = env->GetFieldID(channelClass, "affiliateCallSign", "Ljava/lang/String;"); @@ -100,7 +100,7 @@ CHIP_ERROR ChannelManager::HandleGetChannelList(AttributeValueEncoder & aEncoder if (jaffiliateCallSign != NULL) { JniUtfString affiliateCallSign(env, jaffiliateCallSign); - channelInfo.affiliateCallSign = affiliateCallSign.charSpan(); + channelInfo.affiliateCallSign = Optional(affiliateCallSign.charSpan()); } jfieldID majorNumField = env->GetFieldID(channelClass, "majorNumber", "I"); @@ -154,7 +154,7 @@ CHIP_ERROR ChannelManager::HandleGetLineup(AttributeValueEncoder & aEncoder) if (jlineupName != NULL) { JniUtfString lineupName(env, jlineupName); - lineupInfo.lineupName = lineupName.charSpan(); + lineupInfo.lineupName = Optional(lineupName.charSpan()); } jfieldID postalCodeFild = env->GetFieldID(channelLineupClazz, "postalCode", "Ljava/lang/String;"); @@ -162,7 +162,7 @@ CHIP_ERROR ChannelManager::HandleGetLineup(AttributeValueEncoder & aEncoder) if (jpostalCode != NULL) { JniUtfString postalCode(env, jpostalCode); - lineupInfo.postalCode = postalCode.charSpan(); + lineupInfo.postalCode = Optional(postalCode.charSpan()); } jfieldID lineupInfoTypeFild = env->GetFieldID(channelLineupClazz, "lineupInfoTypeEnum", "I"); @@ -200,7 +200,7 @@ CHIP_ERROR ChannelManager::HandleGetCurrentChannel(AttributeValueEncoder & aEnco if (jcallSign != NULL) { JniUtfString callsign(env, jcallSign); - channelInfo.callSign = callsign.charSpan(); + channelInfo.callSign = Optional(callsign.charSpan()); } jfieldID getNameField = env->GetFieldID(channelClass, "name", "Ljava/lang/String;"); @@ -208,7 +208,7 @@ CHIP_ERROR ChannelManager::HandleGetCurrentChannel(AttributeValueEncoder & aEnco if (jname != NULL) { JniUtfString name(env, jname); - channelInfo.name = name.charSpan(); + channelInfo.name = Optional(name.charSpan()); } jfieldID getJaffiliateCallSignField = env->GetFieldID(channelClass, "affiliateCallSign", "Ljava/lang/String;"); @@ -216,7 +216,7 @@ CHIP_ERROR ChannelManager::HandleGetCurrentChannel(AttributeValueEncoder & aEnco if (jaffiliateCallSign != NULL) { JniUtfString affiliateCallSign(env, jaffiliateCallSign); - channelInfo.affiliateCallSign = affiliateCallSign.charSpan(); + channelInfo.affiliateCallSign = Optional(affiliateCallSign.charSpan()); } jfieldID majorNumField = env->GetFieldID(channelClass, "majorNumber", "I"); @@ -276,7 +276,7 @@ void ChannelManager::HandleChangeChannel(CommandResponseHelper(callsign.charSpan()); } jfieldID getNameField = env->GetFieldID(channelClass, "name", "Ljava/lang/String;"); @@ -284,14 +284,14 @@ void ChannelManager::HandleChangeChannel(CommandResponseHelper(junitname.charSpan()); } jfieldID getJaffiliateCallSignField = env->GetFieldID(channelClass, "affiliateCallSign", "Ljava/lang/String;"); jstring jaffiliateCallSign = static_cast(env->GetObjectField(channelObject, getJaffiliateCallSignField)); if (jaffiliateCallSign != NULL) { JniUtfString affiliateCallSign(env, jaffiliateCallSign); - response.channelMatch.affiliateCallSign = affiliateCallSign.charSpan(); + response.channelMatch.affiliateCallSign = Optional(affiliateCallSign.charSpan()); } jfieldID majorNumField = env->GetFieldID(channelClass, "majorNumber", "I"); diff --git a/examples/tv-app/android/java/ContentLauncherManager.cpp b/examples/tv-app/android/java/ContentLauncherManager.cpp index 8a79df7ea32ffb..3537e723195f47 100644 --- a/examples/tv-app/android/java/ContentLauncherManager.cpp +++ b/examples/tv-app/android/java/ContentLauncherManager.cpp @@ -85,7 +85,7 @@ void ContentLauncherManager::HandleLaunchContent(CommandResponseHelper(status); - response.data = dataStr.charSpan(); + response.data = chip::Optional(dataStr.charSpan()); err = helper.Success(response); } @@ -140,7 +140,7 @@ void ContentLauncherManager::HandleLaunchUrl(CommandResponseHelper(status); - response.data = dataStr.charSpan(); + response.data = chip::Optional(dataStr.charSpan()); err = helper.Success(response); } diff --git a/examples/tv-app/android/java/MediaPlaybackManager.cpp b/examples/tv-app/android/java/MediaPlaybackManager.cpp index a4201452d0e578..75b24fb2a026ab 100644 --- a/examples/tv-app/android/java/MediaPlaybackManager.cpp +++ b/examples/tv-app/android/java/MediaPlaybackManager.cpp @@ -28,6 +28,7 @@ using namespace chip; using namespace chip::app; +using namespace chip::app::DataModel; using namespace chip::app::Clusters::MediaPlayback; /** @brief Media PlayBack Cluster Init @@ -258,7 +259,7 @@ CHIP_ERROR MediaPlaybackManager::HandleGetSampledPosition(AttributeValueEncoder { Structs::PlaybackPosition::Type response; response.updatedAt = 0; - response.position = 0; + response.position = Nullable(0); jobject positionObj; CHIP_ERROR err = CHIP_NO_ERROR; @@ -283,7 +284,7 @@ CHIP_ERROR MediaPlaybackManager::HandleGetSampledPosition(AttributeValueEncoder jclass inputClass = env->GetObjectClass(positionObj); jfieldID positionId = env->GetFieldID(inputClass, "position", "J"); jfieldID updatedAtId = env->GetFieldID(inputClass, "updatedAt", "J"); - response.position = static_cast(env->GetIntField(positionObj, positionId)); + response.position = Nullable(static_cast(env->GetIntField(positionObj, positionId))); response.updatedAt = static_cast(env->GetIntField(positionObj, updatedAtId)); } diff --git a/examples/tv-app/linux/include/channel/ChannelManager.cpp b/examples/tv-app/linux/include/channel/ChannelManager.cpp index 6fc84cb2e71a58..66e5d4a972b8a1 100644 --- a/examples/tv-app/linux/include/channel/ChannelManager.cpp +++ b/examples/tv-app/linux/include/channel/ChannelManager.cpp @@ -30,9 +30,9 @@ CHIP_ERROR ChannelManager::HandleGetChannelList(AttributeValueEncoder & aEncoder for (int i = 0; i < maximumVectorSize; ++i) { chip::app::Clusters::Channel::Structs::ChannelInfo::Type channelInfo; - channelInfo.affiliateCallSign = chip::CharSpan::fromCharString("exampleASign"); - channelInfo.callSign = chip::CharSpan::fromCharString("exampleCSign"); - channelInfo.name = chip::CharSpan::fromCharString("exampleName"); + channelInfo.affiliateCallSign = Optional(chip::CharSpan::fromCharString("exampleASign")); + channelInfo.callSign = Optional(chip::CharSpan::fromCharString("exampleCSign")); + channelInfo.name = Optional(chip::CharSpan::fromCharString("exampleName")); channelInfo.majorNumber = static_cast(1 + i); channelInfo.minorNumber = static_cast(2 + i); @@ -47,8 +47,8 @@ CHIP_ERROR ChannelManager::HandleGetLineup(AttributeValueEncoder & aEncoder) { chip::app::Clusters::Channel::Structs::LineupInfo::Type lineup; lineup.operatorName = chip::CharSpan::fromCharString("operatorName"); - lineup.lineupName = chip::CharSpan::fromCharString("lineupName"); - lineup.postalCode = chip::CharSpan::fromCharString("postalCode"); + lineup.lineupName = Optional(chip::CharSpan::fromCharString("lineupName")); + lineup.postalCode = Optional(chip::CharSpan::fromCharString("postalCode")); lineup.lineupInfoType = chip::app::Clusters::Channel::LineupInfoTypeEnum::kMso; return aEncoder.Encode(lineup); @@ -57,9 +57,9 @@ CHIP_ERROR ChannelManager::HandleGetLineup(AttributeValueEncoder & aEncoder) CHIP_ERROR ChannelManager::HandleGetCurrentChannel(AttributeValueEncoder & aEncoder) { chip::app::Clusters::Channel::Structs::ChannelInfo::Type currentChannel; - currentChannel.affiliateCallSign = chip::CharSpan::fromCharString("exampleASign"); - currentChannel.callSign = chip::CharSpan::fromCharString("exampleCSign"); - currentChannel.name = chip::CharSpan::fromCharString("exampleName"); + currentChannel.affiliateCallSign = Optional(chip::CharSpan::fromCharString("exampleASign")); + currentChannel.callSign = Optional(chip::CharSpan::fromCharString("exampleCSign")); + currentChannel.name = Optional(chip::CharSpan::fromCharString("exampleName")); currentChannel.majorNumber = 1; currentChannel.minorNumber = 0; @@ -71,9 +71,9 @@ void ChannelManager::HandleChangeChannel(CommandResponseHelper(chip::CharSpan::fromCharString("name")); + response.channelMatch.callSign = Optional(chip::CharSpan::fromCharString("callSign")); + response.channelMatch.affiliateCallSign = Optional(chip::CharSpan::fromCharString("affiliateCallSign")); response.errorType = chip::app::Clusters::Channel::ErrorTypeEnum::kMultipleMatches; helper.Success(response); diff --git a/examples/tv-app/linux/include/cluster-init.cpp b/examples/tv-app/linux/include/cluster-init.cpp index 601388e1b8b2b3..bbb889d264404d 100644 --- a/examples/tv-app/linux/include/cluster-init.cpp +++ b/examples/tv-app/linux/include/cluster-init.cpp @@ -42,8 +42,7 @@ class TvAttrAccess : public app::AttributeAccessInterface public: TvAttrAccess() : app::AttributeAccessInterface(Optional::Missing(), AttrTypeInfo::GetClusterId()) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) override + CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override { if (aPath.mAttributeId == AttrTypeInfo::GetAttributeId()) { diff --git a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp index 4194a6c9d24f37..82b3b76b6fc7df 100644 --- a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp +++ b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp @@ -37,7 +37,7 @@ void ContentLauncherManager::HandleLaunchContent(CommandResponseHelper(CharSpan::fromCharString("exampleData")); response.status = ContentLauncher::StatusEnum::kSuccess; helper.Success(response); } @@ -52,7 +52,7 @@ void ContentLauncherManager::HandleLaunchUrl(CommandResponseHelper(CharSpan::fromCharString("exampleData")); response.status = ContentLauncher::StatusEnum::kSuccess; helper.Success(response); } diff --git a/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.cpp b/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.cpp index 23a89c4aaebdfe..edea209376fa0b 100644 --- a/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.cpp +++ b/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.cpp @@ -18,6 +18,7 @@ #include "MediaPlaybackManager.h" using namespace std; +using namespace chip::app::DataModel; using namespace chip::app::Clusters::MediaPlayback; PlaybackStateEnum MediaPlaybackManager::HandleGetCurrentState() @@ -39,7 +40,7 @@ CHIP_ERROR MediaPlaybackManager::HandleGetSampledPosition(AttributeValueEncoder { Structs::PlaybackPosition::Type sampledPosition; sampledPosition.updatedAt = 0; - sampledPosition.position = 0; + sampledPosition.position = Nullable(0); return aEncoder.Encode(sampledPosition); } diff --git a/examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.cpp b/examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.cpp index 99dd5a40239933..a3236c7228ddfe 100644 --- a/examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.cpp +++ b/examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.cpp @@ -55,14 +55,14 @@ void TargetNavigatorManager::HandleNavigateTarget(CommandResponseHelper mTargets.size()) { - response.data = CharSpan::fromCharString("error"); + response.data = chip::Optional(CharSpan::fromCharString("error")); response.status = StatusEnum::kTargetNotFound; helper.Success(response); return; } mCurrentTarget = static_cast(target); - response.data = CharSpan::fromCharString("data response"); + response.data = chip::Optional(CharSpan::fromCharString("data response")); response.status = StatusEnum::kSuccess; helper.Success(response); } diff --git a/examples/tv-app/linux/main.cpp b/examples/tv-app/linux/main.cpp index 32e0c9505f0c5f..873eb3649de35b 100644 --- a/examples/tv-app/linux/main.cpp +++ b/examples/tv-app/linux/main.cpp @@ -135,7 +135,7 @@ class MyPostCommissioningListener : public PostCommissioningListener } /* Callback when command results in success */ - static void OnSuccessResponse(void * context) + static void OnSuccessResponse(void * context, const chip::app::DataModel::NullObjectType &) { ChipLogProgress(Controller, "OnSuccessResponse - Binding Add Successfully"); CommissionerDiscoveryController * cdc = GetCommissionerDiscoveryController(); diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 1d30f9b2e613fc..a7a071df4d6097 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -167,7 +167,7 @@ server cluster ApplicationLauncher = 1292 { struct ApplicationEP { Application application = 0; - CHAR_STRING endpoint = 1; + optional ENDPOINT_NO endpoint = 1; } struct Application { @@ -176,7 +176,7 @@ server cluster ApplicationLauncher = 1292 { } readonly attribute INT16U applicationLauncherList[] = 0; - attribute ApplicationEP applicationLauncherApp = 1; + attribute nullable ApplicationEP applicationLauncherApp = 1; readonly global attribute int16u clusterRevision = 65533; request struct HideAppRequestRequest { @@ -185,7 +185,7 @@ server cluster ApplicationLauncher = 1292 { request struct LaunchAppRequestRequest { Application application = 0; - OCTET_STRING data = 1; + optional OCTET_STRING data = 1; } request struct StopAppRequestRequest { @@ -277,27 +277,45 @@ server cluster Basic = 40 { } client cluster Binding = 30 { - struct BindingEntry { + readonly global attribute int16u clusterRevision = 65533; + + request struct BindRequest { NODE_ID nodeId = 0; GROUP_ID groupId = 1; ENDPOINT_NO endpointId = 2; CLUSTER_ID clusterId = 3; } - attribute BindingEntry bindingList[] = 0; - readonly global attribute int16u clusterRevision = 65533; + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; } server cluster Binding = 30 { - struct BindingEntry { + readonly global attribute int16u clusterRevision = 65533; + + request struct BindRequest { NODE_ID nodeId = 0; GROUP_ID groupId = 1; ENDPOINT_NO endpointId = 2; CLUSTER_ID clusterId = 3; } - attribute BindingEntry bindingList[] = 0; - readonly global attribute int16u clusterRevision = 65533; + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; } server cluster Channel = 1284 { @@ -313,21 +331,21 @@ server cluster Channel = 1284 { struct ChannelInfo { INT16U majorNumber = 0; INT16U minorNumber = 1; - CHAR_STRING<32> name = 2; - CHAR_STRING<32> callSign = 3; - CHAR_STRING<32> affiliateCallSign = 4; + optional CHAR_STRING<32> name = 2; + optional CHAR_STRING<32> callSign = 3; + optional CHAR_STRING<32> affiliateCallSign = 4; } struct LineupInfo { CHAR_STRING operatorName = 0; - CHAR_STRING lineupName = 1; - CHAR_STRING postalCode = 2; + optional CHAR_STRING lineupName = 1; + optional CHAR_STRING postalCode = 2; LineupInfoTypeEnum lineupInfoType = 3; } readonly attribute ChannelInfo channelList[] = 0; - attribute LineupInfo channelLineup = 1; - attribute ChannelInfo currentChannel = 2; + readonly attribute nullable LineupInfo channelLineup = 1; + readonly attribute nullable ChannelInfo currentChannel = 2; readonly global attribute int16u clusterRevision = 65533; request struct ChangeChannelByNumberRequestRequest { @@ -398,7 +416,7 @@ server cluster ContentLauncher = 1290 { struct Parameter { ParameterEnum type = 0; CHAR_STRING value = 1; - AdditionalInfo externalIDList[] = 2; + optional AdditionalInfo externalIDList[] = 2; } struct AdditionalInfo { @@ -408,17 +426,17 @@ server cluster ContentLauncher = 1290 { struct BrandingInformation { CHAR_STRING providerName = 0; - StyleInformation background = 1; - StyleInformation logo = 2; - StyleInformation progressBar = 3; - StyleInformation splash = 4; - StyleInformation waterMark = 5; + optional StyleInformation background = 1; + optional StyleInformation logo = 2; + optional StyleInformation progressBar = 3; + optional StyleInformation splash = 4; + optional StyleInformation waterMark = 5; } struct StyleInformation { - CHAR_STRING imageUrl = 0; - CHAR_STRING color = 1; - Dimension size = 2; + optional CHAR_STRING imageUrl = 0; + optional CHAR_STRING color = 1; + optional Dimension size = 2; } struct Dimension { @@ -432,20 +450,20 @@ server cluster ContentLauncher = 1290 { readonly global attribute int16u clusterRevision = 65533; request struct LaunchContentRequestRequest { - BOOLEAN autoPlay = 0; - CHAR_STRING data = 1; - ContentSearch search[] = 2; + ContentSearch search[] = 0; + BOOLEAN autoPlay = 1; + optional CHAR_STRING data = 2; } request struct LaunchURLRequestRequest { CHAR_STRING contentURL = 0; - CHAR_STRING displayString = 1; - BrandingInformation brandingInformation = 2; + optional CHAR_STRING displayString = 1; + optional BrandingInformation brandingInformation = 2; } response struct LaunchResponse { StatusEnum status = 0; - CHAR_STRING data = 1; + optional CHAR_STRING data = 1; } command LaunchContentRequest(LaunchContentRequestRequest): LaunchResponse = 0; @@ -1031,16 +1049,16 @@ server cluster MediaPlayback = 1286 { struct PlaybackPosition { INT64U updatedAt = 0; - INT64U position = 1; + nullable INT64U position = 1; } readonly attribute PlaybackStateEnum playbackState = 0; - readonly attribute epoch_us startTime = 1; - readonly attribute int64u duration = 2; - attribute PlaybackPosition position = 3; + readonly attribute nullable epoch_us startTime = 1; + readonly attribute nullable int64u duration = 2; + readonly attribute PlaybackPosition position = 3; readonly attribute single playbackSpeed = 4; - readonly attribute int64u seekRangeEnd = 5; - readonly attribute int64u seekRangeStart = 6; + readonly attribute nullable int64u seekRangeEnd = 5; + readonly attribute nullable int64u seekRangeStart = 6; readonly global attribute int16u clusterRevision = 65533; request struct SeekRequestRequest { @@ -1668,12 +1686,12 @@ server cluster TargetNavigator = 1285 { request struct NavigateTargetRequestRequest { INT8U target = 0; - CHAR_STRING data = 1; + optional CHAR_STRING data = 1; } response struct NavigateTargetResponse { StatusEnum status = 0; - CHAR_STRING data = 1; + optional CHAR_STRING data = 1; } command NavigateTargetRequest(NavigateTargetRequestRequest): NavigateTargetResponse = 0; diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 952d19cfbf179c..7e4d0b22fddab2 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -854,7 +854,24 @@ "define": "BINDING_CLUSTER", "side": "client", "enabled": 1, - "commands": [], + "commands": [ + { + "name": "Bind", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Unbind", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], "attributes": [ { "name": "ClusterRevision", @@ -882,21 +899,6 @@ "enabled": 1, "commands": [], "attributes": [ - { - "name": "binding list", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/tv-casting-app/linux/main.cpp b/examples/tv-casting-app/linux/main.cpp index 86dfb92aed7907..6f5cdad6a33302 100644 --- a/examples/tv-casting-app/linux/main.cpp +++ b/examples/tv-casting-app/linux/main.cpp @@ -253,8 +253,9 @@ void DeviceEventCallback(const DeviceLayer::ChipDeviceEvent * event, intptr_t ar } LaunchURLRequest::Type request; request.contentURL = chip::CharSpan::fromCharString(kContentUrl); - request.displayString = chip::CharSpan::fromCharString(kContentDisplayStr); - request.brandingInformation = chip::app::Clusters::ContentLauncher::Structs::BrandingInformation::Type(); + request.displayString = Optional(chip::CharSpan::fromCharString(kContentDisplayStr)); + request.brandingInformation = Optional( + chip::app::Clusters::ContentLauncher::Structs::BrandingInformation::Type()); cluster.InvokeCommand(request, nullptr, OnContentLauncherSuccessResponse, OnContentLauncherFailureResponse); } } diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 67b113ef35b096..d244ec49ccf8ab 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -168,7 +168,7 @@ client cluster ApplicationLauncher = 1292 { request struct LaunchAppRequestRequest { Application application = 0; - OCTET_STRING data = 1; + optional OCTET_STRING data = 1; } request struct StopAppRequestRequest { @@ -276,15 +276,24 @@ server cluster BinaryInputBasic = 15 { } server cluster Binding = 30 { - struct BindingEntry { + readonly global attribute int16u clusterRevision = 65533; + + request struct BindRequest { NODE_ID nodeId = 0; GROUP_ID groupId = 1; ENDPOINT_NO endpointId = 2; CLUSTER_ID clusterId = 3; } - attribute BindingEntry bindingList[] = 0; - readonly global attribute int16u clusterRevision = 65533; + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; } server cluster BridgedDeviceBasic = 57 { @@ -332,21 +341,21 @@ client cluster Channel = 1284 { struct ChannelInfo { INT16U majorNumber = 0; INT16U minorNumber = 1; - CHAR_STRING<32> name = 2; - CHAR_STRING<32> callSign = 3; - CHAR_STRING<32> affiliateCallSign = 4; + optional CHAR_STRING<32> name = 2; + optional CHAR_STRING<32> callSign = 3; + optional CHAR_STRING<32> affiliateCallSign = 4; } struct LineupInfo { CHAR_STRING operatorName = 0; - CHAR_STRING lineupName = 1; - CHAR_STRING postalCode = 2; + optional CHAR_STRING lineupName = 1; + optional CHAR_STRING postalCode = 2; LineupInfoTypeEnum lineupInfoType = 3; } readonly attribute ChannelInfo channelList[] = 0; - attribute LineupInfo channelLineup = 1; - attribute ChannelInfo currentChannel = 2; + readonly attribute nullable LineupInfo channelLineup = 1; + readonly attribute nullable ChannelInfo currentChannel = 2; readonly global attribute int16u clusterRevision = 65533; request struct ChangeChannelByNumberRequestRequest { @@ -649,7 +658,7 @@ client cluster ContentLauncher = 1290 { struct Parameter { ParameterEnum type = 0; CHAR_STRING value = 1; - AdditionalInfo externalIDList[] = 2; + optional AdditionalInfo externalIDList[] = 2; } struct AdditionalInfo { @@ -659,17 +668,17 @@ client cluster ContentLauncher = 1290 { struct BrandingInformation { CHAR_STRING providerName = 0; - StyleInformation background = 1; - StyleInformation logo = 2; - StyleInformation progressBar = 3; - StyleInformation splash = 4; - StyleInformation waterMark = 5; + optional StyleInformation background = 1; + optional StyleInformation logo = 2; + optional StyleInformation progressBar = 3; + optional StyleInformation splash = 4; + optional StyleInformation waterMark = 5; } struct StyleInformation { - CHAR_STRING imageUrl = 0; - CHAR_STRING color = 1; - Dimension size = 2; + optional CHAR_STRING imageUrl = 0; + optional CHAR_STRING color = 1; + optional Dimension size = 2; } struct Dimension { @@ -683,15 +692,15 @@ client cluster ContentLauncher = 1290 { readonly global attribute int16u clusterRevision = 65533; request struct LaunchContentRequestRequest { - BOOLEAN autoPlay = 0; - CHAR_STRING data = 1; - ContentSearch search[] = 2; + ContentSearch search[] = 0; + BOOLEAN autoPlay = 1; + optional CHAR_STRING data = 2; } request struct LaunchURLRequestRequest { CHAR_STRING contentURL = 0; - CHAR_STRING displayString = 1; - BrandingInformation brandingInformation = 2; + optional CHAR_STRING displayString = 1; + optional BrandingInformation brandingInformation = 2; } command LaunchContentRequest(LaunchContentRequestRequest): LaunchResponse = 0; @@ -2414,7 +2423,7 @@ client cluster TargetNavigator = 1285 { request struct NavigateTargetRequestRequest { INT8U target = 0; - CHAR_STRING data = 1; + optional CHAR_STRING data = 1; } command NavigateTargetRequest(NavigateTargetRequestRequest): NavigateTargetResponse = 0; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index ef73836b7ab3e4..9c736399597490 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -854,7 +854,41 @@ "define": "BINDING_CLUSTER", "side": "client", "enabled": 0, - "commands": [] + "commands": [ + { + "name": "Bind", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Unbind", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] }, { "name": "Binding", @@ -865,21 +899,6 @@ "enabled": 1, "commands": [], "attributes": [ - { - "name": "binding list", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, @@ -7971,7 +7990,24 @@ "define": "BINDING_CLUSTER", "side": "client", "enabled": 0, - "commands": [], + "commands": [ + { + "name": "Bind", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Unbind", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], "attributes": [ { "name": "ClusterRevision", @@ -7999,21 +8035,6 @@ "enabled": 1, "commands": [], "attributes": [ - { - "name": "binding list", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, diff --git a/scripts/examples/imxlinux_example.sh b/scripts/examples/imxlinux_example.sh new file mode 100755 index 00000000000000..a2c8eae43304eb --- /dev/null +++ b/scripts/examples/imxlinux_example.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +# +# 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. +# + +set -e +set -x +if [ "$#" != 2 ]; then + exit -1 +fi + +source "$(dirname "$0")/../../scripts/activate.sh" + +if [ "$IMX_SDK_ROOT" = "" ]; then + if [ "$CROSS_COMPILE" != "aarch64-poky-linux-" ]; then + echo "i.MX SDK root not aarch64" + exit -1 + fi +else + source "$IMX_SDK_ROOT"/environment-setup-cortexa53-crypto-poky-linux +fi +env + +PLATFORM_CFLAGS='-DCHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME=\"mlan0\"", "-DCHIP_DEVICE_CONFIG_LINUX_DHCPC_CMD=\"udhcpc -b -i %s \"' +PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR \ + PKG_CONFIG_LIBDIR="$PKG_CONFIG_PATH" \ + gn gen --check --fail-on-unused-args --root="$1" "$2" --args="target_os=\"linux\" target_cpu=\"arm64\" arm_arch=\"armv8-a\" +import(\"//build_overrides/build.gni\") +target_cflags=[ \"--sysroot=$SDKTARGETSYSROOT\", \"$PLATFORM_CFLAGS\" ] +target_ldflags = [ \"--sysroot=$SDKTARGETSYSROOT\" ] +custom_toolchain=\"\${build_root}/toolchain/custom\" +target_cc=\"$OECORE_NATIVE_SYSROOT/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc\" +target_cxx=\"$OECORE_NATIVE_SYSROOT/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++\" +target_ar=\"$OECORE_NATIVE_SYSROOT/usr/bin/aarch64-poky-linux/aarch64-poky-linux-ar\"" + +ninja -C "$2" diff --git a/src/app/AttributeAccessInterface.h b/src/app/AttributeAccessInterface.h index 7d46efcc825276..d12ea80e25bce0 100644 --- a/src/app/AttributeAccessInterface.h +++ b/src/app/AttributeAccessInterface.h @@ -382,8 +382,7 @@ class AttributeAccessInterface * involve reading from the attribute store or external attribute * callbacks. */ - virtual CHIP_ERROR Read(FabricIndex aAccessingFabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) = 0; + virtual CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) = 0; /** * Callback for writing attributes. @@ -403,11 +402,7 @@ class AttributeAccessInterface * involve writing to the attribute store or external attribute * callbacks. */ - virtual CHIP_ERROR Write(FabricIndex aAccessingFabricIndex, const ConcreteDataAttributePath & aPath, - AttributeValueDecoder & aDecoder) - { - return CHIP_NO_ERROR; - } + virtual CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { return CHIP_NO_ERROR; } /** * Mechanism for keeping track of a chain of AttributeAccessInterfaces. diff --git a/src/app/AttributePathExpandIterator.cpp b/src/app/AttributePathExpandIterator.cpp index a208b612556a6c..80920627cacf71 100644 --- a/src/app/AttributePathExpandIterator.cpp +++ b/src/app/AttributePathExpandIterator.cpp @@ -46,6 +46,7 @@ extern Optional emberAfGetNthClusterId(chip::EndpointId endpoint, uin extern Optional emberAfGetServerAttributeIdByIndex(chip::EndpointId endpoint, chip::ClusterId cluster, uint16_t attributeIndex); extern uint8_t emberAfClusterIndex(EndpointId endpoint, ClusterId clusterId, EmberAfClusterMask mask); +extern bool emberAfEndpointIndexIsEnabled(uint16_t index); namespace chip { namespace app { @@ -138,6 +139,12 @@ bool AttributePathExpandIterator::Next() for (; mEndpointIndex < mEndEndpointIndex; (mEndpointIndex++, mClusterIndex = UINT8_MAX, mAttributeIndex = UINT16_MAX)) { + if (!emberAfEndpointIndexIsEnabled(mEndpointIndex)) + { + // Not an enabled endpoint; skip it. + continue; + } + EndpointId endpointId = emberAfEndpointFromIndex(mEndpointIndex); if (mClusterIndex == UINT8_MAX) diff --git a/src/app/ConcreteAttributePath.h b/src/app/ConcreteAttributePath.h index 0fb764e057fae9..97e29bc190766d 100644 --- a/src/app/ConcreteAttributePath.h +++ b/src/app/ConcreteAttributePath.h @@ -18,6 +18,7 @@ #pragma once +#include #include #include @@ -30,28 +31,34 @@ namespace app { * The expanded flag can be set to indicate that a concrete path was expanded from a wildcard * or group path. */ -struct ConcreteAttributePath +struct ConcreteAttributePath : public ConcreteClusterPath { - ConcreteAttributePath() {} + ConcreteAttributePath() + { + // Note: mExpanded is in the superclass, so we can't use a field + // initializer. + mExpanded = false; + } ConcreteAttributePath(EndpointId aEndpointId, ClusterId aClusterId, AttributeId aAttributeId) : - mEndpointId(aEndpointId), mClusterId(aClusterId), mAttributeId(aAttributeId) - {} + ConcreteClusterPath(aEndpointId, aClusterId), mAttributeId(aAttributeId) + { + // Note: mExpanded is in the supercclass, so we can't use a field + // initializer. + mExpanded = false; + } - bool operator==(const ConcreteAttributePath & other) const + bool operator==(const ConcreteAttributePath & aOther) const { - return (mEndpointId == other.mEndpointId) && (mClusterId == other.mClusterId) && (mAttributeId == other.mAttributeId); + return ConcreteClusterPath::operator==(aOther) && (mAttributeId == aOther.mAttributeId); } bool operator<(const ConcreteAttributePath & path) const { return (mEndpointId < path.mEndpointId) || ((mEndpointId == path.mEndpointId) && (mClusterId < path.mClusterId)) || - ((mClusterId == path.mClusterId) && (mAttributeId < path.mAttributeId)); + ((mEndpointId == path.mEndpointId) && (mClusterId == path.mClusterId) && (mAttributeId < path.mAttributeId)); } - EndpointId mEndpointId = 0; - bool mExpanded = false; // NOTE: in between larger members - ClusterId mClusterId = 0; AttributeId mAttributeId = 0; }; diff --git a/src/app/ConcreteClusterPath.h b/src/app/ConcreteClusterPath.h new file mode 100644 index 00000000000000..ec880e8df404b2 --- /dev/null +++ b/src/app/ConcreteClusterPath.h @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * 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. + */ + +#pragma once + +#include + +namespace chip { +namespace app { + +/** + * A representation of a concrete cluster path. This identifies a specific + * cluster instance. + */ +struct ConcreteClusterPath +{ + ConcreteClusterPath(EndpointId aEndpointId, ClusterId aClusterId) : mEndpointId(aEndpointId), mClusterId(aClusterId) {} + + ConcreteClusterPath() {} + + ConcreteClusterPath(const ConcreteClusterPath & aOther) = default; + ConcreteClusterPath & operator=(const ConcreteClusterPath & aOther) = default; + + bool operator==(const ConcreteClusterPath & aOther) const + { + return mEndpointId == aOther.mEndpointId && mClusterId == aOther.mClusterId; + } + + bool operator!=(const ConcreteClusterPath & aOther) const { return !(*this == aOther); } + + EndpointId mEndpointId = 0; + // Note: not all subclasses of ConcreteClusterPath need mExpanded, but due + // to alignment requirements it's "free" in the sense of not needing more + // memory to put it here. But we don't initialize it, because that + // increases codesize for the non-consumers. + bool mExpanded; // NOTE: in between larger members + ClusterId mClusterId = 0; +}; + +} // namespace app +} // namespace chip diff --git a/src/app/ConcreteCommandPath.h b/src/app/ConcreteCommandPath.h index 7287e1289ddbb0..5020aa0ba6d2c0 100644 --- a/src/app/ConcreteCommandPath.h +++ b/src/app/ConcreteCommandPath.h @@ -18,8 +18,8 @@ #pragma once +#include #include -#include namespace chip { namespace app { @@ -27,20 +27,20 @@ namespace app { /** * A representation of a concrete invoke path. */ -struct ConcreteCommandPath +struct ConcreteCommandPath : public ConcreteClusterPath { ConcreteCommandPath(EndpointId aEndpointId, ClusterId aClusterId, CommandId aCommandId) : - mEndpointId(aEndpointId), mClusterId(aClusterId), mCommandId(aCommandId) + ConcreteClusterPath(aEndpointId, aClusterId), mCommandId(aCommandId) {} - bool operator==(const ConcreteCommandPath & other) const + bool operator==(const ConcreteCommandPath & aOther) const { - return mEndpointId == other.mEndpointId && mClusterId == other.mClusterId && mCommandId == other.mCommandId; + return ConcreteClusterPath::operator==(aOther) && (mCommandId == aOther.mCommandId); } - EndpointId mEndpointId = 0; - ClusterId mClusterId = 0; - CommandId mCommandId = 0; + bool operator!=(const ConcreteCommandPath & aOther) const { return !(*this == aOther); } + + CommandId mCommandId = 0; }; } // namespace app } // namespace chip diff --git a/src/app/ConcreteEventPath.h b/src/app/ConcreteEventPath.h index 8dd9ce6aaa419d..92dc1859f6256b 100644 --- a/src/app/ConcreteEventPath.h +++ b/src/app/ConcreteEventPath.h @@ -18,6 +18,7 @@ #pragma once +#include #include namespace chip { @@ -26,25 +27,25 @@ namespace app { /** * A representation of a concrete event path. */ -struct ConcreteEventPath +struct ConcreteEventPath : public ConcreteClusterPath { ConcreteEventPath(EndpointId aEndpointId, ClusterId aClusterId, EventId aEventId) : - mEndpointId(aEndpointId), mClusterId(aClusterId), mEventId(aEventId) + ConcreteClusterPath(aEndpointId, aClusterId), mEventId(aEventId) {} ConcreteEventPath() {} - ConcreteEventPath(const ConcreteEventPath & other) = default; - ConcreteEventPath & operator=(const ConcreteEventPath & other) = default; + ConcreteEventPath(const ConcreteEventPath & aOther) = default; + ConcreteEventPath & operator=(const ConcreteEventPath & aOther) = default; - bool operator==(const ConcreteEventPath & other) const + bool operator==(const ConcreteEventPath & aOther) const { - return mEndpointId == other.mEndpointId && mClusterId == other.mClusterId && mEventId == other.mEventId; + return ConcreteClusterPath::operator==(aOther) && (mEventId == aOther.mEventId); } - EndpointId mEndpointId = 0; - ClusterId mClusterId = 0; - EventId mEventId = 0; + bool operator!=(const ConcreteEventPath & aOther) const { return !(*this == aOther); } + + EventId mEventId = 0; }; } // namespace app } // namespace chip diff --git a/src/app/app-platform/ContentAppPlatform.cpp b/src/app/app-platform/ContentAppPlatform.cpp index fa8925abd09731..3fadd8273562dd 100644 --- a/src/app/app-platform/ContentAppPlatform.cpp +++ b/src/app/app-platform/ContentAppPlatform.cpp @@ -390,17 +390,20 @@ uint32_t ContentAppPlatform::GetPincodeFromContentApp(uint16_t vendorId, uint16_ CHIP_ERROR ContentAppPlatform::CreateBindingWithCallback(OperationalDeviceProxy * device, chip::EndpointId deviceEndpointId, chip::NodeId bindingNodeId, chip::GroupId bindingGroupId, chip::EndpointId bindingEndpointId, chip::ClusterId bindingClusterId, - Controller::WriteResponseSuccessCallback successCb, - Controller::WriteResponseFailureCallback failureCb) + CommandResponseSuccessCallback successCb, + CommandResponseFailureCallback failureCb) { chip::Controller::BindingCluster cluster; cluster.Associate(device, deviceEndpointId); - Binding::Structs::BindingEntry::Type entries[1] = { { bindingNodeId, bindingGroupId, bindingEndpointId, bindingClusterId } }; - Binding::Attributes::BindingList::TypeInfo::Type bindingList(entries); - cluster.WriteAttribute(bindingList, nullptr, Binding::Id, Binding::Attributes::BindingList::Id, successCb, failureCb, - NullOptional); - ChipLogDetail(Controller, "CreateBindingWithCallback: Sent Bind write request, waiting for response"); + Binding::Commands::Bind::Type request; + request.nodeId = bindingNodeId; + request.groupId = bindingGroupId; + request.endpointId = bindingEndpointId; + request.clusterId = bindingClusterId; + ReturnErrorOnFailure(cluster.InvokeCommand(request, this, successCb, failureCb)); + + ChipLogDetail(Controller, "CreateBindingWithCallback: Sent Bind command request, waiting for response"); return CHIP_NO_ERROR; } diff --git a/src/app/app-platform/ContentAppPlatform.h b/src/app/app-platform/ContentAppPlatform.h index bb135243fccdc2..81a364c022df37 100644 --- a/src/app/app-platform/ContentAppPlatform.h +++ b/src/app/app-platform/ContentAppPlatform.h @@ -127,16 +127,16 @@ class DLL_EXPORT ContentAppPlatform * @param[in] bindingGroupId The GroupId for the binding that will be created. * @param[in] bindingEndpointId The EndpointId for the binding that will be created. * @param[in] bindingClusterId The ClusterId for the binding that will be created. - * @param[in] successCb The function to be called on success of adding the binding. - * @param[in] failureCb The function to be called on failure of adding the binding. + * @param[in] onSuccessCallback The function to be called on success of adding the binding. + * @param[in] onFailureCallback The function to be called on failure of adding the binding. * * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error */ CHIP_ERROR CreateBindingWithCallback(OperationalDeviceProxy * device, chip::EndpointId deviceEndpointId, chip::NodeId bindingNodeId, chip::GroupId bindingGroupId, chip::EndpointId bindingEndpointId, chip::ClusterId bindingClusterId, - Controller::WriteResponseSuccessCallback successCb, - Controller::WriteResponseFailureCallback failureCb); + CommandResponseSuccessCallback successCb, + CommandResponseFailureCallback failureCb); protected: // requires vendorApp to be in the catalog of the platform diff --git a/src/app/clusters/access-control-server/access-control-server.cpp b/src/app/clusters/access-control-server/access-control-server.cpp index 49fdff9d234c5d..857b183f39827e 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -291,8 +291,8 @@ class AccessControlAttribute : public chip::app::AttributeAccessInterface public: AccessControlAttribute() : AttributeAccessInterface(Optional(0), AccessControlCluster::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(FabricIndex fabricIndex, const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; static constexpr uint16_t ClusterRevision = 1; @@ -383,8 +383,7 @@ CHIP_ERROR LogAccessControlEvent(const AccessControl::Entry & entry, const Acces return err; } -CHIP_ERROR AccessControlAttribute::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR AccessControlAttribute::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { switch (aPath.mAttributeId) { @@ -422,8 +421,7 @@ CHIP_ERROR AccessControlAttribute::ReadExtension(AttributeValueEncoder & aEncode return aEncoder.EncodeEmptyList(); } -CHIP_ERROR AccessControlAttribute::Write(FabricIndex fabricIndex, const ConcreteDataAttributePath & aPath, - AttributeValueDecoder & aDecoder) +CHIP_ERROR AccessControlAttribute::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { switch (aPath.mAttributeId) { diff --git a/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp b/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp index ebc1218a551396..16732722b3539f 100644 --- a/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp +++ b/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp @@ -47,7 +47,7 @@ class AdministratorCommissioningAttrAccess : public AttributeAccessInterface AttributeAccessInterface(Optional::Missing(), Clusters::AdministratorCommissioning::Id) {} - CHIP_ERROR Read(FabricIndex fabric, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; // Vendor ID and Fabric Index of the admin that has opened the commissioning window uint16_t mVendorId; @@ -56,8 +56,7 @@ class AdministratorCommissioningAttrAccess : public AttributeAccessInterface AdministratorCommissioningAttrAccess gAdminCommissioningAttrAccess; -CHIP_ERROR AdministratorCommissioningAttrAccess::Read(FabricIndex fabric, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR AdministratorCommissioningAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { VerifyOrDie(aPath.mClusterId == Clusters::AdministratorCommissioning::Id); diff --git a/src/app/clusters/application-basic-server/application-basic-server.cpp b/src/app/clusters/application-basic-server/application-basic-server.cpp index cc3303c818a309..3d3f89dc6b824b 100644 --- a/src/app/clusters/application-basic-server/application-basic-server.cpp +++ b/src/app/clusters/application-basic-server/application-basic-server.cpp @@ -129,8 +129,7 @@ class ApplicationBasicAttrAccess : public app::AttributeAccessInterface public: ApplicationBasicAttrAccess() : app::AttributeAccessInterface(Optional::Missing(), ApplicationBasic::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override; private: CHIP_ERROR ReadVendorNameAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate); @@ -145,8 +144,7 @@ class ApplicationBasicAttrAccess : public app::AttributeAccessInterface ApplicationBasicAttrAccess gApplicationBasicAttrAccess; -CHIP_ERROR ApplicationBasicAttrAccess::Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) +CHIP_ERROR ApplicationBasicAttrAccess::Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) { EndpointId endpoint = aPath.mEndpointId; Delegate * delegate = GetDelegate(endpoint); diff --git a/src/app/clusters/application-launcher-server/application-launcher-server.cpp b/src/app/clusters/application-launcher-server/application-launcher-server.cpp index df15629d841b54..86d9299f69946f 100644 --- a/src/app/clusters/application-launcher-server/application-launcher-server.cpp +++ b/src/app/clusters/application-launcher-server/application-launcher-server.cpp @@ -114,10 +114,9 @@ CHIP_ERROR Delegate::HandleGetCurrentApp(app::AttributeValueEncoder & aEncoder) { ApplicationEPType currentApp; CatalogVendorApp * vendorApp = app->GetApplicationBasicDelegate()->GetCatalogVendorApp(); - std::string endpointStr = std::to_string(app->GetEndpointId()); currentApp.application.catalogVendorId = vendorApp->catalogVendorId; currentApp.application.applicationId = CharSpan(vendorApp->applicationId, strlen(vendorApp->applicationId)); - currentApp.endpoint = CharSpan(endpointStr.c_str(), endpointStr.length()); + currentApp.endpoint = Optional(app->GetEndpointId()); return aEncoder.Encode(currentApp); } } @@ -128,7 +127,7 @@ CHIP_ERROR Delegate::HandleGetCurrentApp(app::AttributeValueEncoder & aEncoder) ApplicationEPType currentApp; currentApp.application.catalogVendorId = 123; currentApp.application.applicationId = CharSpan("applicationId", strlen("applicationId")); - currentApp.endpoint = CharSpan("endpointId", strlen("endpointId")); + currentApp.endpoint = Optional::Missing(); return aEncoder.Encode(currentApp); } @@ -147,8 +146,7 @@ class ApplicationLauncherAttrAccess : public app::AttributeAccessInterface public: ApplicationLauncherAttrAccess() : app::AttributeAccessInterface(Optional::Missing(), ApplicationLauncher::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override; private: CHIP_ERROR ReadCatalogListAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate); @@ -157,8 +155,7 @@ class ApplicationLauncherAttrAccess : public app::AttributeAccessInterface ApplicationLauncherAttrAccess gApplicationLauncherAttrAccess; -CHIP_ERROR ApplicationLauncherAttrAccess::Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) +CHIP_ERROR ApplicationLauncherAttrAccess::Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) { EndpointId endpoint = aPath.mEndpointId; Delegate * delegate = GetDelegate(endpoint); @@ -215,12 +212,13 @@ bool emberAfApplicationLauncherClusterLaunchAppRequestCallback(app::CommandHandl app::CommandResponseHelper responder(command, commandPath); std::string appId(application.applicationId.data(), application.applicationId.size()); - if (appId.length() == 0) + + if (appId.length() == 0 && data.HasValue()) { // chip-tool can't send structs from command line so treat data value as appid if appid is blank // TODO: fix this once chip-tool support sending structs from command line ChipLogError(Zcl, "ApplicationLauncher blank content id, taking data as appid"); - appId = std::string((char *) data.data(), data.size()); + appId = std::string((char *) data.Value().data(), data.Value().size()); } CatalogVendorApp vendorApp(application.catalogVendorId, appId.c_str()); @@ -252,7 +250,8 @@ bool emberAfApplicationLauncherClusterLaunchAppRequestCallback(app::CommandHandl ContentAppPlatform::GetInstance().SetCurrentApp(app); ChipLogError(Zcl, "ApplicationLauncher handling launch on ContentApp"); - app->GetApplicationLauncherDelegate()->HandleLaunchApp(responder, data, application); + app->GetApplicationLauncherDelegate()->HandleLaunchApp(responder, data.HasValue() ? data.Value() : ByteSpan(), + application); return true; } #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED @@ -277,7 +276,7 @@ bool emberAfApplicationLauncherClusterLaunchAppRequestCallback(app::CommandHandl #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED ChipLogError(Zcl, "ApplicationLauncher handling launch"); - delegate->HandleLaunchApp(responder, data, application); + delegate->HandleLaunchApp(responder, data.HasValue() ? data.Value() : ByteSpan(), application); } exit: diff --git a/src/app/clusters/audio-output-server/audio-output-server.cpp b/src/app/clusters/audio-output-server/audio-output-server.cpp index 3bbc1226338ca5..38ba765ad725ff 100644 --- a/src/app/clusters/audio-output-server/audio-output-server.cpp +++ b/src/app/clusters/audio-output-server/audio-output-server.cpp @@ -93,8 +93,7 @@ class AudioOutputAttrAccess : public app::AttributeAccessInterface AudioOutputAttrAccess() : app::AttributeAccessInterface(Optional::Missing(), chip::app::Clusters::AudioOutput::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override; private: CHIP_ERROR ReadOutputListAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate); @@ -103,8 +102,7 @@ class AudioOutputAttrAccess : public app::AttributeAccessInterface AudioOutputAttrAccess gAudioOutputAttrAccess; -CHIP_ERROR AudioOutputAttrAccess::Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) +CHIP_ERROR AudioOutputAttrAccess::Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) { EndpointId endpoint = aPath.mEndpointId; Delegate * delegate = GetDelegate(endpoint); diff --git a/src/app/clusters/basic/basic.cpp b/src/app/clusters/basic/basic.cpp index 9d6d6d66f53313..b74a6885c7339d 100644 --- a/src/app/clusters/basic/basic.cpp +++ b/src/app/clusters/basic/basic.cpp @@ -49,8 +49,8 @@ class BasicAttrAccess : public AttributeAccessInterface // Register for the Basic cluster on all endpoints. BasicAttrAccess() : AttributeAccessInterface(Optional::Missing(), Basic::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(FabricIndex fabricIndex, const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; private: CHIP_ERROR ReadDataModelRevision(AttributeValueEncoder & aEncoder); @@ -66,7 +66,7 @@ CHIP_ERROR EncodeStringOnSuccess(CHIP_ERROR status, AttributeValueEncoder & enco return encoder.Encode(chip::CharSpan(buf, strnlen(buf, maxBufSize))); } -CHIP_ERROR BasicAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +CHIP_ERROR BasicAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { if (aPath.mClusterId != Basic::Id) { @@ -297,8 +297,7 @@ CHIP_ERROR BasicAttrAccess::ReadLocation(AttributeValueEncoder & aEncoder) return aEncoder.Encode(chip::CharSpan(location, codeLen)); } -CHIP_ERROR BasicAttrAccess::Write(FabricIndex fabricIndex, const ConcreteDataAttributePath & aPath, - AttributeValueDecoder & aDecoder) +CHIP_ERROR BasicAttrAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { VerifyOrDie(aPath.mClusterId == Basic::Id); diff --git a/src/app/clusters/bindings/BindingManager.cpp b/src/app/clusters/bindings/BindingManager.cpp index 7ce106da08cb55..a2817ca1576245 100644 --- a/src/app/clusters/bindings/BindingManager.cpp +++ b/src/app/clusters/bindings/BindingManager.cpp @@ -179,7 +179,7 @@ CHIP_ERROR BindingManager::NotifyBoundClusterChanged(EndpointId endpoint, Cluste VerifyOrReturnError(fabricInfo != nullptr, CHIP_ERROR_NOT_FOUND); PeerId peer = fabricInfo->GetPeerIdForNode(entry.nodeId); OperationalDeviceProxy * peerDevice = mAppServer->GetCASESessionManager()->FindExistingSession(peer); - if (peerDevice != nullptr && peerDevice->IsConnected() && mBoundDeviceChangedHandler) + if (peerDevice != nullptr && mBoundDeviceChangedHandler) { // We already have an active connection mBoundDeviceChangedHandler(&entry, peerDevice, context); @@ -187,10 +187,7 @@ CHIP_ERROR BindingManager::NotifyBoundClusterChanged(EndpointId endpoint, Cluste else { mPendingNotificationMap.AddPendingNotification(i, context); - if (!peerDevice->IsConnecting()) - { - ReturnErrorOnFailure(EstablishConnection(entry.fabricIndex, entry.nodeId)); - } + ReturnErrorOnFailure(EstablishConnection(entry.fabricIndex, entry.nodeId)); } } else if (entry.type == EMBER_MULTICAST_BINDING) diff --git a/src/app/clusters/bindings/bindings.cpp b/src/app/clusters/bindings/bindings.cpp index f238daa9325646..cfe7ea5f81e773 100644 --- a/src/app/clusters/bindings/bindings.cpp +++ b/src/app/clusters/bindings/bindings.cpp @@ -20,48 +20,27 @@ * @brief Implementation for the Binding Server Cluster ***************************************************************************/ +#include + #include -#include -#include #include -#include +#include #include -#include #include #include using namespace chip; -using namespace chip::app; -using namespace chip::app::Clusters; using namespace chip::app::Clusters::Binding; -using namespace chip::app::Clusters::Binding::Attributes; // TODO: add binding table to the persistent storage -namespace { -class BindingTableAccess : public AttributeAccessInterface -{ -public: - // Register for the User Label cluster on all endpoints. - BindingTableAccess() : AttributeAccessInterface(Optional::Missing(), Binding::Id) {} - - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & path, AttributeValueEncoder & encoder) override; - CHIP_ERROR Write(FabricIndex fabricIndex, const ConcreteDataAttributePath & path, AttributeValueDecoder & decoder) override; - -private: - CHIP_ERROR ReadBindingTable(FabricIndex fabricIndex, EndpointId endpoint, AttributeValueEncoder & encoder); - CHIP_ERROR WriteBindingTable(FabricIndex fabricIndex, EndpointId endpoint, AttributeValueDecoder & decoder); -}; - -BindingTableAccess gAttrAccess; - -EmberStatus getUnusedBindingIndex(uint8_t * bindingIndex) +static EmberStatus getBindingIndex(EmberBindingTableEntry & newEntry, uint8_t * bindingIndex) { EmberBindingTableEntry currentEntry; for (uint8_t i = 0; i < EMBER_BINDING_TABLE_SIZE; i++) { emberGetBinding(i, ¤tEntry); - if (currentEntry.type == EMBER_UNUSED_BINDING) + if (currentEntry.type != EMBER_UNUSED_BINDING && currentEntry == newEntry) { *bindingIndex = i; return EMBER_SUCCESS; @@ -71,60 +50,31 @@ EmberStatus getUnusedBindingIndex(uint8_t * bindingIndex) return EMBER_NOT_FOUND; } -bool BindingEntryMatches(FabricIndex fabricIndex, EndpointId endpoint, const EmberBindingTableEntry & entry, - const Structs::BindingEntry::Type & value) -{ - if (entry.local != endpoint || entry.fabricIndex != fabricIndex || entry.clusterId != value.clusterId) - { - return false; - } - return (entry.type == EMBER_UNICAST_BINDING && entry.nodeId == value.nodeId && entry.remote == value.endpointId) || - (entry.type == EMBER_MULTICAST_BINDING && entry.groupId == value.groupId); -} - -bool IsInBindingList(FabricIndex fabricIndex, EndpointId endpoint, const EmberBindingTableEntry & entry, - const BindingList::TypeInfo::DecodableType & bindingList) -{ - if (entry.type == EMBER_UNUSED_BINDING) - { - return false; - } - auto iter = bindingList.begin(); - while (iter.Next()) - { - if (BindingEntryMatches(fabricIndex, endpoint, entry, iter.GetValue())) - { - return true; - } - } - return false; -} - -bool IsInBindingTable(FabricIndex fabricIndex, EndpointId endpoint, - const Binding::Structs::BindingEntry::DecodableType & bindingEntry) +static EmberStatus getUnusedBindingIndex(uint8_t * bindingIndex) { + EmberBindingTableEntry currentEntry; for (uint8_t i = 0; i < EMBER_BINDING_TABLE_SIZE; i++) { - EmberBindingTableEntry currentEntry; emberGetBinding(i, ¤tEntry); - if (currentEntry.type != EMBER_UNUSED_BINDING) + if (currentEntry.type == EMBER_UNUSED_BINDING) { - if (BindingEntryMatches(fabricIndex, endpoint, currentEntry, bindingEntry)) - { - return true; - } + *bindingIndex = i; + return EMBER_SUCCESS; } } - return false; + + return EMBER_NOT_FOUND; } -CHIP_ERROR AddBindingEntry(const Binding::Structs::BindingEntry::DecodableType & entry, FabricIndex fabricIndex, - EndpointId localEndpoint, uint8_t * outBindingIndex) +bool emberAfBindingClusterBindCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, + const Commands::Bind::DecodableType & commandData) { - GroupId groupId = entry.groupId; - NodeId nodeId = entry.nodeId; - EndpointId remoteEndpoint = entry.endpointId; - ClusterId clusterId = entry.clusterId; + NodeId nodeId = commandData.nodeId; + GroupId groupId = commandData.groupId; + ClusterId clusterId = commandData.clusterId; + EndpointId remoteEndpoint = commandData.endpointId; + EndpointId localEndpoint = commandPath.mEndpointId; + FabricIndex fabricIndex = commandObj->GetAccessingFabricIndex(); EmberBindingTableEntry bindingEntry; ChipLogDetail(Zcl, "RX: BindCallback"); @@ -132,7 +82,8 @@ CHIP_ERROR AddBindingEntry(const Binding::Structs::BindingEntry::DecodableType & if ((groupId != 0 && nodeId != 0) || (groupId == 0 && nodeId == 0) || (groupId != 0 && remoteEndpoint != 0)) { ChipLogError(Zcl, "Binding: Invalid request"); - return CHIP_ERROR_INVALID_ARGUMENT; + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_MALFORMED_COMMAND); + return true; } if (groupId) @@ -145,10 +96,16 @@ CHIP_ERROR AddBindingEntry(const Binding::Structs::BindingEntry::DecodableType & } uint8_t bindingIndex; + if (getBindingIndex(bindingEntry, &bindingIndex) != EMBER_NOT_FOUND) + { + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_DUPLICATE_EXISTS); + return true; + } if (getUnusedBindingIndex(&bindingIndex) != EMBER_SUCCESS) { - return CHIP_ERROR_NO_MEMORY; + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INSUFFICIENT_SPACE); + return true; } emberSetBinding(bindingIndex, &bindingEntry); @@ -163,127 +120,55 @@ CHIP_ERROR AddBindingEntry(const Binding::Structs::BindingEntry::DecodableType & } } - return CHIP_NO_ERROR; + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); + return true; } -} // namespace - -CHIP_ERROR BindingTableAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & path, - AttributeValueEncoder & encoder) +bool emberAfBindingClusterUnbindCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, + const Commands::Unbind::DecodableType & commandData) { - switch (path.mAttributeId) - { - case BindingList::Id: - return ReadBindingTable(fabricIndex, path.mEndpointId, encoder); - default: - break; - } - return CHIP_NO_ERROR; -} + NodeId nodeId = commandData.nodeId; + GroupId groupId = commandData.groupId; + ClusterId clusterId = commandData.clusterId; + EndpointId remoteEndpoint = commandData.endpointId; + EndpointId localEndpoint = commandPath.mEndpointId; + FabricIndex fabricIndex = commandObj->GetAccessingFabricIndex(); + EmberBindingTableEntry bindingEntry; -CHIP_ERROR BindingTableAccess::ReadBindingTable(FabricIndex fabricIndex, EndpointId endpoint, AttributeValueEncoder & encoder) -{ - DeviceLayer::AttributeList bindingTable; + ChipLogDetail(Zcl, "RX: UnbindCallback"); - for (uint8_t i = 0; i < EMBER_BINDING_TABLE_SIZE; i++) + if ((groupId != 0 && nodeId != 0) || (groupId == 0 && nodeId == 0)) { - EmberBindingTableEntry entry; - emberGetBinding(i, &entry); - if (entry.type == EMBER_UNICAST_BINDING && entry.fabricIndex == fabricIndex) - { - Structs::BindingEntry::Type value = { - .nodeId = entry.nodeId, - .groupId = 0, - .endpointId = entry.remote, - .clusterId = entry.clusterId, - }; - bindingTable.add(value); - } - else if (entry.type == EMBER_MULTICAST_BINDING && entry.fabricIndex == fabricIndex) - { - Structs::BindingEntry::Type value = { - .nodeId = 0, - .groupId = entry.groupId, - .endpointId = 0, - .clusterId = entry.clusterId, - }; - bindingTable.add(value); - } + ChipLogError(Zcl, "Binding: Invalid request"); + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_MALFORMED_COMMAND); + return true; } - return encoder.EncodeList([&bindingTable](const auto & subEncoder) { - for (auto & value : bindingTable) - { - ReturnErrorOnFailure(subEncoder.Encode(value)); - } - return CHIP_NO_ERROR; - }); -} - -CHIP_ERROR BindingTableAccess::Write(FabricIndex fabricIndex, const ConcreteDataAttributePath & path, - AttributeValueDecoder & decoder) -{ - switch (path.mAttributeId) + if (groupId) { - case BindingList::Id: - return WriteBindingTable(fabricIndex, path.mEndpointId, decoder); - default: - break; + bindingEntry = EmberBindingTableEntry::ForGroup(fabricIndex, groupId, localEndpoint, clusterId); } - return CHIP_NO_ERROR; -} - -CHIP_ERROR BindingTableAccess::WriteBindingTable(FabricIndex fabricIndex, EndpointId endpoint, AttributeValueDecoder & decoder) -{ - BindingList::TypeInfo::DecodableType newBindingList; - - ReturnErrorOnFailure(decoder.Decode(newBindingList)); - - // Add entries currently not in the binding table - auto iter = newBindingList.begin(); - CHIP_ERROR err = CHIP_NO_ERROR; - uint8_t addedBindingIndecies[EMBER_BINDING_TABLE_SIZE]; - uint8_t numAddedBindings = 0; - while (iter.Next()) + else { - if (!IsInBindingTable(fabricIndex, endpoint, iter.GetValue())) - { - err = AddBindingEntry(iter.GetValue(), fabricIndex, endpoint, &addedBindingIndecies[numAddedBindings]); - if (err != CHIP_NO_ERROR) - { - break; - } - numAddedBindings++; - } + bindingEntry = EmberBindingTableEntry::ForNode(fabricIndex, nodeId, localEndpoint, remoteEndpoint, clusterId); } - // Revert the added entries upon error - if (err != CHIP_NO_ERROR) + + uint8_t bindingIndex; + if (getBindingIndex(bindingEntry, &bindingIndex) != EMBER_SUCCESS) { - for (uint8_t bindingIndex : addedBindingIndecies) - { - emberDeleteBinding(bindingIndex); - } + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_NOT_FOUND); + return true; } - // Remove entries not in the new binding list - for (uint8_t i = 0; i < EMBER_BINDING_TABLE_SIZE; i++) + CHIP_ERROR err = BindingManager::GetInstance().UnicastBindingRemoved(bindingIndex); + if (err != CHIP_NO_ERROR) { - EmberBindingTableEntry entry; - emberGetBinding(i, &entry); - if (entry.type != EMBER_UNUSED_BINDING && entry.fabricIndex == fabricIndex && - !IsInBindingList(fabricIndex, endpoint, entry, newBindingList)) - { - if (entry.type == EMBER_UNICAST_BINDING && BindingManager::GetInstance().UnicastBindingRemoved(i) != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Binding: Failed to remove pending notification for unicast binding" ChipLogFormatX64 ": %s", - ChipLogValueX64(entry.nodeId), err.AsString()); - } - emberDeleteBinding(i); - } + ChipLogError(Zcl, "Binding: Failed to remove pending notification for unicast binding" ChipLogFormatX64 ": %s", + ChipLogValueX64(nodeId), err.AsString()); } - return err; -} -void MatterBindingPluginServerInitCallback() -{ - registerAttributeAccessOverride(&gAttrAccess); + emberDeleteBinding(bindingIndex); + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); + return true; } + +void MatterBindingPluginServerInitCallback() {} diff --git a/src/app/clusters/channel-server/channel-server.cpp b/src/app/clusters/channel-server/channel-server.cpp index 9bd5bd079e1bc8..9ec8401090a082 100644 --- a/src/app/clusters/channel-server/channel-server.cpp +++ b/src/app/clusters/channel-server/channel-server.cpp @@ -125,8 +125,7 @@ class ChannelAttrAccess : public app::AttributeAccessInterface public: ChannelAttrAccess() : app::AttributeAccessInterface(Optional::Missing(), Channel::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override; private: CHIP_ERROR ReadChannelListAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate); @@ -136,8 +135,7 @@ class ChannelAttrAccess : public app::AttributeAccessInterface ChannelAttrAccess gChannelAttrAccess; -CHIP_ERROR ChannelAttrAccess::Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) +CHIP_ERROR ChannelAttrAccess::Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) { EndpointId endpoint = aPath.mEndpointId; Delegate * delegate = GetDelegate(endpoint); diff --git a/src/app/clusters/content-launch-server/content-launch-server.cpp b/src/app/clusters/content-launch-server/content-launch-server.cpp index a69dff05d41a20..62efa5d61834c5 100644 --- a/src/app/clusters/content-launch-server/content-launch-server.cpp +++ b/src/app/clusters/content-launch-server/content-launch-server.cpp @@ -129,8 +129,7 @@ class ContentLauncherAttrAccess : public app::AttributeAccessInterface public: ContentLauncherAttrAccess() : app::AttributeAccessInterface(Optional::Missing(), ContentLauncher::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override; private: CHIP_ERROR ReadAcceptHeaderAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate); @@ -139,8 +138,7 @@ class ContentLauncherAttrAccess : public app::AttributeAccessInterface ContentLauncherAttrAccess gContentLauncherAttrAccess; -CHIP_ERROR ContentLauncherAttrAccess::Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) +CHIP_ERROR ContentLauncherAttrAccess::Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) { EndpointId endpoint = aPath.mEndpointId; Delegate * delegate = GetDelegate(endpoint); @@ -206,7 +204,7 @@ bool emberAfContentLauncherClusterLaunchContentRequestCallback( Delegate * delegate = GetDelegate(endpoint); VerifyOrExit(isDelegateNull(delegate, endpoint) != true, err = CHIP_ERROR_INCORRECT_STATE); { - delegate->HandleLaunchContent(responder, parameterList, autoplay, data); + delegate->HandleLaunchContent(responder, parameterList, autoplay, data.HasValue() ? data.Value() : CharSpan()); } exit: @@ -242,7 +240,8 @@ bool emberAfContentLauncherClusterLaunchURLRequestCallback( Delegate * delegate = GetDelegate(endpoint); VerifyOrExit(isDelegateNull(delegate, endpoint) != true, err = CHIP_ERROR_INCORRECT_STATE); { - delegate->HandleLaunchUrl(responder, contentUrl, displayString, brandingInformationList); + delegate->HandleLaunchUrl(responder, contentUrl, displayString.HasValue() ? displayString.Value() : CharSpan(), + brandingInformationList); } exit: diff --git a/src/app/clusters/descriptor/descriptor.cpp b/src/app/clusters/descriptor/descriptor.cpp index 72315cc33602eb..fb4b425bdc6c50 100644 --- a/src/app/clusters/descriptor/descriptor.cpp +++ b/src/app/clusters/descriptor/descriptor.cpp @@ -42,7 +42,7 @@ class DescriptorAttrAccess : public AttributeAccessInterface // Register for the Descriptor cluster on all endpoints. DescriptorAttrAccess() : AttributeAccessInterface(Optional::Missing(), Descriptor::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; private: static constexpr uint16_t ClusterRevision = 1; @@ -123,8 +123,7 @@ CHIP_ERROR DescriptorAttrAccess::ReadClusterRevision(EndpointId endpoint, Attrib DescriptorAttrAccess gAttrAccess; -CHIP_ERROR DescriptorAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR DescriptorAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { VerifyOrDie(aPath.mClusterId == Descriptor::Id); diff --git a/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp b/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp index d0d453d012b6f9..d79a3129335050 100644 --- a/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp +++ b/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp @@ -42,7 +42,7 @@ class EthernetDiagosticsAttrAccess : public AttributeAccessInterface // Register for the EthernetNetworkDiagnostics cluster on all endpoints. EthernetDiagosticsAttrAccess() : AttributeAccessInterface(Optional::Missing(), EthernetNetworkDiagnostics::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; private: template @@ -128,8 +128,7 @@ CHIP_ERROR EthernetDiagosticsAttrAccess::ReadCarrierDetect(AttributeValueEncoder EthernetDiagosticsAttrAccess gAttrAccess; -CHIP_ERROR EthernetDiagosticsAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR EthernetDiagosticsAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { if (aPath.mClusterId != EthernetNetworkDiagnostics::Id) { diff --git a/src/app/clusters/fixed-label-server/fixed-label-server.cpp b/src/app/clusters/fixed-label-server/fixed-label-server.cpp index 06f1181be90c85..497c92108f3f52 100644 --- a/src/app/clusters/fixed-label-server/fixed-label-server.cpp +++ b/src/app/clusters/fixed-label-server/fixed-label-server.cpp @@ -44,7 +44,7 @@ class FixedLabelAttrAccess : public AttributeAccessInterface // Register for the Fixed Label cluster on all endpoints. FixedLabelAttrAccess() : AttributeAccessInterface(Optional::Missing(), FixedLabel::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; private: CHIP_ERROR ReadLabelList(EndpointId endpoint, AttributeValueEncoder & aEncoder); @@ -76,8 +76,7 @@ CHIP_ERROR FixedLabelAttrAccess::ReadLabelList(EndpointId endpoint, AttributeVal FixedLabelAttrAccess gAttrAccess; -CHIP_ERROR FixedLabelAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR FixedLabelAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { VerifyOrDie(aPath.mClusterId == FixedLabel::Id); diff --git a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp index 41690c4c9ed12f..e1e3d1c735f986 100644 --- a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp +++ b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp @@ -58,7 +58,7 @@ class GeneralCommissioningAttrAccess : public AttributeAccessInterface // Register for the GeneralCommissioning cluster on all endpoints. GeneralCommissioningAttrAccess() : AttributeAccessInterface(Optional::Missing(), GeneralCommissioning::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; private: CHIP_ERROR ReadIfSupported(CHIP_ERROR (ConfigurationManager::*getter)(uint8_t &), AttributeValueEncoder & aEncoder); @@ -67,8 +67,7 @@ class GeneralCommissioningAttrAccess : public AttributeAccessInterface GeneralCommissioningAttrAccess gAttrAccess; -CHIP_ERROR GeneralCommissioningAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR GeneralCommissioningAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { if (aPath.mClusterId != GeneralCommissioning::Id) { diff --git a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp index 57bb6dccb9082c..9283182c9d9dcf 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp @@ -51,7 +51,7 @@ class GeneralDiagosticsAttrAccess : public AttributeAccessInterface // Register for the GeneralDiagnostics cluster on all endpoints. GeneralDiagosticsAttrAccess() : AttributeAccessInterface(Optional::Missing(), GeneralDiagnostics::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; private: template @@ -135,8 +135,7 @@ CHIP_ERROR GeneralDiagosticsAttrAccess::ReadNetworkInterfaces(AttributeValueEnco GeneralDiagosticsAttrAccess gAttrAccess; -CHIP_ERROR GeneralDiagosticsAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR GeneralDiagosticsAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { if (aPath.mClusterId != GeneralDiagnostics::Id) { diff --git a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp index 9977080004a2e3..f3d1406741e68e 100644 --- a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp +++ b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp @@ -112,7 +112,7 @@ class GroupKeyManagementAttributeAccess : public AttributeAccessInterface // Register for the GroupKeyManagement cluster on all endpoints. GroupKeyManagementAttributeAccess() : AttributeAccessInterface(Optional(0), GroupKeyManagement::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override { VerifyOrDie(aPath.mClusterId == GroupKeyManagement::Id); @@ -134,7 +134,7 @@ class GroupKeyManagementAttributeAccess : public AttributeAccessInterface return CHIP_ERROR_READ_FAILED; } - CHIP_ERROR Write(FabricIndex fabricIndex, const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override + CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override { if (GroupKeyManagement::Attributes::GroupKeyMap::Id == aPath.mAttributeId) diff --git a/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp b/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp index d294148566b59a..6892016ed07d18 100644 --- a/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp +++ b/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp @@ -46,7 +46,7 @@ class LocalizationConfigurationAttrAccess : public AttributeAccessInterface LocalizationConfigurationAttrAccess() : AttributeAccessInterface(Optional::Missing(), LocalizationConfiguration::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; private: CHIP_ERROR ReadSupportedLocales(AttributeValueEncoder & aEncoder); @@ -78,8 +78,7 @@ CHIP_ERROR LocalizationConfigurationAttrAccess::ReadSupportedLocales(AttributeVa return err; } -CHIP_ERROR LocalizationConfigurationAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR LocalizationConfigurationAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { VerifyOrDie(aPath.mClusterId == LocalizationConfiguration::Id); diff --git a/src/app/clusters/media-input-server/media-input-server.cpp b/src/app/clusters/media-input-server/media-input-server.cpp index 11f89a526661cb..bc2ceb9dccb952 100644 --- a/src/app/clusters/media-input-server/media-input-server.cpp +++ b/src/app/clusters/media-input-server/media-input-server.cpp @@ -92,8 +92,7 @@ class MediaInputAttrAccess : public app::AttributeAccessInterface public: MediaInputAttrAccess() : app::AttributeAccessInterface(Optional::Missing(), chip::app::Clusters::MediaInput::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override; private: CHIP_ERROR ReadInputListAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate); @@ -102,8 +101,7 @@ class MediaInputAttrAccess : public app::AttributeAccessInterface MediaInputAttrAccess gMediaInputAttrAccess; -CHIP_ERROR MediaInputAttrAccess::Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) +CHIP_ERROR MediaInputAttrAccess::Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) { EndpointId endpoint = aPath.mEndpointId; Delegate * delegate = GetDelegate(endpoint); diff --git a/src/app/clusters/media-playback-server/media-playback-server.cpp b/src/app/clusters/media-playback-server/media-playback-server.cpp index e6b64460da46d4..9a22d9cf42d6c8 100644 --- a/src/app/clusters/media-playback-server/media-playback-server.cpp +++ b/src/app/clusters/media-playback-server/media-playback-server.cpp @@ -110,8 +110,7 @@ class MediaPlaybackAttrAccess : public app::AttributeAccessInterface public: MediaPlaybackAttrAccess() : app::AttributeAccessInterface(Optional::Missing(), MediaPlayback::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override; private: CHIP_ERROR ReadCurrentStateAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate); @@ -125,8 +124,7 @@ class MediaPlaybackAttrAccess : public app::AttributeAccessInterface MediaPlaybackAttrAccess gMediaPlaybackAttrAccess; -CHIP_ERROR MediaPlaybackAttrAccess::Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) +CHIP_ERROR MediaPlaybackAttrAccess::Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) { EndpointId endpoint = aPath.mEndpointId; Delegate * delegate = GetDelegate(endpoint); diff --git a/src/app/clusters/mode-select-server/mode-select-server.cpp b/src/app/clusters/mode-select-server/mode-select-server.cpp index 2f8bbb8b389305..67fd8e4718ede5 100644 --- a/src/app/clusters/mode-select-server/mode-select-server.cpp +++ b/src/app/clusters/mode-select-server/mode-select-server.cpp @@ -42,13 +42,12 @@ class ModeSelectAttrAccess : public AttributeAccessInterface public: ModeSelectAttrAccess() : AttributeAccessInterface(Optional::Missing(), ModeSelect::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; }; ModeSelectAttrAccess gModeSelectAttrAccess; -CHIP_ERROR ModeSelectAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR ModeSelectAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { VerifyOrDie(aPath.mClusterId == ModeSelect::Id); diff --git a/src/app/clusters/network-commissioning-old/network-commissioning-ember.cpp b/src/app/clusters/network-commissioning-old/network-commissioning-ember.cpp index cddd2b7613def5..3904b7e0130e5a 100644 --- a/src/app/clusters/network-commissioning-old/network-commissioning-ember.cpp +++ b/src/app/clusters/network-commissioning-old/network-commissioning-ember.cpp @@ -53,7 +53,7 @@ class NetworkCommissioningAttributeAccess : public AttributeAccessInterface public: NetworkCommissioningAttributeAccess() : AttributeAccessInterface(Optional::Missing(), Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override { switch (aPath.mAttributeId) { diff --git a/src/app/clusters/network-commissioning/network-commissioning.cpp b/src/app/clusters/network-commissioning/network-commissioning.cpp index ceea07febfa6cf..2cdcaba762e6ff 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.cpp +++ b/src/app/clusters/network-commissioning/network-commissioning.cpp @@ -149,7 +149,7 @@ void Instance::InvokeCommand(HandlerContext & ctxt) } } -CHIP_ERROR Instance::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { switch (aPath.mAttributeId) { @@ -212,7 +212,7 @@ CHIP_ERROR Instance::Read(FabricIndex fabricIndex, const ConcreteReadAttributePa } } -CHIP_ERROR Instance::Write(FabricIndex fabricIndex, const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +CHIP_ERROR Instance::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { switch (aPath.mAttributeId) { diff --git a/src/app/clusters/network-commissioning/network-commissioning.h b/src/app/clusters/network-commissioning/network-commissioning.h index cf80a665bc732e..10b95a12cbe475 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.h +++ b/src/app/clusters/network-commissioning/network-commissioning.h @@ -50,8 +50,8 @@ class Instance : public CommandHandlerInterface, void InvokeCommand(HandlerContext & ctx) override; // AttributeAccessInterface - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(FabricIndex fabricIndex, const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; // WirelessDriver::ConnectCallback void OnResult(DeviceLayer::NetworkCommissioning::Status commissioningError, CharSpan errorText, diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index d35ce39ad78f8a..6d4655bddf00ca 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -89,7 +89,7 @@ class OperationalCredentialsAttrAccess : public AttributeAccessInterface AttributeAccessInterface(Optional::Missing(), Clusters::OperationalCredentials::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; private: CHIP_ERROR ReadNOCs(EndpointId endpoint, AttributeValueEncoder & aEncoder); @@ -193,8 +193,7 @@ CHIP_ERROR OperationalCredentialsAttrAccess::ReadRootCertificates(EndpointId end OperationalCredentialsAttrAccess gAttrAccess; -CHIP_ERROR OperationalCredentialsAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR OperationalCredentialsAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { VerifyOrDie(aPath.mClusterId == Clusters::OperationalCredentials::Id); diff --git a/src/app/clusters/ota-requestor/BDXDownloader.cpp b/src/app/clusters/ota-requestor/BDXDownloader.cpp index 31a77fdfef2c55..7f0be086aeed27 100644 --- a/src/app/clusters/ota-requestor/BDXDownloader.cpp +++ b/src/app/clusters/ota-requestor/BDXDownloader.cpp @@ -184,9 +184,7 @@ CHIP_ERROR BDXDownloader::HandleBdxEvent(const chip::bdx::TransferSession::Outpu case TransferSession::OutputEventType::kBlockReceived: { chip::ByteSpan blockData(outEvent.blockdata.Data, outEvent.blockdata.Length); ReturnErrorOnFailure(mImageProcessor->ProcessBlock(blockData)); - Nullable percent; - mImageProcessor->GetPercentComplete(percent); - mStateDelegate->OnUpdateProgressChanged(percent); + mStateDelegate->OnUpdateProgressChanged(mImageProcessor->GetPercentComplete()); // TODO: this will cause problems if Finalize() is not guaranteed to do its work after ProcessBlock(). if (outEvent.blockdata.IsEof) diff --git a/src/app/clusters/ota-requestor/OTARequestor.cpp b/src/app/clusters/ota-requestor/OTARequestor.cpp index 4a7fd2d4a367a9..f389e3534e9644 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.cpp +++ b/src/app/clusters/ota-requestor/OTARequestor.cpp @@ -511,8 +511,7 @@ void OTARequestor::RecordErrorUpdateState(UpdateFailureState failureState, CHIP_ // Log the DownloadError event OTAImageProcessorInterface * imageProcessor = mBdxDownloader->GetImageProcessorDelegate(); VerifyOrReturn(imageProcessor != nullptr); - Nullable progressPercent; - imageProcessor->GetPercentComplete(progressPercent); + Nullable progressPercent = imageProcessor->GetPercentComplete(); Nullable platformCode; OtaRequestorServerOnDownloadError(mTargetVersion, imageProcessor->GetBytesDownloaded(), progressPercent, platformCode); diff --git a/src/app/clusters/ota-requestor/ota-requestor-server.cpp b/src/app/clusters/ota-requestor/ota-requestor-server.cpp index 8e11584c61e066..b7916b643a6e04 100644 --- a/src/app/clusters/ota-requestor/ota-requestor-server.cpp +++ b/src/app/clusters/ota-requestor/ota-requestor-server.cpp @@ -43,14 +43,13 @@ class OtaSoftwareUpdateRequestorAttrAccess : public AttributeAccessInterface {} // TODO: Implement Read/Write for OtaSoftwareUpdateRequestorAttrAccess - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(FabricIndex fabricIndex, const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; }; OtaSoftwareUpdateRequestorAttrAccess gAttrAccess; -CHIP_ERROR OtaSoftwareUpdateRequestorAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR OtaSoftwareUpdateRequestorAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { switch (aPath.mAttributeId) { @@ -63,8 +62,7 @@ CHIP_ERROR OtaSoftwareUpdateRequestorAttrAccess::Read(FabricIndex fabricIndex, c return CHIP_NO_ERROR; } -CHIP_ERROR OtaSoftwareUpdateRequestorAttrAccess::Write(FabricIndex fabricIndex, const ConcreteDataAttributePath & aPath, - AttributeValueDecoder & aDecoder) +CHIP_ERROR OtaSoftwareUpdateRequestorAttrAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { switch (aPath.mAttributeId) { diff --git a/src/app/clusters/power-source-configuration-server/power-source-configuration-server.cpp b/src/app/clusters/power-source-configuration-server/power-source-configuration-server.cpp index 686a1a3f978380..6301b7fb98cc46 100644 --- a/src/app/clusters/power-source-configuration-server/power-source-configuration-server.cpp +++ b/src/app/clusters/power-source-configuration-server/power-source-configuration-server.cpp @@ -43,13 +43,12 @@ class PowerSourceConfigurationAttrAccess : public AttributeAccessInterface PowerSourceConfigurationAttrAccess() : AttributeAccessInterface(Optional::Missing(), PowerSourceConfiguration::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; }; PowerSourceConfigurationAttrAccess gAttrAccess; -CHIP_ERROR PowerSourceConfigurationAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR PowerSourceConfigurationAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/app/clusters/power-source-server/power-source-server.cpp b/src/app/clusters/power-source-server/power-source-server.cpp index 9a3145064064fa..95b19fd5be564a 100644 --- a/src/app/clusters/power-source-server/power-source-server.cpp +++ b/src/app/clusters/power-source-server/power-source-server.cpp @@ -40,13 +40,12 @@ class PowerSourceAttrAccess : public AttributeAccessInterface // Register on all endpoints. PowerSourceAttrAccess() : AttributeAccessInterface(Optional::Missing(), PowerSource::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; }; PowerSourceAttrAccess gAttrAccess; -CHIP_ERROR PowerSourceAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR PowerSourceAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp b/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp index 3f5f9d99a4c761..62f0f3a8b18704 100644 --- a/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp +++ b/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp @@ -44,7 +44,7 @@ class SoftwareDiagosticsAttrAccess : public AttributeAccessInterface // Register for the SoftwareDiagnostics cluster on all endpoints. SoftwareDiagosticsAttrAccess() : AttributeAccessInterface(Optional::Missing(), SoftwareDiagnostics::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; private: CHIP_ERROR ReadIfSupported(CHIP_ERROR (DiagnosticDataProvider::*getter)(uint64_t &), AttributeValueEncoder & aEncoder); @@ -53,8 +53,7 @@ class SoftwareDiagosticsAttrAccess : public AttributeAccessInterface SoftwareDiagosticsAttrAccess gAttrAccess; -CHIP_ERROR SoftwareDiagosticsAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR SoftwareDiagosticsAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { if (aPath.mClusterId != SoftwareDiagnostics::Id) { diff --git a/src/app/clusters/target-navigator-server/target-navigator-server.cpp b/src/app/clusters/target-navigator-server/target-navigator-server.cpp index c9c5f1fd344bf0..fef9de55a450b1 100644 --- a/src/app/clusters/target-navigator-server/target-navigator-server.cpp +++ b/src/app/clusters/target-navigator-server/target-navigator-server.cpp @@ -110,8 +110,7 @@ class TargetNavigatorAttrAccess : public app::AttributeAccessInterface public: TargetNavigatorAttrAccess() : app::AttributeAccessInterface(Optional::Missing(), TargetNavigator::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override; private: CHIP_ERROR ReadTargetListAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate); @@ -120,8 +119,7 @@ class TargetNavigatorAttrAccess : public app::AttributeAccessInterface TargetNavigatorAttrAccess gTargetNavigatorAttrAccess; -CHIP_ERROR TargetNavigatorAttrAccess::Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) +CHIP_ERROR TargetNavigatorAttrAccess::Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) { EndpointId endpoint = aPath.mEndpointId; Delegate * delegate = GetDelegate(endpoint); @@ -182,7 +180,7 @@ bool emberAfTargetNavigatorClusterNavigateTargetRequestCallback(app::CommandHand VerifyOrExit(isDelegateNull(delegate, endpoint) != true, err = CHIP_ERROR_INCORRECT_STATE); { - delegate->HandleNavigateTarget(responder, target, data); + delegate->HandleNavigateTarget(responder, target, data.HasValue() ? data.Value() : CharSpan()); } exit: diff --git a/src/app/clusters/test-cluster-server/test-cluster-server.cpp b/src/app/clusters/test-cluster-server/test-cluster-server.cpp index 87d0817f9e4ca0..fce8e432558bc3 100644 --- a/src/app/clusters/test-cluster-server/test-cluster-server.cpp +++ b/src/app/clusters/test-cluster-server/test-cluster-server.cpp @@ -71,8 +71,8 @@ class TestAttrAccess : public AttributeAccessInterface // Register for the Test Cluster cluster on all endpoints. TestAttrAccess() : AttributeAccessInterface(Optional::Missing(), TestCluster::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(FabricIndex fabricIndex, const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; private: CHIP_ERROR ReadListInt8uAttribute(AttributeValueEncoder & aEncoder); @@ -106,7 +106,7 @@ SimpleEnum gSimpleEnums[kAttributeListLength]; size_t gSimpleEnumCount = 0; Structs::NullablesAndOptionalsStruct::Type gNullablesAndOptionalsStruct; -CHIP_ERROR TestAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +CHIP_ERROR TestAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { switch (aPath.mAttributeId) { @@ -148,7 +148,7 @@ CHIP_ERROR TestAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttri return CHIP_NO_ERROR; } -CHIP_ERROR TestAttrAccess::Write(FabricIndex fabricIndex, const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +CHIP_ERROR TestAttrAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { switch (aPath.mAttributeId) { diff --git a/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp b/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp index 2c91ff512bd186..8e5ff031f72d16 100644 --- a/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp +++ b/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp @@ -46,13 +46,12 @@ class ThreadDiagosticsAttrAccess : public AttributeAccessInterface // Register for the ThreadNetworkDiagnostics cluster on all endpoints. ThreadDiagosticsAttrAccess() : AttributeAccessInterface(Optional::Missing(), ThreadNetworkDiagnostics::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; }; ThreadDiagosticsAttrAccess gAttrAccess; -CHIP_ERROR ThreadDiagosticsAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR ThreadDiagosticsAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { if (aPath.mClusterId != ThreadNetworkDiagnostics::Id) { diff --git a/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp b/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp index 974e33c5b992fa..8a68136829faa6 100644 --- a/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp +++ b/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp @@ -46,7 +46,7 @@ class TimeFormatLocalizationAttrAccess : public AttributeAccessInterface // Register for the Time Format Localization cluster on all endpoints. TimeFormatLocalizationAttrAccess() : AttributeAccessInterface(Optional::Missing(), TimeFormatLocalization::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; private: CHIP_ERROR ReadSupportedCalendarTypes(AttributeValueEncoder & aEncoder); @@ -78,8 +78,7 @@ CHIP_ERROR TimeFormatLocalizationAttrAccess::ReadSupportedCalendarTypes(Attribut return err; } -CHIP_ERROR TimeFormatLocalizationAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR TimeFormatLocalizationAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { VerifyOrDie(aPath.mClusterId == TimeFormatLocalization::Id); diff --git a/src/app/clusters/user-label-server/user-label-server.cpp b/src/app/clusters/user-label-server/user-label-server.cpp index 307a0c4ddbe139..311eb8027c10b0 100644 --- a/src/app/clusters/user-label-server/user-label-server.cpp +++ b/src/app/clusters/user-label-server/user-label-server.cpp @@ -44,8 +44,8 @@ class UserLabelAttrAccess : public AttributeAccessInterface // Register for the User Label cluster on all endpoints. UserLabelAttrAccess() : AttributeAccessInterface(Optional::Missing(), UserLabel::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(FabricIndex fabricIndex, const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; private: CHIP_ERROR ReadLabelList(EndpointId endpoint, AttributeValueEncoder & aEncoder); @@ -96,8 +96,7 @@ CHIP_ERROR UserLabelAttrAccess::WriteLabelList(EndpointId endpoint, AttributeVal return DeviceLayer::PlatformMgr().SetUserLabelList(endpoint, labelList); } -CHIP_ERROR UserLabelAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR UserLabelAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { VerifyOrDie(aPath.mClusterId == UserLabel::Id); @@ -111,8 +110,7 @@ CHIP_ERROR UserLabelAttrAccess::Read(FabricIndex fabricIndex, const ConcreteRead return CHIP_NO_ERROR; } -CHIP_ERROR UserLabelAttrAccess::Write(FabricIndex fabricIndex, const ConcreteDataAttributePath & aPath, - AttributeValueDecoder & aDecoder) +CHIP_ERROR UserLabelAttrAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { VerifyOrDie(aPath.mClusterId == UserLabel::Id); diff --git a/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp b/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp index 45e8980a4ee469..658430cc873c1b 100644 --- a/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp +++ b/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp @@ -93,8 +93,7 @@ class WakeOnLanAttrAccess : public app::AttributeAccessInterface public: WakeOnLanAttrAccess() : app::AttributeAccessInterface(Optional::Missing(), chip::app::Clusters::WakeOnLan::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override; private: CHIP_ERROR ReadMacAddressAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate); @@ -102,8 +101,7 @@ class WakeOnLanAttrAccess : public app::AttributeAccessInterface WakeOnLanAttrAccess gWakeOnLanAttrAccess; -CHIP_ERROR WakeOnLanAttrAccess::Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) +CHIP_ERROR WakeOnLanAttrAccess::Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) { EndpointId endpoint = aPath.mEndpointId; Delegate * delegate = GetDelegate(endpoint); diff --git a/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp b/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp index 6a7704ed6a4953..6149efe26b8f72 100644 --- a/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp +++ b/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp @@ -44,7 +44,7 @@ class WiFiDiagosticsAttrAccess : public AttributeAccessInterface // Register for the WiFiNetworkDiagnostics cluster on all endpoints. WiFiDiagosticsAttrAccess() : AttributeAccessInterface(Optional::Missing(), WiFiNetworkDiagnostics::Id) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; private: template @@ -91,8 +91,7 @@ CHIP_ERROR WiFiDiagosticsAttrAccess::ReadWiFiBssId(AttributeValueEncoder & aEnco WiFiDiagosticsAttrAccess gAttrAccess; -CHIP_ERROR WiFiDiagosticsAttrAccess::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR WiFiDiagosticsAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { if (aPath.mClusterId != WiFiNetworkDiagnostics::Id) { diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 61fdb72285c2f3..a732e3513ab486 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -702,35 +702,17 @@ const EmberAfCluster * emberAfFindClusterInType(const EmberAfEndpointType * endp return NULL; } -uint8_t emberAfClusterIndexInMatchingEndpoints(EndpointId endpoint, ClusterId clusterId, EmberAfClusterMask mask) -{ - uint8_t ep; - uint8_t index = 0xFF; - for (ep = 0; ep < emberAfEndpointCount(); ep++) - { - const EmberAfEndpointType * endpointType = emAfEndpoints[ep].endpointType; - if (emberAfFindClusterInType(endpointType, clusterId, mask) != NULL) - { - index++; - if (emAfEndpoints[ep].endpoint == endpoint) - { - return index; - } - } - } - return 0xFF; -} - uint8_t emberAfClusterIndex(EndpointId endpoint, ClusterId clusterId, EmberAfClusterMask mask) { - uint8_t ep; - uint8_t index = 0xFF; - for (ep = 0; ep < emberAfEndpointCount(); ep++) + for (uint8_t ep = 0; ep < emberAfEndpointCount(); ep++) { - const EmberAfEndpointType * endpointType = emAfEndpoints[ep].endpointType; - if (emberAfFindClusterInType(endpointType, clusterId, mask, &index) != NULL) + // Check the endpoint id first, because that way we avoid examining the + // endpoint type for endpoints that are not actually defined. + if (emAfEndpoints[ep].endpoint == endpoint) { - if (emAfEndpoints[ep].endpoint == endpoint) + const EmberAfEndpointType * endpointType = emAfEndpoints[ep].endpointType; + uint8_t index = 0xFF; + if (emberAfFindClusterInType(endpointType, clusterId, mask, &index) != NULL) { return index; } diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 6a4e4d079a4ab1..1dcfbb5a9db4ea 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -145,20 +145,6 @@ const EmberAfEndpointType * emberAfFindEndpointType(chip::EndpointId endpointId) const EmberAfCluster * emberAfFindClusterInType(const EmberAfEndpointType * endpointType, chip::ClusterId clusterId, EmberAfClusterMask mask, uint8_t * index = nullptr); -// For a given cluster and mask, retrieves the list of endpoints sorted by endpoint that contain the matching cluster and returns -// the index within that list that matches the given endpoint. -// -// Mask is either CLUSTER_MASK_CLIENT or CLUSTER_MASK_SERVER -// For example, if you have 3 endpoints, 10, 11, 12, and cluster X server is -// located on 11 and 12, and cluster Y server is located only on 10 then -// clusterIndex(X,11,CLUSTER_MASK_SERVER) returns 0, -// clusterIndex(X,12,CLUSTER_MASK_SERVER) returns 1, -// clusterIndex(X,10,CLUSTER_MASK_SERVER) returns 0xFF -// clusterIndex(Y,10,CLUSTER_MASK_SERVER) returns 0 -// clusterIndex(Y,11,CLUSTER_MASK_SERVER) returns 0xFF -// clusterIndex(Y,12,CLUSTER_MASK_SERVER) returns 0xFF -uint8_t emberAfClusterIndexInMatchingEndpoints(chip::EndpointId endpoint, chip::ClusterId clusterId, EmberAfClusterMask mask); - // // Given a cluster ID, endpoint ID and a cluster mask, finds a matching cluster within that endpoint // with a matching mask. If one is found, the relative index of that cluster within the list of clusters on that @@ -239,6 +225,8 @@ void emberAfClusterMessageSentCallback(const chip::MessageSendDestination & dest // returns true if the mask matches a passed interval bool emberAfCheckTick(EmberAfClusterMask mask, uint8_t passedMask); +// Check whether there is an endpoint defined with the given endpoint id that is +// enabled. bool emberAfEndpointIsEnabled(chip::EndpointId endpoint); // Note the difference in implementation from emberAfGetNthCluster(). diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index 6b720cc77265c6..f2b39780d5e003 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -340,11 +340,10 @@ class GlobalAttributeReader : public MandatoryGlobalAttributeReader public: GlobalAttributeReader(const EmberAfCluster * aCluster) : MandatoryGlobalAttributeReader(aCluster) {} - CHIP_ERROR Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; }; -CHIP_ERROR GlobalAttributeReader::Read(FabricIndex fabricIndex, const ConcreteReadAttributePath & aPath, - AttributeValueEncoder & aEncoder) +CHIP_ERROR GlobalAttributeReader::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { using namespace Clusters::Globals::Attributes; // The id of the attributes below is not in the attribute metadata. @@ -407,7 +406,7 @@ CHIP_ERROR ReadViaAccessInterface(FabricIndex aAccessingFabricIndex, bool aIsFab DataVersion version = kUndefinedDataVersion; ReturnErrorOnFailure(ReadClusterDataVersion(aPath.mEndpointId, aPath.mClusterId, version)); AttributeValueEncoder valueEncoder(aAttributeReports, aAccessingFabricIndex, aPath, version, aIsFabricFiltered, state); - CHIP_ERROR err = aAccessInterface->Read(aAccessingFabricIndex, aPath, valueEncoder); + CHIP_ERROR err = aAccessInterface->Read(aPath, valueEncoder); if (err != CHIP_NO_ERROR) { @@ -952,7 +951,7 @@ CHIP_ERROR WriteSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, if (auto * attrOverride = findAttributeAccessOverride(aClusterInfo.mEndpointId, aClusterInfo.mClusterId)) { AttributeValueDecoder valueDecoder(aReader, aSubjectDescriptor); - ReturnErrorOnFailure(attrOverride->Write(aSubjectDescriptor.fabricIndex, aPath, valueDecoder)); + ReturnErrorOnFailure(attrOverride->Write(aPath, valueDecoder)); if (valueDecoder.TriedDecode()) { diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index cd51c4f027ab26..9cb0fa6a172cce 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -212,6 +212,11 @@ uint8_t emberAfClusterIndex(chip::EndpointId endpoint, chip::ClusterId cluster, return UINT8_MAX; } +bool emberAfEndpointIndexIsEnabled(uint16_t index) +{ + return index < ArraySize(endpoints); +} + // This duplication of basic utilities is really unfortunate, but we can't link // to the normal attribute-storage.cpp because we redefine some of its symbols // above. diff --git a/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml index 16d96e1c1e9a90..1ff6f383c5b3a7 100644 --- a/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml @@ -24,14 +24,15 @@ limitations under the License. true true This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. - vendor name - vendor id - application name - product id - application app - application status - application version - allowed vendor list + vendor name + vendor id + application name + product id + application app + application status + application version + allowed vendor list + diff --git a/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml index 14ee57f72f0110..5a7257ed735478 100644 --- a/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml @@ -25,23 +25,23 @@ limitations under the License. true This cluster provides an interface for launching content on a media player device such as a TV or Speaker. - application launcher list - application launcher app + application launcher list + application launcher app Upon receipt, this SHALL launch the specified app with optional data. The TV Device SHALL launch and bring to foreground the identified application in the command if the application is not already launched and in foreground. The TV Device SHALL update state attribute on the Application Basic cluster of the Endpoint corresponding to the launched application. This command returns a Launch Response. - - + + Upon receipt on a Video Player endpoint this SHALL stop the specified application if it is running. - + Upon receipt on a Video Player endpoint this SHALL hide the specified application if it is running and visible. - + @@ -55,7 +55,7 @@ limitations under the License. - + diff --git a/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml index 27f92dbb34554d..a385a0836739dc 100644 --- a/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml @@ -25,8 +25,8 @@ limitations under the License. true This cluster provides an interface for controlling the Output on a media device such as a TV. - audio output list - current audio output + audio output list + current audio output Upon receipt, this SHALL change the output on the media device to the output at a specific index in the Output List. diff --git a/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml index 66d3cf33f5f6f3..b7023d15ceb2b4 100644 --- a/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml @@ -16,22 +16,27 @@ limitations under the License. --> - - - - - - - - - General Binding 0x001e BINDING_CLUSTER + true + true The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. - binding list + + Add a binding + + + + + + + Remove a binding + + + + + - - + \ No newline at end of file diff --git a/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml index b5284916f1e0d5..c3fdd78244732f 100644 --- a/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml @@ -25,9 +25,9 @@ limitations under the License. true This cluster provides an interface for controlling the current Channel on a device. - channel list - channel lineup - current channel + channel list + channel lineup + current channel Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. @@ -48,25 +48,25 @@ limitations under the License. Upon receipt, this SHALL display the active status of the input list on screen. - + - - - - - + + + + + - - - + + + @@ -84,7 +84,7 @@ limitations under the License. - + diff --git a/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml index d42d97d0622b9b..69b5f117abbcfb 100644 --- a/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml @@ -26,27 +26,27 @@ limitations under the License. This cluster provides an interface for launching content on a media player device such as a TV or Speaker. - accept header list - supported streaming protocols + accept header list + supported streaming protocols Upon receipt, this SHALL launch the specified content with optional search criteria. - - + + Upon receipt, this SHALL launch content from the specified URL. - - + + This command SHALL be generated in response to LaunchContent command. - + @@ -77,19 +77,19 @@ limitations under the License. - - - + + + - - - - - + + + + + @@ -121,7 +121,7 @@ limitations under the License. - + diff --git a/src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml index f4a3962e9ac8d2..3b6ae576ef1135 100644 --- a/src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml @@ -25,8 +25,8 @@ limitations under the License. true This cluster provides an interface for controlling the Input Selector on a media device such as a TV. - media input list - current media input + media input list + current media input Upon receipt, this SHALL change the input on the media device to the input at a specific index in the Input List. diff --git a/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml index e9b4dde1249ef6..89b15795c054ce 100644 --- a/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml @@ -26,13 +26,13 @@ limitations under the License. This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. - playback state - start time - duration - position - playback speed - seek range end - seek range start + playback state + start time + duration + position + playback speed + seek range end + seek range start @@ -47,37 +47,37 @@ limitations under the License. Upon receipt, this SHALL stop media. User experience is context-specific. This will often navigate the user back to the location where media was originally launched. - + Upon receipt, this SHALL Start Over with the current media playback item. - + Upon receipt, this SHALL cause the handler to be invoked for "Previous". User experience is context-specific. This will often Go back to the previous media playback item. - + Upon receipt, this SHALL cause the handler to be invoked for "Next". User experience is context-specific. This will often Go forward to the next media playback item. - + Upon receipt, this SHALL Rewind through media. Different Rewind speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). - + Upon receipt, this SHALL Advance through media. Different FF speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). - + Upon receipt, this SHALL Skip forward in the media by the given number of seconds, using the data as follows: - + Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: - + Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: @@ -92,7 +92,7 @@ limitations under the License. - + diff --git a/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml index 49bcfe104bfc3d..ef2729608a6044 100644 --- a/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml @@ -25,19 +25,19 @@ limitations under the License. true This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. - target navigator list - current navigator target + target navigator list + current navigator target Upon receipt, this SHALL navigation the UX to the target identified. - + This command SHALL be generated in response to NavigateTarget commands. - + diff --git a/src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml index 903799c69c539c..a608b291a1ee13 100644 --- a/src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml @@ -24,6 +24,6 @@ limitations under the License. true true This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. - wake on lan mac address + wake on lan mac address \ No newline at end of file diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 1e4fb605f75dc5..7fc59e44864572 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -932,6 +932,19 @@ CHIP_ERROR DeviceCommissioner::Commission(NodeId remoteDeviceId, CommissioningPa return CHIP_NO_ERROR; } +CHIP_ERROR DeviceCommissioner::GetAttestationChallenge(ByteSpan & attestationChallenge) +{ + Optional secureSessionHandle; + + VerifyOrReturnError(mDeviceBeingCommissioned != nullptr, CHIP_ERROR_INCORRECT_STATE); + + secureSessionHandle = mDeviceBeingCommissioned->GetSecureSession(); + VerifyOrReturnError(secureSessionHandle.HasValue(), CHIP_ERROR_INCORRECT_STATE); + + attestationChallenge = secureSessionHandle.Value()->AsSecureSession()->GetCryptoContext().GetAttestationChallenge(); + return CHIP_NO_ERROR; +} + CHIP_ERROR DeviceCommissioner::StopPairing(NodeId remoteDeviceId) { VerifyOrReturnError(mState == State::Initialized, CHIP_ERROR_INCORRECT_STATE); diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 81170a48df4376..f05ba0a840bd98 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -531,6 +531,16 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, CHIP_ERROR GetConnectedDevice(NodeId deviceId, chip::Callback::Callback * onConnection, chip::Callback::Callback * onFailure) override; + /** + * @brief + * This function returns the attestation challenge for the secure session of the device being commissioned. + * + * @param[out] attestationChallenge The output for the attestationChallenge + * + * @return CHIP_ERROR CHIP_NO_ERROR on success, or CHIP_ERROR_INVALID_ARGUMENT if no secure session is active + */ + CHIP_ERROR GetAttestationChallenge(ByteSpan & attestationChallenge); + /** * @brief * This function stops a pairing process that's in progress. It does not delete the pairing of a previously diff --git a/src/controller/ExampleOperationalCredentialsIssuer.cpp b/src/controller/ExampleOperationalCredentialsIssuer.cpp index ff94a229009d1f..19db629fb5c803 100644 --- a/src/controller/ExampleOperationalCredentialsIssuer.cpp +++ b/src/controller/ExampleOperationalCredentialsIssuer.cpp @@ -52,10 +52,10 @@ CHIP_ERROR ExampleOperationalCredentialsIssuer::Initialize(PersistentStorageDele ReturnErrorOnFailure(ASN1ToChipEpochTime(effectiveTime, mNow)); Crypto::P256SerializedKeypair serializedKey; - uint16_t keySize = static_cast(sizeof(serializedKey)); + uint16_t keySize = static_cast(serializedKey.Capacity()); PERSISTENT_KEY_OP(mIndex, kOperationalCredentialsIssuerKeypairStorage, key, - err = storage.SyncGetKeyValue(key, &serializedKey, keySize)); + err = storage.SyncGetKeyValue(key, serializedKey.Bytes(), keySize)); serializedKey.SetLength(keySize); if (err != CHIP_NO_ERROR) @@ -65,10 +65,10 @@ CHIP_ERROR ExampleOperationalCredentialsIssuer::Initialize(PersistentStorageDele ReturnErrorOnFailure(mIssuer.Initialize()); ReturnErrorOnFailure(mIssuer.Serialize(serializedKey)); - keySize = static_cast(sizeof(serializedKey)); + keySize = static_cast(serializedKey.Capacity()); PERSISTENT_KEY_OP(mIndex, kOperationalCredentialsIssuerKeypairStorage, key, - ReturnErrorOnFailure(storage.SyncSetKeyValue(key, &serializedKey, keySize))); + ReturnErrorOnFailure(storage.SyncSetKeyValue(key, serializedKey.Bytes(), keySize))); } else { @@ -76,10 +76,10 @@ CHIP_ERROR ExampleOperationalCredentialsIssuer::Initialize(PersistentStorageDele ReturnErrorOnFailure(mIssuer.Deserialize(serializedKey)); } - keySize = static_cast(sizeof(serializedKey)); + keySize = static_cast(serializedKey.Capacity()); PERSISTENT_KEY_OP(mIndex, kOperationalCredentialsIntermediateIssuerKeypairStorage, key, - err = storage.SyncGetKeyValue(key, &serializedKey, keySize)); + err = storage.SyncGetKeyValue(key, serializedKey.Bytes(), keySize)); serializedKey.SetLength(keySize); if (err != CHIP_NO_ERROR) @@ -90,10 +90,10 @@ CHIP_ERROR ExampleOperationalCredentialsIssuer::Initialize(PersistentStorageDele ReturnErrorOnFailure(mIntermediateIssuer.Initialize()); ReturnErrorOnFailure(mIntermediateIssuer.Serialize(serializedKey)); - keySize = static_cast(sizeof(serializedKey)); + keySize = static_cast(serializedKey.Capacity()); PERSISTENT_KEY_OP(mIndex, kOperationalCredentialsIntermediateIssuerKeypairStorage, key, - ReturnErrorOnFailure(storage.SyncSetKeyValue(key, &serializedKey, keySize))); + ReturnErrorOnFailure(storage.SyncSetKeyValue(key, serializedKey.Bytes(), keySize))); } else { diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 9db8a7056202b5..fd543624842f09 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -178,7 +178,7 @@ client cluster ApplicationLauncher = 1292 { struct ApplicationEP { Application application = 0; - CHAR_STRING endpoint = 1; + optional ENDPOINT_NO endpoint = 1; } struct Application { @@ -187,7 +187,7 @@ client cluster ApplicationLauncher = 1292 { } readonly attribute INT16U applicationLauncherList[] = 0; - attribute ApplicationEP applicationLauncherApp = 1; + attribute nullable ApplicationEP applicationLauncherApp = 1; readonly global attribute command_id serverGeneratedCommandList[] = 65528; readonly global attribute command_id clientGeneratedCommandList[] = 65529; readonly global attribute attrib_id attributeList[] = 65531; @@ -199,7 +199,7 @@ client cluster ApplicationLauncher = 1292 { request struct LaunchAppRequestRequest { Application application = 0; - OCTET_STRING data = 1; + optional OCTET_STRING data = 1; } request struct StopAppRequestRequest { @@ -325,18 +325,27 @@ client cluster BinaryInputBasic = 15 { } client cluster Binding = 30 { - struct BindingEntry { + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; + + request struct BindRequest { NODE_ID nodeId = 0; GROUP_ID groupId = 1; ENDPOINT_NO endpointId = 2; CLUSTER_ID clusterId = 3; } - attribute BindingEntry bindingList[] = 0; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; } client cluster BooleanState = 69 { @@ -559,21 +568,21 @@ client cluster Channel = 1284 { struct ChannelInfo { INT16U majorNumber = 0; INT16U minorNumber = 1; - CHAR_STRING<32> name = 2; - CHAR_STRING<32> callSign = 3; - CHAR_STRING<32> affiliateCallSign = 4; + optional CHAR_STRING<32> name = 2; + optional CHAR_STRING<32> callSign = 3; + optional CHAR_STRING<32> affiliateCallSign = 4; } struct LineupInfo { CHAR_STRING operatorName = 0; - CHAR_STRING lineupName = 1; - CHAR_STRING postalCode = 2; + optional CHAR_STRING lineupName = 1; + optional CHAR_STRING postalCode = 2; LineupInfoTypeEnum lineupInfoType = 3; } readonly attribute ChannelInfo channelList[] = 0; - attribute LineupInfo channelLineup = 1; - attribute ChannelInfo currentChannel = 2; + readonly attribute nullable LineupInfo channelLineup = 1; + readonly attribute nullable ChannelInfo currentChannel = 2; readonly global attribute command_id serverGeneratedCommandList[] = 65528; readonly global attribute command_id clientGeneratedCommandList[] = 65529; readonly global attribute attrib_id attributeList[] = 65531; @@ -935,7 +944,7 @@ client cluster ContentLauncher = 1290 { struct Parameter { ParameterEnum type = 0; CHAR_STRING value = 1; - AdditionalInfo externalIDList[] = 2; + optional AdditionalInfo externalIDList[] = 2; } struct AdditionalInfo { @@ -945,17 +954,17 @@ client cluster ContentLauncher = 1290 { struct BrandingInformation { CHAR_STRING providerName = 0; - StyleInformation background = 1; - StyleInformation logo = 2; - StyleInformation progressBar = 3; - StyleInformation splash = 4; - StyleInformation waterMark = 5; + optional StyleInformation background = 1; + optional StyleInformation logo = 2; + optional StyleInformation progressBar = 3; + optional StyleInformation splash = 4; + optional StyleInformation waterMark = 5; } struct StyleInformation { - CHAR_STRING imageUrl = 0; - CHAR_STRING color = 1; - Dimension size = 2; + optional CHAR_STRING imageUrl = 0; + optional CHAR_STRING color = 1; + optional Dimension size = 2; } struct Dimension { @@ -972,20 +981,20 @@ client cluster ContentLauncher = 1290 { readonly global attribute int16u clusterRevision = 65533; request struct LaunchContentRequestRequest { - BOOLEAN autoPlay = 0; - CHAR_STRING data = 1; - ContentSearch search[] = 2; + ContentSearch search[] = 0; + BOOLEAN autoPlay = 1; + optional CHAR_STRING data = 2; } request struct LaunchURLRequestRequest { CHAR_STRING contentURL = 0; - CHAR_STRING displayString = 1; - BrandingInformation brandingInformation = 2; + optional CHAR_STRING displayString = 1; + optional BrandingInformation brandingInformation = 2; } response struct LaunchResponse { StatusEnum status = 0; - CHAR_STRING data = 1; + optional CHAR_STRING data = 1; } command LaunchContentRequest(LaunchContentRequestRequest): LaunchResponse = 0; @@ -2299,16 +2308,16 @@ client cluster MediaPlayback = 1286 { struct PlaybackPosition { INT64U updatedAt = 0; - INT64U position = 1; + nullable INT64U position = 1; } readonly attribute PlaybackStateEnum playbackState = 0; - readonly attribute epoch_us startTime = 1; - readonly attribute int64u duration = 2; - attribute PlaybackPosition position = 3; + readonly attribute nullable epoch_us startTime = 1; + readonly attribute nullable int64u duration = 2; + readonly attribute PlaybackPosition position = 3; readonly attribute single playbackSpeed = 4; - readonly attribute int64u seekRangeEnd = 5; - readonly attribute int64u seekRangeStart = 6; + readonly attribute nullable int64u seekRangeEnd = 5; + readonly attribute nullable int64u seekRangeStart = 6; readonly global attribute command_id serverGeneratedCommandList[] = 65528; readonly global attribute command_id clientGeneratedCommandList[] = 65529; readonly global attribute attrib_id attributeList[] = 65531; @@ -3226,12 +3235,12 @@ client cluster TargetNavigator = 1285 { request struct NavigateTargetRequestRequest { INT8U target = 0; - CHAR_STRING data = 1; + optional CHAR_STRING data = 1; } response struct NavigateTargetResponse { StatusEnum status = 0; - CHAR_STRING data = 1; + optional CHAR_STRING data = 1; } command NavigateTargetRequest(NavigateTargetRequestRequest): NavigateTargetResponse = 0; diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 01203314f00425..d7583dabb2d8e5 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -1935,6 +1935,24 @@ "define": "BINDING_CLUSTER", "side": "client", "enabled": 1, + "commands": [ + { + "name": "Bind", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Unbind", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], "attributes": [ { "name": "ClusterRevision", @@ -1962,21 +1980,6 @@ "enabled": 0, "commands": [], "attributes": [ - { - "name": "binding list", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "ServerGeneratedCommandList", "code": 65528, @@ -17945,4 +17948,4 @@ } ], "log": [] -} +} \ No newline at end of file diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index 73849bd74ce3d4..09a79d386677cf 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -572,6 +572,37 @@ JNI_METHOD(jboolean, openPairingWindowWithPIN) return true; } +JNI_METHOD(jbyteArray, getAttestationChallenge) +(JNIEnv * env, jobject self, jlong handle, jlong devicePtr) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + ByteSpan attestationChallenge; + jbyteArray attestationChallengeJbytes = nullptr; + + DeviceProxy * chipDevice = reinterpret_cast(devicePtr); + if (chipDevice == nullptr) + { + ChipLogProgress(Controller, "Could not cast device pointer to Device object"); + JniReferences::GetInstance().ThrowError(env, sChipDeviceControllerExceptionCls, CHIP_ERROR_INCORRECT_STATE); + } + + AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); + err = wrapper->Controller()->GetAttestationChallenge(attestationChallenge); + SuccessOrExit(err); + + err = JniReferences::GetInstance().N2J_ByteArray(env, attestationChallenge.data(), sizeof(attestationChallenge.data()), + attestationChallengeJbytes); + SuccessOrExit(err); + +exit: + if (err != CHIP_NO_ERROR) + { + JniReferences::GetInstance().ThrowError(env, sChipDeviceControllerExceptionCls, err); + } + return attestationChallengeJbytes; +} + JNI_METHOD(void, deleteDeviceController)(JNIEnv * env, jobject self, jlong handle) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index 1e47838e2df2e7..ef36c3e8e91b44 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -300,6 +300,17 @@ public void shutdownSubscriptions(long devicePtr) { shutdownSubscriptions(deviceControllerPtr, devicePtr); } + /** + * Returns an attestation challenge for the given device, for which there must be an existing + * secure session. + * + * @param devicePtr a pointer to the device from which to retrieve the challenge + * @throws ChipDeviceControllerException if there is no secure session for the given device + */ + public byte[] getAttestationChallenge(long devicePtr) { + return getAttestationChallenge(deviceControllerPtr, devicePtr); + } + /** Subscribe to the given attribute path. */ public void subscribeToPath( SubscriptionEstablishedCallback subscriptionEstablishedCallback, @@ -417,6 +428,8 @@ private native boolean openPairingWindowWithPIN( private native boolean isActive(long deviceControllerPtr, long deviceId); + private native byte[] getAttestationChallenge(long deviceControllerPtr, long devicePtr); + private native void shutdownSubscriptions(long deviceControllerPtr, long devicePtr); static { diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 9495f2414bc45e..ddf62dcc25bddb 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -857,56 +857,75 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - jobject value_application; - jobject value_application_catalogVendorId; - std::string value_application_catalogVendorIdClassName = "java/lang/Integer"; - std::string value_application_catalogVendorIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_application_catalogVendorIdClassName.c_str(), value_application_catalogVendorIdCtorSignature.c_str(), - cppValue.application.catalogVendorId, value_application_catalogVendorId); - jobject value_application_applicationId; - value_application_applicationId = env->NewStringUTF( - std::string(cppValue.application.applicationId.data(), cppValue.application.applicationId.size()).c_str()); - - jclass applicationStructClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplication", applicationStructClass); - if (err != CHIP_NO_ERROR) + if (cppValue.IsNull()) { - ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationLauncherClusterApplication"); - return nullptr; + value = nullptr; } - jmethodID applicationStructCtor = - env->GetMethodID(applicationStructClass, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); - if (applicationStructCtor == nullptr) + else { - ChipLogError(Zcl, "Could not find ChipStructs$ApplicationLauncherClusterApplication constructor"); - return nullptr; - } + jobject value_application; + jobject value_application_catalogVendorId; + std::string value_application_catalogVendorIdClassName = "java/lang/Integer"; + std::string value_application_catalogVendorIdCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + value_application_catalogVendorIdClassName.c_str(), value_application_catalogVendorIdCtorSignature.c_str(), + cppValue.Value().application.catalogVendorId, value_application_catalogVendorId); + jobject value_application_applicationId; + value_application_applicationId = env->NewStringUTF(std::string(cppValue.Value().application.applicationId.data(), + cppValue.Value().application.applicationId.size()) + .c_str()); + + jclass applicationStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplication", applicationStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationLauncherClusterApplication"); + return nullptr; + } + jmethodID applicationStructCtor = + env->GetMethodID(applicationStructClass, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); + if (applicationStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ApplicationLauncherClusterApplication constructor"); + return nullptr; + } - value_application = env->NewObject(applicationStructClass, applicationStructCtor, value_application_catalogVendorId, - value_application_applicationId); - jobject value_endpoint; - value_endpoint = env->NewStringUTF(std::string(cppValue.endpoint.data(), cppValue.endpoint.size()).c_str()); + value_application = env->NewObject(applicationStructClass, applicationStructCtor, value_application_catalogVendorId, + value_application_applicationId); + jobject value_endpoint; + if (!cppValue.Value().endpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endpoint); + } + else + { + std::string value_endpointClassName = "java/lang/Integer"; + std::string value_endpointCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + value_endpointClassName.c_str(), value_endpointCtorSignature.c_str(), cppValue.Value().endpoint.Value(), + value_endpoint); + } - jclass applicationEPStructClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationEP", applicationEPStructClass); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationLauncherClusterApplicationEP"); - return nullptr; - } - jmethodID applicationEPStructCtor = - env->GetMethodID(applicationEPStructClass, "", - "(Lchip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplication;Ljava/lang/String;)V"); - if (applicationEPStructCtor == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ApplicationLauncherClusterApplicationEP constructor"); - return nullptr; - } + jclass applicationEPStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationEP", applicationEPStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationLauncherClusterApplicationEP"); + return nullptr; + } + jmethodID applicationEPStructCtor = env->GetMethodID( + applicationEPStructClass, "", + "(Lchip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplication;Ljava/util/Optional;)V"); + if (applicationEPStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ApplicationLauncherClusterApplicationEP constructor"); + return nullptr; + } - value = env->NewObject(applicationEPStructClass, applicationEPStructCtor, value_application, value_endpoint); + value = env->NewObject(applicationEPStructClass, applicationEPStructCtor, value_application, value_endpoint); + } return value; } case Attributes::ServerGeneratedCommandList::Id: { @@ -1816,69 +1835,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR using namespace app::Clusters::Binding; switch (aPath.mAttributeId) { - case Attributes::BindingList::Id: { - using TypeInfo = Attributes::BindingList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - jobject newElement_0_nodeId; - std::string newElement_0_nodeIdClassName = "java/lang/Long"; - std::string newElement_0_nodeIdCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nodeIdClassName.c_str(), - newElement_0_nodeIdCtorSignature.c_str(), - entry_0.nodeId, newElement_0_nodeId); - jobject newElement_0_groupId; - std::string newElement_0_groupIdClassName = "java/lang/Integer"; - std::string newElement_0_groupIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), - newElement_0_groupIdCtorSignature.c_str(), - entry_0.groupId, newElement_0_groupId); - jobject newElement_0_endpointId; - std::string newElement_0_endpointIdClassName = "java/lang/Integer"; - std::string newElement_0_endpointIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointIdClassName.c_str(), - newElement_0_endpointIdCtorSignature.c_str(), - entry_0.endpointId, newElement_0_endpointId); - jobject newElement_0_clusterId; - std::string newElement_0_clusterIdClassName = "java/lang/Long"; - std::string newElement_0_clusterIdCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_clusterIdClassName.c_str(), - newElement_0_clusterIdCtorSignature.c_str(), - entry_0.clusterId, newElement_0_clusterId); - - jclass bindingEntryStructClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$BindingClusterBindingEntry", bindingEntryStructClass); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$BindingClusterBindingEntry"); - return nullptr; - } - jmethodID bindingEntryStructCtor = env->GetMethodID( - bindingEntryStructClass, "", "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;)V"); - if (bindingEntryStructCtor == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$BindingClusterBindingEntry constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(bindingEntryStructClass, bindingEntryStructCtor, newElement_0_nodeId, - newElement_0_groupId, newElement_0_endpointId, newElement_0_clusterId); - chip::JniReferences::GetInstance().AddToArrayList(value, newElement_0); - } - return value; - } case Attributes::ServerGeneratedCommandList::Id: { using TypeInfo = Attributes::ServerGeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -2647,12 +2603,35 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_minorNumberCtorSignature.c_str(), entry_0.minorNumber, newElement_0_minorNumber); jobject newElement_0_name; - newElement_0_name = env->NewStringUTF(std::string(entry_0.name.data(), entry_0.name.size()).c_str()); + if (!entry_0.name.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); + } + else + { + newElement_0_name = + env->NewStringUTF(std::string(entry_0.name.Value().data(), entry_0.name.Value().size()).c_str()); + } jobject newElement_0_callSign; - newElement_0_callSign = env->NewStringUTF(std::string(entry_0.callSign.data(), entry_0.callSign.size()).c_str()); + if (!entry_0.callSign.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_callSign); + } + else + { + newElement_0_callSign = + env->NewStringUTF(std::string(entry_0.callSign.Value().data(), entry_0.callSign.Value().size()).c_str()); + } jobject newElement_0_affiliateCallSign; - newElement_0_affiliateCallSign = - env->NewStringUTF(std::string(entry_0.affiliateCallSign.data(), entry_0.affiliateCallSign.size()).c_str()); + if (!entry_0.affiliateCallSign.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_affiliateCallSign); + } + else + { + newElement_0_affiliateCallSign = env->NewStringUTF( + std::string(entry_0.affiliateCallSign.Value().data(), entry_0.affiliateCallSign.Value().size()).c_str()); + } jclass channelInfoStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -2664,7 +2643,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } jmethodID channelInfoStructCtor = env->GetMethodID( channelInfoStructClass, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); if (channelInfoStructCtor == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfo constructor"); @@ -2687,37 +2666,64 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - jobject value_operatorName; - value_operatorName = env->NewStringUTF(std::string(cppValue.operatorName.data(), cppValue.operatorName.size()).c_str()); - jobject value_lineupName; - value_lineupName = env->NewStringUTF(std::string(cppValue.lineupName.data(), cppValue.lineupName.size()).c_str()); - jobject value_postalCode; - value_postalCode = env->NewStringUTF(std::string(cppValue.postalCode.data(), cppValue.postalCode.size()).c_str()); - jobject value_lineupInfoType; - std::string value_lineupInfoTypeClassName = "java/lang/Integer"; - std::string value_lineupInfoTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_lineupInfoTypeClassName.c_str(), value_lineupInfoTypeCtorSignature.c_str(), - static_cast(cppValue.lineupInfoType), value_lineupInfoType); - - jclass lineupInfoStructClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ChannelClusterLineupInfo", - lineupInfoStructClass); - if (err != CHIP_NO_ERROR) + if (cppValue.IsNull()) { - ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterLineupInfo"); - return nullptr; + value = nullptr; } - jmethodID lineupInfoStructCtor = env->GetMethodID( - lineupInfoStructClass, "", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)V"); - if (lineupInfoStructCtor == nullptr) + else { - ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterLineupInfo constructor"); - return nullptr; - } + jobject value_operatorName; + value_operatorName = env->NewStringUTF( + std::string(cppValue.Value().operatorName.data(), cppValue.Value().operatorName.size()).c_str()); + jobject value_lineupName; + if (!cppValue.Value().lineupName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_lineupName); + } + else + { + value_lineupName = env->NewStringUTF( + std::string(cppValue.Value().lineupName.Value().data(), cppValue.Value().lineupName.Value().size()) + .c_str()); + } + jobject value_postalCode; + if (!cppValue.Value().postalCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_postalCode); + } + else + { + value_postalCode = env->NewStringUTF( + std::string(cppValue.Value().postalCode.Value().data(), cppValue.Value().postalCode.Value().size()) + .c_str()); + } + jobject value_lineupInfoType; + std::string value_lineupInfoTypeClassName = "java/lang/Integer"; + std::string value_lineupInfoTypeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + value_lineupInfoTypeClassName.c_str(), value_lineupInfoTypeCtorSignature.c_str(), + static_cast(cppValue.Value().lineupInfoType), value_lineupInfoType); - value = env->NewObject(lineupInfoStructClass, lineupInfoStructCtor, value_operatorName, value_lineupName, - value_postalCode, value_lineupInfoType); + jclass lineupInfoStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ChannelClusterLineupInfo", lineupInfoStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterLineupInfo"); + return nullptr; + } + jmethodID lineupInfoStructCtor = + env->GetMethodID(lineupInfoStructClass, "", + "(Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (lineupInfoStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterLineupInfo constructor"); + return nullptr; + } + + value = env->NewObject(lineupInfoStructClass, lineupInfoStructCtor, value_operatorName, value_lineupName, + value_postalCode, value_lineupInfoType); + } return value; } case Attributes::CurrentChannel::Id: { @@ -2729,45 +2735,76 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - jobject value_majorNumber; - std::string value_majorNumberClassName = "java/lang/Integer"; - std::string value_majorNumberCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_majorNumberClassName.c_str(), - value_majorNumberCtorSignature.c_str(), - cppValue.majorNumber, value_majorNumber); - jobject value_minorNumber; - std::string value_minorNumberClassName = "java/lang/Integer"; - std::string value_minorNumberCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(value_minorNumberClassName.c_str(), - value_minorNumberCtorSignature.c_str(), - cppValue.minorNumber, value_minorNumber); - jobject value_name; - value_name = env->NewStringUTF(std::string(cppValue.name.data(), cppValue.name.size()).c_str()); - jobject value_callSign; - value_callSign = env->NewStringUTF(std::string(cppValue.callSign.data(), cppValue.callSign.size()).c_str()); - jobject value_affiliateCallSign; - value_affiliateCallSign = - env->NewStringUTF(std::string(cppValue.affiliateCallSign.data(), cppValue.affiliateCallSign.size()).c_str()); - - jclass channelInfoStructClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfo", - channelInfoStructClass); - if (err != CHIP_NO_ERROR) + if (cppValue.IsNull()) { - ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfo"); - return nullptr; + value = nullptr; } - jmethodID channelInfoStructCtor = - env->GetMethodID(channelInfoStructClass, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); - if (channelInfoStructCtor == nullptr) + else { - ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfo constructor"); - return nullptr; - } + jobject value_majorNumber; + std::string value_majorNumberClassName = "java/lang/Integer"; + std::string value_majorNumberCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(value_majorNumberClassName.c_str(), + value_majorNumberCtorSignature.c_str(), + cppValue.Value().majorNumber, value_majorNumber); + jobject value_minorNumber; + std::string value_minorNumberClassName = "java/lang/Integer"; + std::string value_minorNumberCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(value_minorNumberClassName.c_str(), + value_minorNumberCtorSignature.c_str(), + cppValue.Value().minorNumber, value_minorNumber); + jobject value_name; + if (!cppValue.Value().name.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_name); + } + else + { + value_name = env->NewStringUTF( + std::string(cppValue.Value().name.Value().data(), cppValue.Value().name.Value().size()).c_str()); + } + jobject value_callSign; + if (!cppValue.Value().callSign.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_callSign); + } + else + { + value_callSign = env->NewStringUTF( + std::string(cppValue.Value().callSign.Value().data(), cppValue.Value().callSign.Value().size()).c_str()); + } + jobject value_affiliateCallSign; + if (!cppValue.Value().affiliateCallSign.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_affiliateCallSign); + } + else + { + value_affiliateCallSign = env->NewStringUTF(std::string(cppValue.Value().affiliateCallSign.Value().data(), + cppValue.Value().affiliateCallSign.Value().size()) + .c_str()); + } - value = env->NewObject(channelInfoStructClass, channelInfoStructCtor, value_majorNumber, value_minorNumber, value_name, - value_callSign, value_affiliateCallSign); + jclass channelInfoStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfo", channelInfoStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfo"); + return nullptr; + } + jmethodID channelInfoStructCtor = env->GetMethodID( + channelInfoStructClass, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); + if (channelInfoStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfo constructor"); + return nullptr; + } + + value = env->NewObject(channelInfoStructClass, channelInfoStructCtor, value_majorNumber, value_minorNumber, + value_name, value_callSign, value_affiliateCallSign); + } return value; } case Attributes::ServerGeneratedCommandList::Id: { @@ -7476,10 +7513,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } return value; } case Attributes::Duration::Id: { @@ -7491,10 +7535,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } return value; } case Attributes::Position::Id: { @@ -7512,10 +7563,18 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateBoxedObject( value_updatedAtClassName.c_str(), value_updatedAtCtorSignature.c_str(), cppValue.updatedAt, value_updatedAt); jobject value_position; - std::string value_positionClassName = "java/lang/Long"; - std::string value_positionCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - value_positionClassName.c_str(), value_positionCtorSignature.c_str(), cppValue.position, value_position); + if (cppValue.position.IsNull()) + { + value_position = nullptr; + } + else + { + std::string value_positionClassName = "java/lang/Long"; + std::string value_positionCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(value_positionClassName.c_str(), + value_positionCtorSignature.c_str(), + cppValue.position.Value(), value_position); + } jclass playbackPositionStructClass; err = chip::JniReferences::GetInstance().GetClassRef( @@ -7560,10 +7619,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } return value; } case Attributes::SeekRangeStart::Id: { @@ -7575,10 +7641,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } return value; } case Attributes::ServerGeneratedCommandList::Id: { diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index 110aee92aa8dbd..77924fc27e5fc7 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -196,8 +196,6 @@ typedef void (*CHIPBinaryInputBasicClusterAttributeListAttributeCallbackType)( typedef void (*CHIPBinaryInputBasicClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::BinaryInputBasic::Attributes::ClusterRevision::TypeInfo::DecodableArgType); -typedef void (*CHIPBindingClusterBindingListAttributeCallbackType)( - void *, const chip::app::Clusters::Binding::Attributes::BindingList::TypeInfo::DecodableType &); typedef void (*CHIPBindingClusterServerGeneratedCommandListAttributeCallbackType)( void *, const chip::app::Clusters::Binding::Attributes::ServerGeneratedCommandList::TypeInfo::DecodableType &); typedef void (*CHIPBindingClusterClientGeneratedCommandListAttributeCallbackType)( diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index 654608cdae17fe..a730e1b9f13372 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -1514,7 +1514,7 @@ JNI_METHOD(void, ApplicationLauncherCluster, hideAppRequest) onFailure.release(); } JNI_METHOD(void, ApplicationLauncherCluster, launchAppRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject application, jbyteArray data, jobject timedInvokeTimeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject application, jobject data, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1536,8 +1536,14 @@ JNI_METHOD(void, ApplicationLauncherCluster, launchAppRequest) cleanupStrings.push_back( chip::Platform::MakeUnique(env, static_cast(application_applicationIdItem_0))); request.application.applicationId = cleanupStrings.back()->charSpan(); - cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(data))); - request.data = cleanupByteArrays.back()->byteSpan(); + if (data != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(data, optionalValue_0); + auto & definedValue_0 = request.data.Emplace(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(optionalValue_0))); + definedValue_0 = cleanupByteArrays.back()->byteSpan(); + } std::unique_ptr @@ -3735,40 +3741,116 @@ JNI_METHOD(jlong, BindingCluster, initWithDevice)(JNIEnv * env, jobject self, jl return reinterpret_cast(cppCluster); } -JNI_METHOD(void, BindingCluster, subscribeBindingListAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, BindingCluster, bind) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject nodeId, jobject groupId, jobject endpointId, + jobject clusterId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), - chip::Platform::Delete); + CHIP_ERROR err = CHIP_NO_ERROR; + BindingCluster * cppCluster; + + ListFreer listFreer; + chip::app::Clusters::Binding::Commands::Bind::Type request; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + request.nodeId = + static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(nodeId)); + request.groupId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.endpointId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(endpointId)); + request.clusterId = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(clusterId)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + VerifyOrReturn(onFailure.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, BindingCluster, unbind) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject nodeId, jobject groupId, jobject endpointId, + jobject clusterId, jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + BindingCluster * cppCluster; + + ListFreer listFreer; + chip::app::Clusters::Binding::Commands::Unbind::Type request; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + request.nodeId = + static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(nodeId)); + request.groupId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.endpointId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(endpointId)); + request.clusterId = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(clusterId)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - BindingCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Binding::Attributes::BindingList::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPBindingBindingListAttributeCallback::OnSubscriptionEstablished); + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); @@ -9375,7 +9457,7 @@ JNI_METHOD(jlong, ContentLauncherCluster, initWithDevice)(JNIEnv * env, jobject } JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject autoPlay, jstring data, jobject search, +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject search, jobject autoPlay, jobject data, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; @@ -9387,10 +9469,6 @@ JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) std::vector> cleanupByteArrays; std::vector> cleanupStrings; - request.autoPlay = static_cast>( - chip::JniReferences::GetInstance().BooleanToPrimitive(autoPlay)); - cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(data))); - request.data = cleanupStrings.back()->charSpan(); { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -9436,43 +9514,47 @@ JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) chip::Platform::MakeUnique(env, static_cast(element_2_valueItem_3))); listHolder_2->mList[i_2].value = cleanupStrings.back()->charSpan(); jobject element_2_externalIDListItem_3; - chip::JniReferences::GetInstance().GetObjectField(element_2, "externalIDList", "Ljava/util/ArrayList;", + chip::JniReferences::GetInstance().GetObjectField(element_2, "externalIDList", "Ljava/util/Optional;", element_2_externalIDListItem_3); + if (element_2_externalIDListItem_3 != nullptr) { - using ListType_4 = std::remove_reference_tmList[i_2].externalIDList)>; - using ListMemberType_4 = ListMemberTypeGetter::Type; - jint element_2_externalIDListItem_3Size; - chip::JniReferences::GetInstance().GetArrayListSize(element_2_externalIDListItem_3, - element_2_externalIDListItem_3Size); - if (element_2_externalIDListItem_3Size != 0) + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(element_2_externalIDListItem_3, + optionalValue_4); + auto & definedValue_4 = listHolder_2->mList[i_2].externalIDList.Emplace(); { - auto * listHolder_4 = new ListHolder(element_2_externalIDListItem_3Size); - listFreer.add(listHolder_4); - - for (size_t i_4 = 0; i_4 < static_cast(element_2_externalIDListItem_3Size); ++i_4) + using ListType_5 = std::remove_reference_t; + using ListMemberType_5 = ListMemberTypeGetter::Type; + jint optionalValue_4Size; + chip::JniReferences::GetInstance().GetArrayListSize(optionalValue_4, optionalValue_4Size); + if (optionalValue_4Size != 0) { - jobject element_4; - chip::JniReferences::GetInstance().GetArrayListItem(element_2_externalIDListItem_3, i_4, - element_4); - jobject element_4_nameItem_5; - chip::JniReferences::GetInstance().GetObjectField(element_4, "name", "Ljava/lang/String;", - element_4_nameItem_5); - cleanupStrings.push_back(chip::Platform::MakeUnique( - env, static_cast(element_4_nameItem_5))); - listHolder_4->mList[i_4].name = cleanupStrings.back()->charSpan(); - jobject element_4_valueItem_5; - chip::JniReferences::GetInstance().GetObjectField(element_4, "value", "Ljava/lang/String;", - element_4_valueItem_5); - cleanupStrings.push_back(chip::Platform::MakeUnique( - env, static_cast(element_4_valueItem_5))); - listHolder_4->mList[i_4].value = cleanupStrings.back()->charSpan(); + auto * listHolder_5 = new ListHolder(optionalValue_4Size); + listFreer.add(listHolder_5); + + for (size_t i_5 = 0; i_5 < static_cast(optionalValue_4Size); ++i_5) + { + jobject element_5; + chip::JniReferences::GetInstance().GetArrayListItem(optionalValue_4, i_5, element_5); + jobject element_5_nameItem_6; + chip::JniReferences::GetInstance().GetObjectField( + element_5, "name", "Ljava/lang/String;", element_5_nameItem_6); + cleanupStrings.push_back(chip::Platform::MakeUnique( + env, static_cast(element_5_nameItem_6))); + listHolder_5->mList[i_5].name = cleanupStrings.back()->charSpan(); + jobject element_5_valueItem_6; + chip::JniReferences::GetInstance().GetObjectField( + element_5, "value", "Ljava/lang/String;", element_5_valueItem_6); + cleanupStrings.push_back(chip::Platform::MakeUnique( + env, static_cast(element_5_valueItem_6))); + listHolder_5->mList[i_5].value = cleanupStrings.back()->charSpan(); + } + definedValue_4 = ListType_5(listHolder_5->mList, optionalValue_4Size); + } + else + { + definedValue_4 = ListType_5(); } - listHolder_2->mList[i_2].externalIDList = - ListType_4(listHolder_4->mList, element_2_externalIDListItem_3Size); - } - else - { - listHolder_2->mList[i_2].externalIDList = ListType_4(); } } } @@ -9491,6 +9573,16 @@ JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) request.search = ListType_0(); } } + request.autoPlay = static_cast>( + chip::JniReferences::GetInstance().BooleanToPrimitive(autoPlay)); + if (data != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(data, optionalValue_0); + auto & definedValue_0 = request.data.Emplace(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(optionalValue_0))); + definedValue_0 = cleanupStrings.back()->charSpan(); + } std::unique_ptr onSuccess(Platform::New(callback), @@ -9530,7 +9622,7 @@ JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) onFailure.release(); } JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring contentURL, jstring displayString, +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring contentURL, jobject displayString, jobject brandingInformation, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; @@ -9544,212 +9636,311 @@ JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) std::vector> cleanupStrings; cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(contentURL))); request.contentURL = cleanupStrings.back()->charSpan(); - cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(displayString))); - request.displayString = cleanupStrings.back()->charSpan(); - jobject brandingInformation_providerNameItem_0; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation, "providerName", "Ljava/lang/String;", - brandingInformation_providerNameItem_0); - cleanupStrings.push_back( - chip::Platform::MakeUnique(env, static_cast(brandingInformation_providerNameItem_0))); - request.brandingInformation.providerName = cleanupStrings.back()->charSpan(); - jobject brandingInformation_backgroundItem_0; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation, "background", - "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterStyleInformation;", - brandingInformation_backgroundItem_0); - jobject brandingInformation_backgroundItem_0_imageUrlItem_1; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_backgroundItem_0, "imageUrl", "Ljava/lang/String;", - brandingInformation_backgroundItem_0_imageUrlItem_1); - cleanupStrings.push_back(chip::Platform::MakeUnique( - env, static_cast(brandingInformation_backgroundItem_0_imageUrlItem_1))); - request.brandingInformation.background.imageUrl = cleanupStrings.back()->charSpan(); - jobject brandingInformation_backgroundItem_0_colorItem_1; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_backgroundItem_0, "color", "Ljava/lang/String;", - brandingInformation_backgroundItem_0_colorItem_1); - cleanupStrings.push_back(chip::Platform::MakeUnique( - env, static_cast(brandingInformation_backgroundItem_0_colorItem_1))); - request.brandingInformation.background.color = cleanupStrings.back()->charSpan(); - jobject brandingInformation_backgroundItem_0_sizeItem_1; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_backgroundItem_0, "size", - "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterDimension;", - brandingInformation_backgroundItem_0_sizeItem_1); - jobject brandingInformation_backgroundItem_0_sizeItem_1_widthItem_2; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_backgroundItem_0_sizeItem_1, "width", - "Ljava/lang/Double;", - brandingInformation_backgroundItem_0_sizeItem_1_widthItem_2); - request.brandingInformation.background.size.width = - static_cast>( - chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_backgroundItem_0_sizeItem_1_widthItem_2)); - jobject brandingInformation_backgroundItem_0_sizeItem_1_heightItem_2; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_backgroundItem_0_sizeItem_1, "height", - "Ljava/lang/Double;", - brandingInformation_backgroundItem_0_sizeItem_1_heightItem_2); - request.brandingInformation.background.size.height = - static_cast>( - chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_backgroundItem_0_sizeItem_1_heightItem_2)); - jobject brandingInformation_backgroundItem_0_sizeItem_1_metricItem_2; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_backgroundItem_0_sizeItem_1, "metric", - "Ljava/lang/Integer;", - brandingInformation_backgroundItem_0_sizeItem_1_metricItem_2); - request.brandingInformation.background.size.metric = - static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(brandingInformation_backgroundItem_0_sizeItem_1_metricItem_2)); - jobject brandingInformation_logoItem_0; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation, "logo", - "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterStyleInformation;", - brandingInformation_logoItem_0); - jobject brandingInformation_logoItem_0_imageUrlItem_1; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_logoItem_0, "imageUrl", "Ljava/lang/String;", - brandingInformation_logoItem_0_imageUrlItem_1); - cleanupStrings.push_back( - chip::Platform::MakeUnique(env, static_cast(brandingInformation_logoItem_0_imageUrlItem_1))); - request.brandingInformation.logo.imageUrl = cleanupStrings.back()->charSpan(); - jobject brandingInformation_logoItem_0_colorItem_1; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_logoItem_0, "color", "Ljava/lang/String;", - brandingInformation_logoItem_0_colorItem_1); - cleanupStrings.push_back( - chip::Platform::MakeUnique(env, static_cast(brandingInformation_logoItem_0_colorItem_1))); - request.brandingInformation.logo.color = cleanupStrings.back()->charSpan(); - jobject brandingInformation_logoItem_0_sizeItem_1; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_logoItem_0, "size", - "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterDimension;", - brandingInformation_logoItem_0_sizeItem_1); - jobject brandingInformation_logoItem_0_sizeItem_1_widthItem_2; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_logoItem_0_sizeItem_1, "width", "Ljava/lang/Double;", - brandingInformation_logoItem_0_sizeItem_1_widthItem_2); - request.brandingInformation.logo.size.width = - static_cast>( - chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_logoItem_0_sizeItem_1_widthItem_2)); - jobject brandingInformation_logoItem_0_sizeItem_1_heightItem_2; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_logoItem_0_sizeItem_1, "height", "Ljava/lang/Double;", - brandingInformation_logoItem_0_sizeItem_1_heightItem_2); - request.brandingInformation.logo.size.height = - static_cast>( - chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_logoItem_0_sizeItem_1_heightItem_2)); - jobject brandingInformation_logoItem_0_sizeItem_1_metricItem_2; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_logoItem_0_sizeItem_1, "metric", "Ljava/lang/Integer;", - brandingInformation_logoItem_0_sizeItem_1_metricItem_2); - request.brandingInformation.logo.size.metric = - static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(brandingInformation_logoItem_0_sizeItem_1_metricItem_2)); - jobject brandingInformation_progressBarItem_0; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation, "progressBar", - "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterStyleInformation;", - brandingInformation_progressBarItem_0); - jobject brandingInformation_progressBarItem_0_imageUrlItem_1; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_progressBarItem_0, "imageUrl", "Ljava/lang/String;", - brandingInformation_progressBarItem_0_imageUrlItem_1); - cleanupStrings.push_back(chip::Platform::MakeUnique( - env, static_cast(brandingInformation_progressBarItem_0_imageUrlItem_1))); - request.brandingInformation.progressBar.imageUrl = cleanupStrings.back()->charSpan(); - jobject brandingInformation_progressBarItem_0_colorItem_1; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_progressBarItem_0, "color", "Ljava/lang/String;", - brandingInformation_progressBarItem_0_colorItem_1); - cleanupStrings.push_back(chip::Platform::MakeUnique( - env, static_cast(brandingInformation_progressBarItem_0_colorItem_1))); - request.brandingInformation.progressBar.color = cleanupStrings.back()->charSpan(); - jobject brandingInformation_progressBarItem_0_sizeItem_1; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_progressBarItem_0, "size", - "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterDimension;", - brandingInformation_progressBarItem_0_sizeItem_1); - jobject brandingInformation_progressBarItem_0_sizeItem_1_widthItem_2; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_progressBarItem_0_sizeItem_1, "width", - "Ljava/lang/Double;", - brandingInformation_progressBarItem_0_sizeItem_1_widthItem_2); - request.brandingInformation.progressBar.size.width = - static_cast>( - chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_progressBarItem_0_sizeItem_1_widthItem_2)); - jobject brandingInformation_progressBarItem_0_sizeItem_1_heightItem_2; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_progressBarItem_0_sizeItem_1, "height", - "Ljava/lang/Double;", - brandingInformation_progressBarItem_0_sizeItem_1_heightItem_2); - request.brandingInformation.progressBar.size.height = - static_cast>( - chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_progressBarItem_0_sizeItem_1_heightItem_2)); - jobject brandingInformation_progressBarItem_0_sizeItem_1_metricItem_2; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_progressBarItem_0_sizeItem_1, "metric", - "Ljava/lang/Integer;", - brandingInformation_progressBarItem_0_sizeItem_1_metricItem_2); - request.brandingInformation.progressBar.size.metric = - static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(brandingInformation_progressBarItem_0_sizeItem_1_metricItem_2)); - jobject brandingInformation_splashItem_0; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation, "splash", - "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterStyleInformation;", - brandingInformation_splashItem_0); - jobject brandingInformation_splashItem_0_imageUrlItem_1; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_splashItem_0, "imageUrl", "Ljava/lang/String;", - brandingInformation_splashItem_0_imageUrlItem_1); - cleanupStrings.push_back( - chip::Platform::MakeUnique(env, static_cast(brandingInformation_splashItem_0_imageUrlItem_1))); - request.brandingInformation.splash.imageUrl = cleanupStrings.back()->charSpan(); - jobject brandingInformation_splashItem_0_colorItem_1; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_splashItem_0, "color", "Ljava/lang/String;", - brandingInformation_splashItem_0_colorItem_1); - cleanupStrings.push_back( - chip::Platform::MakeUnique(env, static_cast(brandingInformation_splashItem_0_colorItem_1))); - request.brandingInformation.splash.color = cleanupStrings.back()->charSpan(); - jobject brandingInformation_splashItem_0_sizeItem_1; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_splashItem_0, "size", - "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterDimension;", - brandingInformation_splashItem_0_sizeItem_1); - jobject brandingInformation_splashItem_0_sizeItem_1_widthItem_2; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_splashItem_0_sizeItem_1, "width", "Ljava/lang/Double;", - brandingInformation_splashItem_0_sizeItem_1_widthItem_2); - request.brandingInformation.splash.size.width = - static_cast>( - chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_splashItem_0_sizeItem_1_widthItem_2)); - jobject brandingInformation_splashItem_0_sizeItem_1_heightItem_2; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_splashItem_0_sizeItem_1, "height", "Ljava/lang/Double;", - brandingInformation_splashItem_0_sizeItem_1_heightItem_2); - request.brandingInformation.splash.size.height = - static_cast>( - chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_splashItem_0_sizeItem_1_heightItem_2)); - jobject brandingInformation_splashItem_0_sizeItem_1_metricItem_2; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_splashItem_0_sizeItem_1, "metric", "Ljava/lang/Integer;", - brandingInformation_splashItem_0_sizeItem_1_metricItem_2); - request.brandingInformation.splash.size.metric = - static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(brandingInformation_splashItem_0_sizeItem_1_metricItem_2)); - jobject brandingInformation_waterMarkItem_0; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation, "waterMark", - "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterStyleInformation;", - brandingInformation_waterMarkItem_0); - jobject brandingInformation_waterMarkItem_0_imageUrlItem_1; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_waterMarkItem_0, "imageUrl", "Ljava/lang/String;", - brandingInformation_waterMarkItem_0_imageUrlItem_1); - cleanupStrings.push_back(chip::Platform::MakeUnique( - env, static_cast(brandingInformation_waterMarkItem_0_imageUrlItem_1))); - request.brandingInformation.waterMark.imageUrl = cleanupStrings.back()->charSpan(); - jobject brandingInformation_waterMarkItem_0_colorItem_1; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_waterMarkItem_0, "color", "Ljava/lang/String;", - brandingInformation_waterMarkItem_0_colorItem_1); - cleanupStrings.push_back( - chip::Platform::MakeUnique(env, static_cast(brandingInformation_waterMarkItem_0_colorItem_1))); - request.brandingInformation.waterMark.color = cleanupStrings.back()->charSpan(); - jobject brandingInformation_waterMarkItem_0_sizeItem_1; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_waterMarkItem_0, "size", - "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterDimension;", - brandingInformation_waterMarkItem_0_sizeItem_1); - jobject brandingInformation_waterMarkItem_0_sizeItem_1_widthItem_2; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_waterMarkItem_0_sizeItem_1, "width", "Ljava/lang/Double;", - brandingInformation_waterMarkItem_0_sizeItem_1_widthItem_2); - request.brandingInformation.waterMark.size.width = - static_cast>( - chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_waterMarkItem_0_sizeItem_1_widthItem_2)); - jobject brandingInformation_waterMarkItem_0_sizeItem_1_heightItem_2; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_waterMarkItem_0_sizeItem_1, "height", - "Ljava/lang/Double;", - brandingInformation_waterMarkItem_0_sizeItem_1_heightItem_2); - request.brandingInformation.waterMark.size.height = - static_cast>( - chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_waterMarkItem_0_sizeItem_1_heightItem_2)); - jobject brandingInformation_waterMarkItem_0_sizeItem_1_metricItem_2; - chip::JniReferences::GetInstance().GetObjectField(brandingInformation_waterMarkItem_0_sizeItem_1, "metric", - "Ljava/lang/Integer;", - brandingInformation_waterMarkItem_0_sizeItem_1_metricItem_2); - request.brandingInformation.waterMark.size.metric = - static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(brandingInformation_waterMarkItem_0_sizeItem_1_metricItem_2)); + if (displayString != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(displayString, optionalValue_0); + auto & definedValue_0 = request.displayString.Emplace(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(optionalValue_0))); + definedValue_0 = cleanupStrings.back()->charSpan(); + } + if (brandingInformation != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(brandingInformation, optionalValue_0); + auto & definedValue_0 = request.brandingInformation.Emplace(); + jobject optionalValue_0_providerNameItem_1; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_0, "providerName", "Ljava/lang/String;", + optionalValue_0_providerNameItem_1); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_0_providerNameItem_1))); + definedValue_0.providerName = cleanupStrings.back()->charSpan(); + jobject optionalValue_0_backgroundItem_1; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_0, "background", "Ljava/util/Optional;", + optionalValue_0_backgroundItem_1); + if (optionalValue_0_backgroundItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_0_backgroundItem_1, optionalValue_2); + auto & definedValue_2 = definedValue_0.background.Emplace(); + jobject optionalValue_2_imageUrlItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "imageUrl", "Ljava/util/Optional;", + optionalValue_2_imageUrlItem_3); + if (optionalValue_2_imageUrlItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_2_imageUrlItem_3, optionalValue_4); + auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_4))); + definedValue_4 = cleanupStrings.back()->charSpan(); + } + jobject optionalValue_2_colorItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "color", "Ljava/util/Optional;", + optionalValue_2_colorItem_3); + if (optionalValue_2_colorItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_2_colorItem_3, optionalValue_4); + auto & definedValue_4 = definedValue_2.color.Emplace(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_4))); + definedValue_4 = cleanupStrings.back()->charSpan(); + } + jobject optionalValue_2_sizeItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "size", "Ljava/util/Optional;", + optionalValue_2_sizeItem_3); + if (optionalValue_2_sizeItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_2_sizeItem_3, optionalValue_4); + auto & definedValue_4 = definedValue_2.size.Emplace(); + jobject optionalValue_4_widthItem_5; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_4, "width", "Ljava/lang/Double;", + optionalValue_4_widthItem_5); + definedValue_4.width = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(optionalValue_4_widthItem_5)); + jobject optionalValue_4_heightItem_5; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_4, "height", "Ljava/lang/Double;", + optionalValue_4_heightItem_5); + definedValue_4.height = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(optionalValue_4_heightItem_5)); + jobject optionalValue_4_metricItem_5; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_4, "metric", "Ljava/lang/Integer;", + optionalValue_4_metricItem_5); + definedValue_4.metric = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_4_metricItem_5)); + } + } + jobject optionalValue_0_logoItem_1; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_0, "logo", "Ljava/util/Optional;", + optionalValue_0_logoItem_1); + if (optionalValue_0_logoItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_0_logoItem_1, optionalValue_2); + auto & definedValue_2 = definedValue_0.logo.Emplace(); + jobject optionalValue_2_imageUrlItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "imageUrl", "Ljava/util/Optional;", + optionalValue_2_imageUrlItem_3); + if (optionalValue_2_imageUrlItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_2_imageUrlItem_3, optionalValue_4); + auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_4))); + definedValue_4 = cleanupStrings.back()->charSpan(); + } + jobject optionalValue_2_colorItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "color", "Ljava/util/Optional;", + optionalValue_2_colorItem_3); + if (optionalValue_2_colorItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_2_colorItem_3, optionalValue_4); + auto & definedValue_4 = definedValue_2.color.Emplace(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_4))); + definedValue_4 = cleanupStrings.back()->charSpan(); + } + jobject optionalValue_2_sizeItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "size", "Ljava/util/Optional;", + optionalValue_2_sizeItem_3); + if (optionalValue_2_sizeItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_2_sizeItem_3, optionalValue_4); + auto & definedValue_4 = definedValue_2.size.Emplace(); + jobject optionalValue_4_widthItem_5; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_4, "width", "Ljava/lang/Double;", + optionalValue_4_widthItem_5); + definedValue_4.width = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(optionalValue_4_widthItem_5)); + jobject optionalValue_4_heightItem_5; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_4, "height", "Ljava/lang/Double;", + optionalValue_4_heightItem_5); + definedValue_4.height = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(optionalValue_4_heightItem_5)); + jobject optionalValue_4_metricItem_5; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_4, "metric", "Ljava/lang/Integer;", + optionalValue_4_metricItem_5); + definedValue_4.metric = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_4_metricItem_5)); + } + } + jobject optionalValue_0_progressBarItem_1; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_0, "progressBar", "Ljava/util/Optional;", + optionalValue_0_progressBarItem_1); + if (optionalValue_0_progressBarItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_0_progressBarItem_1, optionalValue_2); + auto & definedValue_2 = definedValue_0.progressBar.Emplace(); + jobject optionalValue_2_imageUrlItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "imageUrl", "Ljava/util/Optional;", + optionalValue_2_imageUrlItem_3); + if (optionalValue_2_imageUrlItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_2_imageUrlItem_3, optionalValue_4); + auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_4))); + definedValue_4 = cleanupStrings.back()->charSpan(); + } + jobject optionalValue_2_colorItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "color", "Ljava/util/Optional;", + optionalValue_2_colorItem_3); + if (optionalValue_2_colorItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_2_colorItem_3, optionalValue_4); + auto & definedValue_4 = definedValue_2.color.Emplace(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_4))); + definedValue_4 = cleanupStrings.back()->charSpan(); + } + jobject optionalValue_2_sizeItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "size", "Ljava/util/Optional;", + optionalValue_2_sizeItem_3); + if (optionalValue_2_sizeItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_2_sizeItem_3, optionalValue_4); + auto & definedValue_4 = definedValue_2.size.Emplace(); + jobject optionalValue_4_widthItem_5; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_4, "width", "Ljava/lang/Double;", + optionalValue_4_widthItem_5); + definedValue_4.width = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(optionalValue_4_widthItem_5)); + jobject optionalValue_4_heightItem_5; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_4, "height", "Ljava/lang/Double;", + optionalValue_4_heightItem_5); + definedValue_4.height = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(optionalValue_4_heightItem_5)); + jobject optionalValue_4_metricItem_5; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_4, "metric", "Ljava/lang/Integer;", + optionalValue_4_metricItem_5); + definedValue_4.metric = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_4_metricItem_5)); + } + } + jobject optionalValue_0_splashItem_1; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_0, "splash", "Ljava/util/Optional;", + optionalValue_0_splashItem_1); + if (optionalValue_0_splashItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_0_splashItem_1, optionalValue_2); + auto & definedValue_2 = definedValue_0.splash.Emplace(); + jobject optionalValue_2_imageUrlItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "imageUrl", "Ljava/util/Optional;", + optionalValue_2_imageUrlItem_3); + if (optionalValue_2_imageUrlItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_2_imageUrlItem_3, optionalValue_4); + auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_4))); + definedValue_4 = cleanupStrings.back()->charSpan(); + } + jobject optionalValue_2_colorItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "color", "Ljava/util/Optional;", + optionalValue_2_colorItem_3); + if (optionalValue_2_colorItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_2_colorItem_3, optionalValue_4); + auto & definedValue_4 = definedValue_2.color.Emplace(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_4))); + definedValue_4 = cleanupStrings.back()->charSpan(); + } + jobject optionalValue_2_sizeItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "size", "Ljava/util/Optional;", + optionalValue_2_sizeItem_3); + if (optionalValue_2_sizeItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_2_sizeItem_3, optionalValue_4); + auto & definedValue_4 = definedValue_2.size.Emplace(); + jobject optionalValue_4_widthItem_5; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_4, "width", "Ljava/lang/Double;", + optionalValue_4_widthItem_5); + definedValue_4.width = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(optionalValue_4_widthItem_5)); + jobject optionalValue_4_heightItem_5; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_4, "height", "Ljava/lang/Double;", + optionalValue_4_heightItem_5); + definedValue_4.height = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(optionalValue_4_heightItem_5)); + jobject optionalValue_4_metricItem_5; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_4, "metric", "Ljava/lang/Integer;", + optionalValue_4_metricItem_5); + definedValue_4.metric = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_4_metricItem_5)); + } + } + jobject optionalValue_0_waterMarkItem_1; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_0, "waterMark", "Ljava/util/Optional;", + optionalValue_0_waterMarkItem_1); + if (optionalValue_0_waterMarkItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_0_waterMarkItem_1, optionalValue_2); + auto & definedValue_2 = definedValue_0.waterMark.Emplace(); + jobject optionalValue_2_imageUrlItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "imageUrl", "Ljava/util/Optional;", + optionalValue_2_imageUrlItem_3); + if (optionalValue_2_imageUrlItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_2_imageUrlItem_3, optionalValue_4); + auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_4))); + definedValue_4 = cleanupStrings.back()->charSpan(); + } + jobject optionalValue_2_colorItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "color", "Ljava/util/Optional;", + optionalValue_2_colorItem_3); + if (optionalValue_2_colorItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_2_colorItem_3, optionalValue_4); + auto & definedValue_4 = definedValue_2.color.Emplace(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_4))); + definedValue_4 = cleanupStrings.back()->charSpan(); + } + jobject optionalValue_2_sizeItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "size", "Ljava/util/Optional;", + optionalValue_2_sizeItem_3); + if (optionalValue_2_sizeItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(optionalValue_2_sizeItem_3, optionalValue_4); + auto & definedValue_4 = definedValue_2.size.Emplace(); + jobject optionalValue_4_widthItem_5; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_4, "width", "Ljava/lang/Double;", + optionalValue_4_widthItem_5); + definedValue_4.width = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(optionalValue_4_widthItem_5)); + jobject optionalValue_4_heightItem_5; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_4, "height", "Ljava/lang/Double;", + optionalValue_4_heightItem_5); + definedValue_4.height = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(optionalValue_4_heightItem_5)); + jobject optionalValue_4_metricItem_5; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_4, "metric", "Ljava/lang/Integer;", + optionalValue_4_metricItem_5); + definedValue_4.metric = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_4_metricItem_5)); + } + } + } std::unique_ptr onSuccess(Platform::New(callback), @@ -19719,8 +19910,9 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeStartTimeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -19744,7 +19936,7 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeStartTimeAttribute) err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + CHIPMediaPlaybackStartTimeAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -19756,8 +19948,9 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeDurationAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -19781,7 +19974,7 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeDurationAttribute) err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + CHIPMediaPlaybackDurationAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -19830,8 +20023,9 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeEndAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -19855,7 +20049,7 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeEndAttribute) err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + CHIPMediaPlaybackSeekRangeEndAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -19867,8 +20061,9 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeStartAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -19892,7 +20087,7 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeStartAttribute) err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + CHIPMediaPlaybackSeekRangeStartAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -27842,7 +28037,7 @@ JNI_METHOD(jlong, TargetNavigatorCluster, initWithDevice)(JNIEnv * env, jobject } JNI_METHOD(void, TargetNavigatorCluster, navigateTargetRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject target, jstring data, jobject timedInvokeTimeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject target, jobject data, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27855,8 +28050,14 @@ JNI_METHOD(void, TargetNavigatorCluster, navigateTargetRequest) std::vector> cleanupStrings; request.target = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(target)); - cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(data))); - request.data = cleanupStrings.back()->charSpan(); + if (data != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(data, optionalValue_0); + auto & definedValue_0 = request.data.Emplace(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(optionalValue_0))); + definedValue_0 = cleanupStrings.back()->charSpan(); + } std::unique_ptr diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index fdef9fc3ba0ed4..bb2aa7730058bc 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -582,99 +582,6 @@ JNI_METHOD(void, BinaryInputBasicCluster, writePresentValueAttribute) onFailure.release(); } -JNI_METHOD(void, BindingCluster, writeBindingListAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Binding::Attributes::BindingList::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - jint valueSize; - chip::JniReferences::GetInstance().GetArrayListSize(value, valueSize); - if (valueSize != 0) - { - auto * listHolder_0 = new ListHolder(valueSize); - listFreer.add(listHolder_0); - - for (size_t i_0 = 0; i_0 < static_cast(valueSize); ++i_0) - { - jobject element_0; - chip::JniReferences::GetInstance().GetArrayListItem(value, i_0, element_0); - jobject element_0_nodeIdItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "nodeId", "Ljava/lang/Long;", element_0_nodeIdItem_1); - listHolder_0->mList[i_0].nodeId = static_castmList[i_0].nodeId)>>( - chip::JniReferences::GetInstance().LongToPrimitive(element_0_nodeIdItem_1)); - jobject element_0_groupIdItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "groupId", "Ljava/lang/Integer;", - element_0_groupIdItem_1); - listHolder_0->mList[i_0].groupId = static_castmList[i_0].groupId)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_groupIdItem_1)); - jobject element_0_endpointIdItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "endpointId", "Ljava/lang/Integer;", - element_0_endpointIdItem_1); - listHolder_0->mList[i_0].endpointId = - static_castmList[i_0].endpointId)>>( - chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_endpointIdItem_1)); - jobject element_0_clusterIdItem_1; - chip::JniReferences::GetInstance().GetObjectField(element_0, "clusterId", "Ljava/lang/Long;", - element_0_clusterIdItem_1); - listHolder_0->mList[i_0].clusterId = - static_castmList[i_0].clusterId)>>( - chip::JniReferences::GetInstance().LongToPrimitive(element_0_clusterIdItem_1)); - } - cppValue = ListType_0(listHolder_0->mList, valueSize); - } - else - { - cppValue = ListType_0(); - } - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BindingCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - JNI_METHOD(void, BridgedDeviceBasicCluster, writeNodeLabelAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 775a5958a30659..0e21f09d7ce992 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -219,15 +219,37 @@ void CHIPChannelClusterChangeChannelResponseCallback::CallbackFn( channelMatch_minorNumberCtorSignature.c_str(), dataResponse.channelMatch.minorNumber, channelMatch_minorNumber); jobject channelMatch_name; - channelMatch_name = - env->NewStringUTF(std::string(dataResponse.channelMatch.name.data(), dataResponse.channelMatch.name.size()).c_str()); + if (!dataResponse.channelMatch.name.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, channelMatch_name); + } + else + { + channelMatch_name = env->NewStringUTF( + std::string(dataResponse.channelMatch.name.Value().data(), dataResponse.channelMatch.name.Value().size()).c_str()); + } jobject channelMatch_callSign; - channelMatch_callSign = env->NewStringUTF( - std::string(dataResponse.channelMatch.callSign.data(), dataResponse.channelMatch.callSign.size()).c_str()); + if (!dataResponse.channelMatch.callSign.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, channelMatch_callSign); + } + else + { + channelMatch_callSign = env->NewStringUTF( + std::string(dataResponse.channelMatch.callSign.Value().data(), dataResponse.channelMatch.callSign.Value().size()) + .c_str()); + } jobject channelMatch_affiliateCallSign; - channelMatch_affiliateCallSign = env->NewStringUTF( - std::string(dataResponse.channelMatch.affiliateCallSign.data(), dataResponse.channelMatch.affiliateCallSign.size()) - .c_str()); + if (!dataResponse.channelMatch.affiliateCallSign.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, channelMatch_affiliateCallSign); + } + else + { + channelMatch_affiliateCallSign = env->NewStringUTF(std::string(dataResponse.channelMatch.affiliateCallSign.Value().data(), + dataResponse.channelMatch.affiliateCallSign.Value().size()) + .c_str()); + } jclass channelInfoStructClass; err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfo", @@ -239,7 +261,7 @@ void CHIPChannelClusterChangeChannelResponseCallback::CallbackFn( } jmethodID channelInfoStructCtor = env->GetMethodID(channelInfoStructClass, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); if (channelInfoStructCtor == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfo constructor"); @@ -304,7 +326,7 @@ void CHIPContentLauncherClusterLaunchResponseCallback::CallbackFn( // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/String;)V", + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); @@ -314,7 +336,14 @@ void CHIPContentLauncherClusterLaunchResponseCallback::CallbackFn( chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), static_cast(dataResponse.status), status); jobject data; - data = env->NewStringUTF(std::string(dataResponse.data.data(), dataResponse.data.size()).c_str()); + if (!dataResponse.data.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, data); + } + else + { + data = env->NewStringUTF(std::string(dataResponse.data.Value().data(), dataResponse.data.Value().size()).c_str()); + } env->CallVoidMethod(javaCallbackRef, javaMethod, status, data); } @@ -3295,7 +3324,7 @@ void CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CallbackFn( // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/String;)V", + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); @@ -3305,7 +3334,14 @@ void CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CallbackFn( chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), static_cast(dataResponse.status), status); jobject data; - data = env->NewStringUTF(std::string(dataResponse.data.data(), dataResponse.data.size()).c_str()); + if (!dataResponse.data.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, data); + } + else + { + data = env->NewStringUTF(std::string(dataResponse.data.Value().data(), dataResponse.data.Value().size()).c_str()); + } env->CallVoidMethod(javaCallbackRef, javaMethod, status, data); } diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index f7c303d3389439..e8a12c4131e4a9 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -3245,114 +3245,6 @@ void CHIPBinaryInputBasicAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBindingBindingListAttributeCallback::CHIPBindingBindingListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPBindingBindingListAttributeCallback::~CHIPBindingBindingListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPBindingBindingListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_nodeId; - std::string newElement_0_nodeIdClassName = "java/lang/Long"; - std::string newElement_0_nodeIdCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nodeIdClassName.c_str(), newElement_0_nodeIdCtorSignature.c_str(), entry_0.nodeId, newElement_0_nodeId); - jobject newElement_0_groupId; - std::string newElement_0_groupIdClassName = "java/lang/Integer"; - std::string newElement_0_groupIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), - newElement_0_groupIdCtorSignature.c_str(), entry_0.groupId, - newElement_0_groupId); - jobject newElement_0_endpointId; - std::string newElement_0_endpointIdClassName = "java/lang/Integer"; - std::string newElement_0_endpointIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointIdClassName.c_str(), - newElement_0_endpointIdCtorSignature.c_str(), - entry_0.endpointId, newElement_0_endpointId); - jobject newElement_0_clusterId; - std::string newElement_0_clusterIdClassName = "java/lang/Long"; - std::string newElement_0_clusterIdCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_clusterIdClassName.c_str(), - newElement_0_clusterIdCtorSignature.c_str(), - entry_0.clusterId, newElement_0_clusterId); - - jclass bindingEntryStructClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$BindingClusterBindingEntry", - bindingEntryStructClass); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$BindingClusterBindingEntry"); - return; - } - jmethodID bindingEntryStructCtor = env->GetMethodID( - bindingEntryStructClass, "", "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;)V"); - if (bindingEntryStructCtor == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$BindingClusterBindingEntry constructor"); - return; - } - - newElement_0 = env->NewObject(bindingEntryStructClass, bindingEntryStructCtor, newElement_0_nodeId, newElement_0_groupId, - newElement_0_endpointId, newElement_0_clusterId); - chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - CHIPBindingServerGeneratedCommandListAttributeCallback::CHIPBindingServerGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), @@ -4513,12 +4405,34 @@ void CHIPChannelChannelListAttributeCallback::CallbackFn( newElement_0_minorNumberCtorSignature.c_str(), entry_0.minorNumber, newElement_0_minorNumber); jobject newElement_0_name; - newElement_0_name = env->NewStringUTF(std::string(entry_0.name.data(), entry_0.name.size()).c_str()); + if (!entry_0.name.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); + } + else + { + newElement_0_name = env->NewStringUTF(std::string(entry_0.name.Value().data(), entry_0.name.Value().size()).c_str()); + } jobject newElement_0_callSign; - newElement_0_callSign = env->NewStringUTF(std::string(entry_0.callSign.data(), entry_0.callSign.size()).c_str()); + if (!entry_0.callSign.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_callSign); + } + else + { + newElement_0_callSign = + env->NewStringUTF(std::string(entry_0.callSign.Value().data(), entry_0.callSign.Value().size()).c_str()); + } jobject newElement_0_affiliateCallSign; - newElement_0_affiliateCallSign = - env->NewStringUTF(std::string(entry_0.affiliateCallSign.data(), entry_0.affiliateCallSign.size()).c_str()); + if (!entry_0.affiliateCallSign.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_affiliateCallSign); + } + else + { + newElement_0_affiliateCallSign = env->NewStringUTF( + std::string(entry_0.affiliateCallSign.Value().data(), entry_0.affiliateCallSign.Value().size()).c_str()); + } jclass channelInfoStructClass; err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfo", @@ -4528,9 +4442,9 @@ void CHIPChannelChannelListAttributeCallback::CallbackFn( ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfo"); return; } - jmethodID channelInfoStructCtor = - env->GetMethodID(channelInfoStructClass, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); + jmethodID channelInfoStructCtor = env->GetMethodID( + channelInfoStructClass, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); if (channelInfoStructCtor == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfo constructor"); @@ -11087,6 +11001,268 @@ void CHIPMediaInputAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } +CHIPMediaPlaybackStartTimeAttributeCallback::CHIPMediaPlaybackStartTimeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPMediaPlaybackStartTimeAttributeCallback::~CHIPMediaPlaybackStartTimeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPMediaPlaybackStartTimeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPMediaPlaybackDurationAttributeCallback::CHIPMediaPlaybackDurationAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPMediaPlaybackDurationAttributeCallback::~CHIPMediaPlaybackDurationAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPMediaPlaybackDurationAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPMediaPlaybackSeekRangeEndAttributeCallback::CHIPMediaPlaybackSeekRangeEndAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPMediaPlaybackSeekRangeEndAttributeCallback::~CHIPMediaPlaybackSeekRangeEndAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPMediaPlaybackSeekRangeEndAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPMediaPlaybackSeekRangeStartAttributeCallback::CHIPMediaPlaybackSeekRangeStartAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPMediaPlaybackSeekRangeStartAttributeCallback::~CHIPMediaPlaybackSeekRangeStartAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPMediaPlaybackSeekRangeStartAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + CHIPMediaPlaybackServerGeneratedCommandListAttributeCallback::CHIPMediaPlaybackServerGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 0eb7cab6b9b951..d7f7e5fe46bf3d 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -1416,37 +1416,6 @@ class CHIPBinaryInputBasicAttributeListAttributeCallback bool keepAlive; }; -class CHIPBindingBindingListAttributeCallback : public chip::Callback::Callback -{ -public: - CHIPBindingBindingListAttributeCallback(jobject javaCallback, bool keepAlive = false); - - ~CHIPBindingBindingListAttributeCallback(); - - static void maybeDestroy(CHIPBindingBindingListAttributeCallback * callback) - { - if (!callback->keepAlive) - { - callback->Cancel(); - chip::Platform::Delete(callback); - } - } - - static void CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list); - static void OnSubscriptionEstablished(void * context) - { - CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( - reinterpret_cast(context)->javaCallbackRef); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); - }; - -private: - jobject javaCallbackRef; - bool keepAlive; -}; - class CHIPBindingServerGeneratedCommandListAttributeCallback : public chip::Callback::Callback { @@ -4620,6 +4589,126 @@ class CHIPMediaInputAttributeListAttributeCallback bool keepAlive; }; +class CHIPMediaPlaybackStartTimeAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPMediaPlaybackStartTimeAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPMediaPlaybackStartTimeAttributeCallback(); + + static void maybeDestroy(CHIPMediaPlaybackStartTimeAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPMediaPlaybackDurationAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPMediaPlaybackDurationAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPMediaPlaybackDurationAttributeCallback(); + + static void maybeDestroy(CHIPMediaPlaybackDurationAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPMediaPlaybackSeekRangeEndAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPMediaPlaybackSeekRangeEndAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPMediaPlaybackSeekRangeEndAttributeCallback(); + + static void maybeDestroy(CHIPMediaPlaybackSeekRangeEndAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPMediaPlaybackSeekRangeStartAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPMediaPlaybackSeekRangeStartAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPMediaPlaybackSeekRangeStartAttributeCallback(); + + static void maybeDestroy(CHIPMediaPlaybackSeekRangeStartAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPMediaPlaybackServerGeneratedCommandListAttributeCallback : public chip::Callback::Callback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 26b115e0215920..6a98c3f05e9a38 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -932,14 +932,14 @@ public void hideAppRequest( public void launchAppRequest( LauncherResponseCallback callback, ChipStructs.ApplicationLauncherClusterApplication application, - byte[] data) { + Optional data) { launchAppRequest(chipClusterPtr, callback, application, data, null); } public void launchAppRequest( LauncherResponseCallback callback, ChipStructs.ApplicationLauncherClusterApplication application, - byte[] data, + Optional data, int timedInvokeTimeoutMs) { launchAppRequest(chipClusterPtr, callback, application, data, timedInvokeTimeoutMs); } @@ -967,7 +967,7 @@ private native void launchAppRequest( long chipClusterPtr, LauncherResponseCallback Callback, ChipStructs.ApplicationLauncherClusterApplication application, - byte[] data, + Optional data, @Nullable Integer timedInvokeTimeoutMs); private native void stopAppRequest( @@ -2159,14 +2159,63 @@ public BindingCluster(long devicePtr, int endpointId) { @Override public native long initWithDevice(long devicePtr, int endpointId); - public interface BindingListAttributeCallback { - void onSuccess(List valueList); + public void bind( + DefaultClusterCallback callback, + Long nodeId, + Integer groupId, + Integer endpointId, + Long clusterId) { + bind(chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId, null); + } - void onError(Exception ex); + public void bind( + DefaultClusterCallback callback, + Long nodeId, + Integer groupId, + Integer endpointId, + Long clusterId, + int timedInvokeTimeoutMs) { + bind(chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId, timedInvokeTimeoutMs); + } - default void onSubscriptionEstablished() {} + public void unbind( + DefaultClusterCallback callback, + Long nodeId, + Integer groupId, + Integer endpointId, + Long clusterId) { + unbind(chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId, null); + } + + public void unbind( + DefaultClusterCallback callback, + Long nodeId, + Integer groupId, + Integer endpointId, + Long clusterId, + int timedInvokeTimeoutMs) { + unbind( + chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId, timedInvokeTimeoutMs); } + private native void bind( + long chipClusterPtr, + DefaultClusterCallback Callback, + Long nodeId, + Integer groupId, + Integer endpointId, + Long clusterId, + @Nullable Integer timedInvokeTimeoutMs); + + private native void unbind( + long chipClusterPtr, + DefaultClusterCallback Callback, + Long nodeId, + Integer groupId, + Integer endpointId, + Long clusterId, + @Nullable Integer timedInvokeTimeoutMs); + public interface ServerGeneratedCommandListAttributeCallback { void onSuccess(List valueList); @@ -2191,27 +2240,6 @@ public interface AttributeListAttributeCallback { default void onSubscriptionEstablished() {} } - public void readBindingListAttribute(BindingListAttributeCallback callback) { - readBindingListAttribute(chipClusterPtr, callback); - } - - public void writeBindingListAttribute( - DefaultClusterCallback callback, ArrayList value) { - writeBindingListAttribute(chipClusterPtr, callback, value, null); - } - - public void writeBindingListAttribute( - DefaultClusterCallback callback, - ArrayList value, - int timedWriteTimeoutMs) { - writeBindingListAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - - public void subscribeBindingListAttribute( - BindingListAttributeCallback callback, int minInterval, int maxInterval) { - subscribeBindingListAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - public void readServerGeneratedCommandListAttribute( ServerGeneratedCommandListAttributeCallback callback) { readServerGeneratedCommandListAttribute(chipClusterPtr, callback); @@ -2252,21 +2280,6 @@ public void subscribeClusterRevisionAttribute( subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - private native void readBindingListAttribute( - long chipClusterPtr, BindingListAttributeCallback callback); - - private native void writeBindingListAttribute( - long chipClusterPtr, - DefaultClusterCallback callback, - ArrayList value, - @Nullable Integer timedWriteTimeoutMs); - - private native void subscribeBindingListAttribute( - long chipClusterPtr, - BindingListAttributeCallback callback, - int minInterval, - int maxInterval); - private native void readServerGeneratedCommandListAttribute( long chipClusterPtr, ServerGeneratedCommandListAttributeCallback callback); @@ -5346,26 +5359,26 @@ public ContentLauncherCluster(long devicePtr, int endpointId) { public void launchContentRequest( LaunchResponseCallback callback, + ArrayList search, Boolean autoPlay, - String data, - ArrayList search) { - launchContentRequest(chipClusterPtr, callback, autoPlay, data, search, null); + Optional data) { + launchContentRequest(chipClusterPtr, callback, search, autoPlay, data, null); } public void launchContentRequest( LaunchResponseCallback callback, - Boolean autoPlay, - String data, ArrayList search, + Boolean autoPlay, + Optional data, int timedInvokeTimeoutMs) { - launchContentRequest(chipClusterPtr, callback, autoPlay, data, search, timedInvokeTimeoutMs); + launchContentRequest(chipClusterPtr, callback, search, autoPlay, data, timedInvokeTimeoutMs); } public void launchURLRequest( LaunchResponseCallback callback, String contentURL, - String displayString, - ChipStructs.ContentLauncherClusterBrandingInformation brandingInformation) { + Optional displayString, + Optional brandingInformation) { launchURLRequest( chipClusterPtr, callback, contentURL, displayString, brandingInformation, null); } @@ -5373,8 +5386,8 @@ public void launchURLRequest( public void launchURLRequest( LaunchResponseCallback callback, String contentURL, - String displayString, - ChipStructs.ContentLauncherClusterBrandingInformation brandingInformation, + Optional displayString, + Optional brandingInformation, int timedInvokeTimeoutMs) { launchURLRequest( chipClusterPtr, @@ -5388,21 +5401,21 @@ public void launchURLRequest( private native void launchContentRequest( long chipClusterPtr, LaunchResponseCallback Callback, - Boolean autoPlay, - String data, ArrayList search, + Boolean autoPlay, + Optional data, @Nullable Integer timedInvokeTimeoutMs); private native void launchURLRequest( long chipClusterPtr, LaunchResponseCallback Callback, String contentURL, - String displayString, - ChipStructs.ContentLauncherClusterBrandingInformation brandingInformation, + Optional displayString, + Optional brandingInformation, @Nullable Integer timedInvokeTimeoutMs); public interface LaunchResponseCallback { - void onSuccess(Integer status, String data); + void onSuccess(Integer status, Optional data); void onError(Exception error); } @@ -10720,6 +10733,38 @@ public interface PlaybackResponseCallback { void onError(Exception error); } + public interface StartTimeAttributeCallback { + void onSuccess(@Nullable Long value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface DurationAttributeCallback { + void onSuccess(@Nullable Long value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface SeekRangeEndAttributeCallback { + void onSuccess(@Nullable Long value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface SeekRangeStartAttributeCallback { + void onSuccess(@Nullable Long value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + public interface ServerGeneratedCommandListAttributeCallback { void onSuccess(List valueList); @@ -10753,21 +10798,21 @@ public void subscribePlaybackStateAttribute( subscribePlaybackStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readStartTimeAttribute(LongAttributeCallback callback) { + public void readStartTimeAttribute(StartTimeAttributeCallback callback) { readStartTimeAttribute(chipClusterPtr, callback); } public void subscribeStartTimeAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { + StartTimeAttributeCallback callback, int minInterval, int maxInterval) { subscribeStartTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readDurationAttribute(LongAttributeCallback callback) { + public void readDurationAttribute(DurationAttributeCallback callback) { readDurationAttribute(chipClusterPtr, callback); } public void subscribeDurationAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { + DurationAttributeCallback callback, int minInterval, int maxInterval) { subscribeDurationAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -10780,21 +10825,21 @@ public void subscribePlaybackSpeedAttribute( subscribePlaybackSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readSeekRangeEndAttribute(LongAttributeCallback callback) { + public void readSeekRangeEndAttribute(SeekRangeEndAttributeCallback callback) { readSeekRangeEndAttribute(chipClusterPtr, callback); } public void subscribeSeekRangeEndAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { + SeekRangeEndAttributeCallback callback, int minInterval, int maxInterval) { subscribeSeekRangeEndAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readSeekRangeStartAttribute(LongAttributeCallback callback) { + public void readSeekRangeStartAttribute(SeekRangeStartAttributeCallback callback) { readSeekRangeStartAttribute(chipClusterPtr, callback); } public void subscribeSeekRangeStartAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { + SeekRangeStartAttributeCallback callback, int minInterval, int maxInterval) { subscribeSeekRangeStartAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -10844,15 +10889,17 @@ private native void readPlaybackStateAttribute( private native void subscribePlaybackStateAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); - private native void readStartTimeAttribute(long chipClusterPtr, LongAttributeCallback callback); + private native void readStartTimeAttribute( + long chipClusterPtr, StartTimeAttributeCallback callback); private native void subscribeStartTimeAttribute( - long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, StartTimeAttributeCallback callback, int minInterval, int maxInterval); - private native void readDurationAttribute(long chipClusterPtr, LongAttributeCallback callback); + private native void readDurationAttribute( + long chipClusterPtr, DurationAttributeCallback callback); private native void subscribeDurationAttribute( - long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, DurationAttributeCallback callback, int minInterval, int maxInterval); private native void readPlaybackSpeedAttribute( long chipClusterPtr, FloatAttributeCallback callback); @@ -10861,16 +10908,22 @@ private native void subscribePlaybackSpeedAttribute( long chipClusterPtr, FloatAttributeCallback callback, int minInterval, int maxInterval); private native void readSeekRangeEndAttribute( - long chipClusterPtr, LongAttributeCallback callback); + long chipClusterPtr, SeekRangeEndAttributeCallback callback); private native void subscribeSeekRangeEndAttribute( - long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + SeekRangeEndAttributeCallback callback, + int minInterval, + int maxInterval); private native void readSeekRangeStartAttribute( - long chipClusterPtr, LongAttributeCallback callback); + long chipClusterPtr, SeekRangeStartAttributeCallback callback); private native void subscribeSeekRangeStartAttribute( - long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + SeekRangeStartAttributeCallback callback, + int minInterval, + int maxInterval); private native void readServerGeneratedCommandListAttribute( long chipClusterPtr, ServerGeneratedCommandListAttributeCallback callback); @@ -14998,14 +15051,14 @@ public TargetNavigatorCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public void navigateTargetRequest( - NavigateTargetResponseCallback callback, Integer target, String data) { + NavigateTargetResponseCallback callback, Integer target, Optional data) { navigateTargetRequest(chipClusterPtr, callback, target, data, null); } public void navigateTargetRequest( NavigateTargetResponseCallback callback, Integer target, - String data, + Optional data, int timedInvokeTimeoutMs) { navigateTargetRequest(chipClusterPtr, callback, target, data, timedInvokeTimeoutMs); } @@ -15014,11 +15067,11 @@ private native void navigateTargetRequest( long chipClusterPtr, NavigateTargetResponseCallback Callback, Integer target, - String data, + Optional data, @Nullable Integer timedInvokeTimeoutMs); public interface NavigateTargetResponseCallback { - void onSuccess(Integer status, String data); + void onSuccess(Integer status, Optional data); void onError(Exception error); } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java index 66de8f0826d773..603640b68f0562 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java @@ -173,10 +173,10 @@ public String toString() { public static class ApplicationLauncherClusterApplicationEP { public ChipStructs.ApplicationLauncherClusterApplication application; - public String endpoint; + public Optional endpoint; public ApplicationLauncherClusterApplicationEP( - ChipStructs.ApplicationLauncherClusterApplication application, String endpoint) { + ChipStructs.ApplicationLauncherClusterApplication application, Optional endpoint) { this.application = application; this.endpoint = endpoint; } @@ -225,41 +225,6 @@ public String toString() { } } - public static class BindingClusterBindingEntry { - public Long nodeId; - public Integer groupId; - public Integer endpointId; - public Long clusterId; - - public BindingClusterBindingEntry( - Long nodeId, Integer groupId, Integer endpointId, Long clusterId) { - this.nodeId = nodeId; - this.groupId = groupId; - this.endpointId = endpointId; - this.clusterId = clusterId; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("BindingClusterBindingEntry {\n"); - output.append("\tnodeId: "); - output.append(nodeId); - output.append("\n"); - output.append("\tgroupId: "); - output.append(groupId); - output.append("\n"); - output.append("\tendpointId: "); - output.append(endpointId); - output.append("\n"); - output.append("\tclusterId: "); - output.append(clusterId); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } - } - public static class BridgedActionsClusterActionStruct { public Integer actionID; public String name; @@ -348,16 +313,16 @@ public String toString() { public static class ChannelClusterChannelInfo { public Integer majorNumber; public Integer minorNumber; - public String name; - public String callSign; - public String affiliateCallSign; + public Optional name; + public Optional callSign; + public Optional affiliateCallSign; public ChannelClusterChannelInfo( Integer majorNumber, Integer minorNumber, - String name, - String callSign, - String affiliateCallSign) { + Optional name, + Optional callSign, + Optional affiliateCallSign) { this.majorNumber = majorNumber; this.minorNumber = minorNumber; this.name = name; @@ -391,12 +356,15 @@ public String toString() { public static class ChannelClusterLineupInfo { public String operatorName; - public String lineupName; - public String postalCode; + public Optional lineupName; + public Optional postalCode; public Integer lineupInfoType; public ChannelClusterLineupInfo( - String operatorName, String lineupName, String postalCode, Integer lineupInfoType) { + String operatorName, + Optional lineupName, + Optional postalCode, + Integer lineupInfoType) { this.operatorName = operatorName; this.lineupName = lineupName; this.postalCode = postalCode; @@ -480,12 +448,12 @@ public String toString() { public static class ContentLauncherClusterParameter { public Integer type; public String value; - public ArrayList externalIDList; + public Optional> externalIDList; public ContentLauncherClusterParameter( Integer type, String value, - ArrayList externalIDList) { + Optional> externalIDList) { this.type = type; this.value = value; this.externalIDList = externalIDList; @@ -530,12 +498,14 @@ public String toString() { } public static class ContentLauncherClusterStyleInformation { - public String imageUrl; - public String color; - public ChipStructs.ContentLauncherClusterDimension size; + public Optional imageUrl; + public Optional color; + public Optional size; public ContentLauncherClusterStyleInformation( - String imageUrl, String color, ChipStructs.ContentLauncherClusterDimension size) { + Optional imageUrl, + Optional color, + Optional size) { this.imageUrl = imageUrl; this.color = color; this.size = size; @@ -561,19 +531,19 @@ public String toString() { public static class ContentLauncherClusterBrandingInformation { public String providerName; - public ChipStructs.ContentLauncherClusterStyleInformation background; - public ChipStructs.ContentLauncherClusterStyleInformation logo; - public ChipStructs.ContentLauncherClusterStyleInformation progressBar; - public ChipStructs.ContentLauncherClusterStyleInformation splash; - public ChipStructs.ContentLauncherClusterStyleInformation waterMark; + public Optional background; + public Optional logo; + public Optional progressBar; + public Optional splash; + public Optional waterMark; public ContentLauncherClusterBrandingInformation( String providerName, - ChipStructs.ContentLauncherClusterStyleInformation background, - ChipStructs.ContentLauncherClusterStyleInformation logo, - ChipStructs.ContentLauncherClusterStyleInformation progressBar, - ChipStructs.ContentLauncherClusterStyleInformation splash, - ChipStructs.ContentLauncherClusterStyleInformation waterMark) { + Optional background, + Optional logo, + Optional progressBar, + Optional splash, + Optional waterMark) { this.providerName = providerName; this.background = background; this.logo = logo; @@ -917,9 +887,9 @@ public String toString() { public static class MediaPlaybackClusterPlaybackPosition { public Long updatedAt; - public Long position; + public @Nullable Long position; - public MediaPlaybackClusterPlaybackPosition(Long updatedAt, Long position) { + public MediaPlaybackClusterPlaybackPosition(Long updatedAt, @Nullable Long position) { this.updatedAt = updatedAt; this.position = position; } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 0fdfd64b8345c0..f2fa8b50cb12c7 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -1052,31 +1052,6 @@ public void onError(Exception ex) { } } - public static class DelegatedBindingClusterBindingListAttributeCallback - implements ChipClusters.BindingCluster.BindingListAttributeCallback, - DelegatedClusterCallback { - private ClusterCommandCallback callback; - - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = - new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedBindingClusterServerGeneratedCommandListAttributeCallback implements ChipClusters.BindingCluster.ServerGeneratedCommandListAttributeCallback, DelegatedClusterCallback { @@ -1623,11 +1598,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, String data) { + public void onSuccess(Integer status, Optional data) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); - CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "String"); + CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "Optional"); responseValues.put(dataResponseValue, data); callback.onSuccess(responseValues); } @@ -5695,11 +5670,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, String data) { + public void onSuccess(Integer status, Optional data) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); - CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "String"); + CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "Optional"); responseValues.put(dataResponseValue, data); callback.onSuccess(responseValues); } @@ -7644,7 +7619,7 @@ public Map> getCommandMap() { Map applicationLauncherlaunchAppRequestCommandParams = new LinkedHashMap(); CommandParameterInfo applicationLauncherlaunchAppRequestdataCommandParameterInfo = - new CommandParameterInfo("data", byte[].class); + new CommandParameterInfo("data", Optional.class); applicationLauncherlaunchAppRequestCommandParams.put( "data", applicationLauncherlaunchAppRequestdataCommandParameterInfo); @@ -7656,7 +7631,7 @@ public Map> getCommandMap() { (ChipClusters.ApplicationLauncherCluster.LauncherResponseCallback) callback, (ChipStructs.ApplicationLauncherClusterApplication) commandArguments.get("application"), - (byte[]) commandArguments.get("data")); + (Optional) commandArguments.get("data")); }, () -> new DelegatedLauncherResponseCallback(), applicationLauncherlaunchAppRequestCommandParams); @@ -7761,6 +7736,70 @@ public Map> getCommandMap() { Map binaryInputBasicClusterInteractionInfoMap = new LinkedHashMap<>(); commandMap.put("binaryInputBasic", binaryInputBasicClusterInteractionInfoMap); Map bindingClusterInteractionInfoMap = new LinkedHashMap<>(); + Map bindingbindCommandParams = + new LinkedHashMap(); + CommandParameterInfo bindingbindnodeIdCommandParameterInfo = + new CommandParameterInfo("nodeId", Long.class); + bindingbindCommandParams.put("nodeId", bindingbindnodeIdCommandParameterInfo); + + CommandParameterInfo bindingbindgroupIdCommandParameterInfo = + new CommandParameterInfo("groupId", Integer.class); + bindingbindCommandParams.put("groupId", bindingbindgroupIdCommandParameterInfo); + + CommandParameterInfo bindingbindendpointIdCommandParameterInfo = + new CommandParameterInfo("endpointId", Integer.class); + bindingbindCommandParams.put("endpointId", bindingbindendpointIdCommandParameterInfo); + + CommandParameterInfo bindingbindclusterIdCommandParameterInfo = + new CommandParameterInfo("clusterId", Long.class); + bindingbindCommandParams.put("clusterId", bindingbindclusterIdCommandParameterInfo); + + InteractionInfo bindingbindInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BindingCluster) cluster) + .bind( + (DefaultClusterCallback) callback, + (Long) commandArguments.get("nodeId"), + (Integer) commandArguments.get("groupId"), + (Integer) commandArguments.get("endpointId"), + (Long) commandArguments.get("clusterId")); + }, + () -> new DelegatedDefaultClusterCallback(), + bindingbindCommandParams); + bindingClusterInteractionInfoMap.put("bind", bindingbindInteractionInfo); + Map bindingunbindCommandParams = + new LinkedHashMap(); + CommandParameterInfo bindingunbindnodeIdCommandParameterInfo = + new CommandParameterInfo("nodeId", Long.class); + bindingunbindCommandParams.put("nodeId", bindingunbindnodeIdCommandParameterInfo); + + CommandParameterInfo bindingunbindgroupIdCommandParameterInfo = + new CommandParameterInfo("groupId", Integer.class); + bindingunbindCommandParams.put("groupId", bindingunbindgroupIdCommandParameterInfo); + + CommandParameterInfo bindingunbindendpointIdCommandParameterInfo = + new CommandParameterInfo("endpointId", Integer.class); + bindingunbindCommandParams.put("endpointId", bindingunbindendpointIdCommandParameterInfo); + + CommandParameterInfo bindingunbindclusterIdCommandParameterInfo = + new CommandParameterInfo("clusterId", Long.class); + bindingunbindCommandParams.put("clusterId", bindingunbindclusterIdCommandParameterInfo); + + InteractionInfo bindingunbindInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BindingCluster) cluster) + .unbind( + (DefaultClusterCallback) callback, + (Long) commandArguments.get("nodeId"), + (Integer) commandArguments.get("groupId"), + (Integer) commandArguments.get("endpointId"), + (Long) commandArguments.get("clusterId")); + }, + () -> new DelegatedDefaultClusterCallback(), + bindingunbindCommandParams); + bindingClusterInteractionInfoMap.put("unbind", bindingunbindInteractionInfo); commandMap.put("binding", bindingClusterInteractionInfoMap); Map booleanStateClusterInteractionInfoMap = new LinkedHashMap<>(); commandMap.put("booleanState", booleanStateClusterInteractionInfoMap); @@ -8971,7 +9010,7 @@ public Map> getCommandMap() { "autoPlay", contentLauncherlaunchContentRequestautoPlayCommandParameterInfo); CommandParameterInfo contentLauncherlaunchContentRequestdataCommandParameterInfo = - new CommandParameterInfo("data", String.class); + new CommandParameterInfo("data", Optional.class); contentLauncherlaunchContentRequestCommandParams.put( "data", contentLauncherlaunchContentRequestdataCommandParameterInfo); @@ -8981,10 +9020,10 @@ public Map> getCommandMap() { ((ChipClusters.ContentLauncherCluster) cluster) .launchContentRequest( (ChipClusters.ContentLauncherCluster.LaunchResponseCallback) callback, - (Boolean) commandArguments.get("autoPlay"), - (String) commandArguments.get("data"), (ArrayList) - commandArguments.get("search")); + commandArguments.get("search"), + (Boolean) commandArguments.get("autoPlay"), + (Optional) commandArguments.get("data")); }, () -> new DelegatedLaunchResponseCallback(), contentLauncherlaunchContentRequestCommandParams); @@ -8998,7 +9037,7 @@ public Map> getCommandMap() { "contentURL", contentLauncherlaunchURLRequestcontentURLCommandParameterInfo); CommandParameterInfo contentLauncherlaunchURLRequestdisplayStringCommandParameterInfo = - new CommandParameterInfo("displayString", String.class); + new CommandParameterInfo("displayString", Optional.class); contentLauncherlaunchURLRequestCommandParams.put( "displayString", contentLauncherlaunchURLRequestdisplayStringCommandParameterInfo); @@ -9009,8 +9048,8 @@ public Map> getCommandMap() { .launchURLRequest( (ChipClusters.ContentLauncherCluster.LaunchResponseCallback) callback, (String) commandArguments.get("contentURL"), - (String) commandArguments.get("displayString"), - (ChipStructs.ContentLauncherClusterBrandingInformation) + (Optional) commandArguments.get("displayString"), + (Optional) commandArguments.get("brandingInformation")); }, () -> new DelegatedLaunchResponseCallback(), @@ -11232,7 +11271,7 @@ public Map> getCommandMap() { "target", targetNavigatornavigateTargetRequesttargetCommandParameterInfo); CommandParameterInfo targetNavigatornavigateTargetRequestdataCommandParameterInfo = - new CommandParameterInfo("data", String.class); + new CommandParameterInfo("data", Optional.class); targetNavigatornavigateTargetRequestCommandParams.put( "data", targetNavigatornavigateTargetRequestdataCommandParameterInfo); @@ -11243,7 +11282,7 @@ public Map> getCommandMap() { .navigateTargetRequest( (ChipClusters.TargetNavigatorCluster.NavigateTargetResponseCallback) callback, (Integer) commandArguments.get("target"), - (String) commandArguments.get("data")); + (Optional) commandArguments.get("data")); }, () -> new DelegatedNavigateTargetResponseCallback(), targetNavigatornavigateTargetRequestCommandParams); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index c369548f8b0024..accf46d2b05fb9 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -1157,19 +1157,6 @@ public Map> getReadAttributeMap() { readBinaryInputBasicClusterRevisionAttributeInteractionInfo); readAttributeMap.put("binaryInputBasic", readBinaryInputBasicInteractionInfo); Map readBindingInteractionInfo = new LinkedHashMap<>(); - Map readBindingBindingListCommandParams = - new LinkedHashMap(); - InteractionInfo readBindingBindingListAttributeInteractionInfo = - new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BindingCluster) cluster) - .readBindingListAttribute( - (ChipClusters.BindingCluster.BindingListAttributeCallback) callback); - }, - () -> new ClusterInfoMapping.DelegatedBindingClusterBindingListAttributeCallback(), - readBindingBindingListCommandParams); - readBindingInteractionInfo.put( - "readBindingListAttribute", readBindingBindingListAttributeInteractionInfo); Map readBindingServerGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readBindingServerGeneratedCommandListAttributeInteractionInfo = @@ -4955,7 +4942,8 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.MediaPlaybackCluster) cluster) - .readStartTimeAttribute((ChipClusters.LongAttributeCallback) callback); + .readStartTimeAttribute( + (ChipClusters.MediaPlaybackCluster.StartTimeAttributeCallback) callback); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), readMediaPlaybackStartTimeCommandParams); @@ -4967,7 +4955,8 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.MediaPlaybackCluster) cluster) - .readDurationAttribute((ChipClusters.LongAttributeCallback) callback); + .readDurationAttribute( + (ChipClusters.MediaPlaybackCluster.DurationAttributeCallback) callback); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), readMediaPlaybackDurationCommandParams); @@ -4991,7 +4980,8 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.MediaPlaybackCluster) cluster) - .readSeekRangeEndAttribute((ChipClusters.LongAttributeCallback) callback); + .readSeekRangeEndAttribute( + (ChipClusters.MediaPlaybackCluster.SeekRangeEndAttributeCallback) callback); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), readMediaPlaybackSeekRangeEndCommandParams); @@ -5003,7 +4993,8 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.MediaPlaybackCluster) cluster) - .readSeekRangeStartAttribute((ChipClusters.LongAttributeCallback) callback); + .readSeekRangeStartAttribute( + (ChipClusters.MediaPlaybackCluster.SeekRangeStartAttributeCallback) callback); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), readMediaPlaybackSeekRangeStartCommandParams); diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index b34baa7f5bdf99..543bfbad61449a 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -686,15 +686,28 @@ class ChipClusters: "clusterName": "Binding", "clusterId": 0x0000001E, "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "Bind", + "args": { + "nodeId": "int", + "groupId": "int", + "endpointId": "int", + "clusterId": "int", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "Unbind", + "args": { + "nodeId": "int", + "groupId": "int", + "endpointId": "int", + "clusterId": "int", + }, + }, }, "attributes": { - 0x00000000: { - "attributeName": "BindingList", - "attributeId": 0x00000000, - "type": "", - "reportable": True, - "writable": True, - }, 0x0000FFF8: { "attributeName": "ServerGeneratedCommandList", "attributeId": 0x0000FFF8, @@ -1066,14 +1079,12 @@ class ChipClusters: "attributeId": 0x00000001, "type": "", "reportable": True, - "writable": True, }, 0x00000002: { "attributeName": "CurrentChannel", "attributeId": 0x00000002, "type": "", "reportable": True, - "writable": True, }, 0x0000FFF8: { "attributeName": "ServerGeneratedCommandList", @@ -1671,9 +1682,9 @@ class ChipClusters: "commandId": 0x00000000, "commandName": "LaunchContentRequest", "args": { + "parameterList": "", "autoPlay": "bool", "data": "str", - "parameterList": "", }, }, 0x00000001: { @@ -3357,7 +3368,6 @@ class ChipClusters: "attributeId": 0x00000003, "type": "", "reportable": True, - "writable": True, }, 0x00000004: { "attributeName": "PlaybackSpeed", diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 16c5beb8d9549c..4d636baef8bb19 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -5542,7 +5542,6 @@ class Binding(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="bindingList", Tag=0x00000000, Type=typing.List[Binding.Structs.BindingEntry]), ClusterObjectFieldDescriptor(Label="serverGeneratedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="clientGeneratedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), @@ -5550,7 +5549,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - bindingList: 'typing.List[Binding.Structs.BindingEntry]' = None serverGeneratedCommandList: 'typing.List[uint]' = None clientGeneratedCommandList: 'typing.List[uint]' = None attributeList: 'typing.List[uint]' = None @@ -5558,9 +5556,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None - class Structs: + + class Commands: @dataclass - class BindingEntry(ClusterObject): + class Bind(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x001E + command_id: typing.ClassVar[int] = 0x0000 + is_client: typing.ClassVar[bool] = True + @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( @@ -5576,26 +5579,29 @@ def descriptor(cls) -> ClusterObjectDescriptor: endpointId: 'uint' = 0 clusterId: 'uint' = 0 - - - - class Attributes: @dataclass - class BindingList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x001E + class Unbind(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x001E + command_id: typing.ClassVar[int] = 0x0001 + is_client: typing.ClassVar[bool] = True @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="nodeId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="groupId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="endpointId", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterId", Tag=3, Type=uint), + ]) - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[Binding.Structs.BindingEntry]) + nodeId: 'uint' = 0 + groupId: 'uint' = 0 + endpointId: 'uint' = 0 + clusterId: 'uint' = 0 - value: 'typing.List[Binding.Structs.BindingEntry]' = field(default_factory=lambda: []) + class Attributes: @dataclass class ServerGeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -31173,7 +31179,7 @@ class WakeOnLan(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="wakeOnLanMacAddress", Tag=0x00000000, Type=str), + ClusterObjectFieldDescriptor(Label="wakeOnLanMacAddress", Tag=0x00000000, Type=typing.Optional[str]), ClusterObjectFieldDescriptor(Label="serverGeneratedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="clientGeneratedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), @@ -31181,7 +31187,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - wakeOnLanMacAddress: 'str' = None + wakeOnLanMacAddress: 'typing.Optional[str]' = None serverGeneratedCommandList: 'typing.List[uint]' = None clientGeneratedCommandList: 'typing.List[uint]' = None attributeList: 'typing.List[uint]' = None @@ -31204,9 +31210,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=str) + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'str' = "" + value: 'typing.Optional[str]' = None @dataclass class ServerGeneratedCommandList(ClusterAttributeDescriptor): @@ -31299,8 +31305,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="channelList", Tag=0x00000000, Type=typing.Optional[typing.List[Channel.Structs.ChannelInfo]]), - ClusterObjectFieldDescriptor(Label="channelLineup", Tag=0x00000001, Type=typing.Optional[Channel.Structs.LineupInfo]), - ClusterObjectFieldDescriptor(Label="currentChannel", Tag=0x00000002, Type=typing.Optional[Channel.Structs.ChannelInfo]), + ClusterObjectFieldDescriptor(Label="channelLineup", Tag=0x00000001, Type=typing.Union[None, Nullable, Channel.Structs.LineupInfo]), + ClusterObjectFieldDescriptor(Label="currentChannel", Tag=0x00000002, Type=typing.Union[None, Nullable, Channel.Structs.ChannelInfo]), ClusterObjectFieldDescriptor(Label="serverGeneratedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="clientGeneratedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), @@ -31309,8 +31315,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) channelList: 'typing.Optional[typing.List[Channel.Structs.ChannelInfo]]' = None - channelLineup: 'typing.Optional[Channel.Structs.LineupInfo]' = None - currentChannel: 'typing.Optional[Channel.Structs.ChannelInfo]' = None + channelLineup: 'typing.Union[None, Nullable, Channel.Structs.LineupInfo]' = None + currentChannel: 'typing.Union[None, Nullable, Channel.Structs.ChannelInfo]' = None serverGeneratedCommandList: 'typing.List[uint]' = None clientGeneratedCommandList: 'typing.List[uint]' = None attributeList: 'typing.List[uint]' = None @@ -31335,16 +31341,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="majorNumber", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="minorNumber", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=str), - ClusterObjectFieldDescriptor(Label="callSign", Tag=3, Type=str), - ClusterObjectFieldDescriptor(Label="affiliateCallSign", Tag=4, Type=str), + ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="callSign", Tag=3, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="affiliateCallSign", Tag=4, Type=typing.Optional[str]), ]) majorNumber: 'uint' = 0 minorNumber: 'uint' = 0 - name: 'str' = "" - callSign: 'str' = "" - affiliateCallSign: 'str' = "" + name: 'typing.Optional[str]' = None + callSign: 'typing.Optional[str]' = None + affiliateCallSign: 'typing.Optional[str]' = None @dataclass class LineupInfo(ClusterObject): @@ -31353,14 +31359,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="operatorName", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="lineupName", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="postalCode", Tag=2, Type=str), + ClusterObjectFieldDescriptor(Label="lineupName", Tag=1, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="postalCode", Tag=2, Type=typing.Optional[str]), ClusterObjectFieldDescriptor(Label="lineupInfoType", Tag=3, Type=Channel.Enums.LineupInfoTypeEnum), ]) operatorName: 'str' = "" - lineupName: 'str' = "" - postalCode: 'str' = "" + lineupName: 'typing.Optional[str]' = None + postalCode: 'typing.Optional[str]' = None lineupInfoType: 'Channel.Enums.LineupInfoTypeEnum' = 0 @@ -31460,9 +31466,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[Channel.Structs.LineupInfo]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, Channel.Structs.LineupInfo]) - value: 'typing.Optional[Channel.Structs.LineupInfo]' = None + value: 'typing.Union[None, Nullable, Channel.Structs.LineupInfo]' = None @dataclass class CurrentChannel(ClusterAttributeDescriptor): @@ -31476,9 +31482,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[Channel.Structs.ChannelInfo]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, Channel.Structs.ChannelInfo]) - value: 'typing.Optional[Channel.Structs.ChannelInfo]' = None + value: 'typing.Union[None, Nullable, Channel.Structs.ChannelInfo]' = None @dataclass class ServerGeneratedCommandList(ClusterAttributeDescriptor): @@ -31622,11 +31628,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="target", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), ]) target: 'uint' = 0 - data: 'str' = "" + data: 'typing.Optional[str]' = None @dataclass class NavigateTargetResponse(ClusterCommand): @@ -31639,11 +31645,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=TargetNavigator.Enums.StatusEnum), - ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), ]) status: 'TargetNavigator.Enums.StatusEnum' = 0 - data: 'str' = "" + data: 'typing.Optional[str]' = None class Attributes: @@ -31769,13 +31775,13 @@ class MediaPlayback(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="playbackState", Tag=0x00000000, Type=typing.Optional[MediaPlayback.Enums.PlaybackStateEnum]), - ClusterObjectFieldDescriptor(Label="startTime", Tag=0x00000001, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="duration", Tag=0x00000002, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="position", Tag=0x00000003, Type=MediaPlayback.Structs.PlaybackPosition), + ClusterObjectFieldDescriptor(Label="playbackState", Tag=0x00000000, Type=MediaPlayback.Enums.PlaybackStateEnum), + ClusterObjectFieldDescriptor(Label="startTime", Tag=0x00000001, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="duration", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="position", Tag=0x00000003, Type=typing.Optional[MediaPlayback.Structs.PlaybackPosition]), ClusterObjectFieldDescriptor(Label="playbackSpeed", Tag=0x00000004, Type=typing.Optional[float]), - ClusterObjectFieldDescriptor(Label="seekRangeEnd", Tag=0x00000005, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="seekRangeStart", Tag=0x00000006, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="seekRangeEnd", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="seekRangeStart", Tag=0x00000006, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="serverGeneratedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="clientGeneratedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), @@ -31783,13 +31789,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - playbackState: 'typing.Optional[MediaPlayback.Enums.PlaybackStateEnum]' = None - startTime: 'typing.Optional[uint]' = None - duration: 'typing.Optional[uint]' = None - position: 'MediaPlayback.Structs.PlaybackPosition' = None + playbackState: 'MediaPlayback.Enums.PlaybackStateEnum' = None + startTime: 'typing.Union[None, Nullable, uint]' = None + duration: 'typing.Union[None, Nullable, uint]' = None + position: 'typing.Optional[MediaPlayback.Structs.PlaybackPosition]' = None playbackSpeed: 'typing.Optional[float]' = None - seekRangeEnd: 'typing.Optional[uint]' = None - seekRangeStart: 'typing.Optional[uint]' = None + seekRangeEnd: 'typing.Union[None, Nullable, uint]' = None + seekRangeStart: 'typing.Union[None, Nullable, uint]' = None serverGeneratedCommandList: 'typing.List[uint]' = None clientGeneratedCommandList: 'typing.List[uint]' = None attributeList: 'typing.List[uint]' = None @@ -31820,11 +31826,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="updatedAt", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="position", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="position", Tag=1, Type=typing.Union[Nullable, uint]), ]) updatedAt: 'uint' = 0 - position: 'uint' = 0 + position: 'typing.Union[Nullable, uint]' = NullValue @@ -32007,9 +32013,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[MediaPlayback.Enums.PlaybackStateEnum]) + return ClusterObjectFieldDescriptor(Type=MediaPlayback.Enums.PlaybackStateEnum) - value: 'typing.Optional[MediaPlayback.Enums.PlaybackStateEnum]' = None + value: 'MediaPlayback.Enums.PlaybackStateEnum' = 0 @dataclass class StartTime(ClusterAttributeDescriptor): @@ -32023,9 +32029,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class Duration(ClusterAttributeDescriptor): @@ -32039,9 +32045,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class Position(ClusterAttributeDescriptor): @@ -32055,9 +32061,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=MediaPlayback.Structs.PlaybackPosition) + return ClusterObjectFieldDescriptor(Type=typing.Optional[MediaPlayback.Structs.PlaybackPosition]) - value: 'MediaPlayback.Structs.PlaybackPosition' = field(default_factory=lambda: MediaPlayback.Structs.PlaybackPosition()) + value: 'typing.Optional[MediaPlayback.Structs.PlaybackPosition]' = None @dataclass class PlaybackSpeed(ClusterAttributeDescriptor): @@ -32087,9 +32093,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class SeekRangeStart(ClusterAttributeDescriptor): @@ -32103,9 +32109,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class ServerGeneratedCommandList(ClusterAttributeDescriptor): @@ -32786,8 +32792,8 @@ class ContentLauncher(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="acceptHeaderList", Tag=0x00000000, Type=typing.List[str]), - ClusterObjectFieldDescriptor(Label="supportedStreamingProtocols", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="acceptHeaderList", Tag=0x00000000, Type=typing.Optional[typing.List[str]]), + ClusterObjectFieldDescriptor(Label="supportedStreamingProtocols", Tag=0x00000001, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="serverGeneratedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="clientGeneratedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), @@ -32795,8 +32801,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - acceptHeaderList: 'typing.List[str]' = None - supportedStreamingProtocols: 'uint' = None + acceptHeaderList: 'typing.Optional[typing.List[str]]' = None + supportedStreamingProtocols: 'typing.Optional[uint]' = None serverGeneratedCommandList: 'typing.List[uint]' = None clientGeneratedCommandList: 'typing.List[uint]' = None attributeList: 'typing.List[uint]' = None @@ -32866,12 +32872,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="type", Tag=0, Type=ContentLauncher.Enums.ParameterEnum), ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="externalIDList", Tag=2, Type=typing.List[ContentLauncher.Structs.AdditionalInfo]), + ClusterObjectFieldDescriptor(Label="externalIDList", Tag=2, Type=typing.Optional[typing.List[ContentLauncher.Structs.AdditionalInfo]]), ]) type: 'ContentLauncher.Enums.ParameterEnum' = 0 value: 'str' = "" - externalIDList: 'typing.List[ContentLauncher.Structs.AdditionalInfo]' = field(default_factory=lambda: []) + externalIDList: 'typing.Optional[typing.List[ContentLauncher.Structs.AdditionalInfo]]' = None @dataclass class ContentSearch(ClusterObject): @@ -32890,14 +32896,14 @@ class StyleInformation(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="imageUrl", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="color", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="size", Tag=2, Type=ContentLauncher.Structs.Dimension), + ClusterObjectFieldDescriptor(Label="imageUrl", Tag=0, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="color", Tag=1, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="size", Tag=2, Type=typing.Optional[ContentLauncher.Structs.Dimension]), ]) - imageUrl: 'str' = "" - color: 'str' = "" - size: 'ContentLauncher.Structs.Dimension' = field(default_factory=lambda: ContentLauncher.Structs.Dimension()) + imageUrl: 'typing.Optional[str]' = None + color: 'typing.Optional[str]' = None + size: 'typing.Optional[ContentLauncher.Structs.Dimension]' = None @dataclass class BrandingInformation(ClusterObject): @@ -32906,19 +32912,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="providerName", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="background", Tag=1, Type=ContentLauncher.Structs.StyleInformation), - ClusterObjectFieldDescriptor(Label="logo", Tag=2, Type=ContentLauncher.Structs.StyleInformation), - ClusterObjectFieldDescriptor(Label="progressBar", Tag=3, Type=ContentLauncher.Structs.StyleInformation), - ClusterObjectFieldDescriptor(Label="splash", Tag=4, Type=ContentLauncher.Structs.StyleInformation), - ClusterObjectFieldDescriptor(Label="waterMark", Tag=5, Type=ContentLauncher.Structs.StyleInformation), + ClusterObjectFieldDescriptor(Label="background", Tag=1, Type=typing.Optional[ContentLauncher.Structs.StyleInformation]), + ClusterObjectFieldDescriptor(Label="logo", Tag=2, Type=typing.Optional[ContentLauncher.Structs.StyleInformation]), + ClusterObjectFieldDescriptor(Label="progressBar", Tag=3, Type=typing.Optional[ContentLauncher.Structs.StyleInformation]), + ClusterObjectFieldDescriptor(Label="splash", Tag=4, Type=typing.Optional[ContentLauncher.Structs.StyleInformation]), + ClusterObjectFieldDescriptor(Label="waterMark", Tag=5, Type=typing.Optional[ContentLauncher.Structs.StyleInformation]), ]) providerName: 'str' = "" - background: 'ContentLauncher.Structs.StyleInformation' = field(default_factory=lambda: ContentLauncher.Structs.StyleInformation()) - logo: 'ContentLauncher.Structs.StyleInformation' = field(default_factory=lambda: ContentLauncher.Structs.StyleInformation()) - progressBar: 'ContentLauncher.Structs.StyleInformation' = field(default_factory=lambda: ContentLauncher.Structs.StyleInformation()) - splash: 'ContentLauncher.Structs.StyleInformation' = field(default_factory=lambda: ContentLauncher.Structs.StyleInformation()) - waterMark: 'ContentLauncher.Structs.StyleInformation' = field(default_factory=lambda: ContentLauncher.Structs.StyleInformation()) + background: 'typing.Optional[ContentLauncher.Structs.StyleInformation]' = None + logo: 'typing.Optional[ContentLauncher.Structs.StyleInformation]' = None + progressBar: 'typing.Optional[ContentLauncher.Structs.StyleInformation]' = None + splash: 'typing.Optional[ContentLauncher.Structs.StyleInformation]' = None + waterMark: 'typing.Optional[ContentLauncher.Structs.StyleInformation]' = None @@ -32933,14 +32939,14 @@ class LaunchContentRequest(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="autoPlay", Tag=0, Type=bool), - ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="search", Tag=2, Type=typing.List[ContentLauncher.Structs.ContentSearch]), + ClusterObjectFieldDescriptor(Label="search", Tag=0, Type=typing.List[ContentLauncher.Structs.ContentSearch]), + ClusterObjectFieldDescriptor(Label="autoPlay", Tag=1, Type=bool), + ClusterObjectFieldDescriptor(Label="data", Tag=2, Type=typing.Optional[str]), ]) - autoPlay: 'bool' = False - data: 'str' = "" search: 'typing.List[ContentLauncher.Structs.ContentSearch]' = field(default_factory=lambda: []) + autoPlay: 'bool' = False + data: 'typing.Optional[str]' = None @dataclass class LaunchURLRequest(ClusterCommand): @@ -32953,13 +32959,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="contentURL", Tag=0, Type=str), - ClusterObjectFieldDescriptor(Label="displayString", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="brandingInformation", Tag=2, Type=ContentLauncher.Structs.BrandingInformation), + ClusterObjectFieldDescriptor(Label="displayString", Tag=1, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="brandingInformation", Tag=2, Type=typing.Optional[ContentLauncher.Structs.BrandingInformation]), ]) contentURL: 'str' = "" - displayString: 'str' = "" - brandingInformation: 'ContentLauncher.Structs.BrandingInformation' = field(default_factory=lambda: ContentLauncher.Structs.BrandingInformation()) + displayString: 'typing.Optional[str]' = None + brandingInformation: 'typing.Optional[ContentLauncher.Structs.BrandingInformation]' = None @dataclass class LaunchResponse(ClusterCommand): @@ -32972,11 +32978,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=ContentLauncher.Enums.StatusEnum), - ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), ]) status: 'ContentLauncher.Enums.StatusEnum' = 0 - data: 'str' = "" + data: 'typing.Optional[str]' = None class Attributes: @@ -32992,9 +32998,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[str]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[str]]) - value: 'typing.List[str]' = field(default_factory=lambda: []) + value: 'typing.Optional[typing.List[str]]' = None @dataclass class SupportedStreamingProtocols(ClusterAttributeDescriptor): @@ -33008,9 +33014,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass class ServerGeneratedCommandList(ClusterAttributeDescriptor): @@ -33305,7 +33311,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="applicationLauncherList", Tag=0x00000000, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="applicationLauncherApp", Tag=0x00000001, Type=ApplicationLauncher.Structs.ApplicationEP), + ClusterObjectFieldDescriptor(Label="applicationLauncherApp", Tag=0x00000001, Type=typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEP]), ClusterObjectFieldDescriptor(Label="serverGeneratedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="clientGeneratedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), @@ -33314,7 +33320,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) applicationLauncherList: 'typing.List[uint]' = None - applicationLauncherApp: 'ApplicationLauncher.Structs.ApplicationEP' = None + applicationLauncherApp: 'typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEP]' = None serverGeneratedCommandList: 'typing.List[uint]' = None clientGeneratedCommandList: 'typing.List[uint]' = None attributeList: 'typing.List[uint]' = None @@ -33349,11 +33355,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="application", Tag=0, Type=ApplicationLauncher.Structs.Application), - ClusterObjectFieldDescriptor(Label="endpoint", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="endpoint", Tag=1, Type=typing.Optional[uint]), ]) application: 'ApplicationLauncher.Structs.Application' = field(default_factory=lambda: ApplicationLauncher.Structs.Application()) - endpoint: 'str' = "" + endpoint: 'typing.Optional[uint]' = None @@ -33369,11 +33375,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="application", Tag=0, Type=ApplicationLauncher.Structs.Application), - ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=bytes), + ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[bytes]), ]) application: 'ApplicationLauncher.Structs.Application' = field(default_factory=lambda: ApplicationLauncher.Structs.Application()) - data: 'bytes' = b"" + data: 'typing.Optional[bytes]' = None @dataclass class StopAppRequest(ClusterCommand): @@ -33452,9 +33458,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=ApplicationLauncher.Structs.ApplicationEP) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEP]) - value: 'ApplicationLauncher.Structs.ApplicationEP' = field(default_factory=lambda: ApplicationLauncher.Structs.ApplicationEP()) + value: 'typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEP]' = None @dataclass class ServerGeneratedCommandList(ClusterAttributeDescriptor): @@ -33546,10 +33552,10 @@ class ApplicationBasic(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="vendorName", Tag=0x00000000, Type=str), - ClusterObjectFieldDescriptor(Label="vendorId", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="vendorName", Tag=0x00000000, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="vendorId", Tag=0x00000001, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="applicationName", Tag=0x00000002, Type=str), - ClusterObjectFieldDescriptor(Label="productId", Tag=0x00000003, Type=uint), + ClusterObjectFieldDescriptor(Label="productId", Tag=0x00000003, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="applicationApp", Tag=0x00000004, Type=ApplicationBasic.Structs.ApplicationBasicApplication), ClusterObjectFieldDescriptor(Label="applicationStatus", Tag=0x00000005, Type=ApplicationBasic.Enums.ApplicationStatusEnum), ClusterObjectFieldDescriptor(Label="applicationVersion", Tag=0x00000006, Type=str), @@ -33561,10 +33567,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - vendorName: 'str' = None - vendorId: 'uint' = None + vendorName: 'typing.Optional[str]' = None + vendorId: 'typing.Optional[uint]' = None applicationName: 'str' = None - productId: 'uint' = None + productId: 'typing.Optional[uint]' = None applicationApp: 'ApplicationBasic.Structs.ApplicationBasicApplication' = None applicationStatus: 'ApplicationBasic.Enums.ApplicationStatusEnum' = None applicationVersion: 'str' = None @@ -33613,9 +33619,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=str) + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'str' = "" + value: 'typing.Optional[str]' = None @dataclass class VendorId(ClusterAttributeDescriptor): @@ -33629,9 +33635,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass class ApplicationName(ClusterAttributeDescriptor): @@ -33661,9 +33667,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass class ApplicationApp(ClusterAttributeDescriptor): diff --git a/src/controller/tests/TestReadChunking.cpp b/src/controller/tests/TestReadChunking.cpp index 5bb4b2ad11ddf2..d704e16fb94f5e 100644 --- a/src/controller/tests/TestReadChunking.cpp +++ b/src/controller/tests/TestReadChunking.cpp @@ -145,16 +145,13 @@ class TestAttrAccess : public app::AttributeAccessInterface registerAttributeAccessOverride(this); } - CHIP_ERROR Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(FabricIndex fabricIndex, const app::ConcreteDataAttributePath & aPath, - app::AttributeValueDecoder & aDecoder) override; + CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override; + CHIP_ERROR Write(const app::ConcreteDataAttributePath & aPath, app::AttributeValueDecoder & aDecoder) override; }; TestAttrAccess gAttrAccess; -CHIP_ERROR TestAttrAccess::Read(FabricIndex fabricIndex, const app::ConcreteReadAttributePath & aPath, - app::AttributeValueEncoder & aEncoder) +CHIP_ERROR TestAttrAccess::Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) { switch (aPath.mAttributeId) { @@ -177,8 +174,7 @@ CHIP_ERROR TestAttrAccess::Read(FabricIndex fabricIndex, const app::ConcreteRead } } -CHIP_ERROR TestAttrAccess::Write(FabricIndex fabricIndex, const app::ConcreteDataAttributePath & aPath, - app::AttributeValueDecoder & aDecoder) +CHIP_ERROR TestAttrAccess::Write(const app::ConcreteDataAttributePath & aPath, app::AttributeValueDecoder & aDecoder) { return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } diff --git a/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj b/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj index 04a4ac77eab565..8efc153410d354 100644 --- a/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj +++ b/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj @@ -11,7 +11,7 @@ 2C21071525D1A8F200DDA4AD /* MultiAdminViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C21071325D1A8F200DDA4AD /* MultiAdminViewController.m */; }; 2C460C2425D7594B000512D6 /* DeviceSelector.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C460C2325D7594B000512D6 /* DeviceSelector.m */; }; 2C460C3225D97CB3000512D6 /* UnpairDevicesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C460C3025D97CB3000512D6 /* UnpairDevicesViewController.m */; }; - 991DC091247747F500C13860 /* EchoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 991DC090247747F500C13860 /* EchoViewController.m */; }; + 991DC091247747F500C13860 /* EnumerateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 991DC090247747F500C13860 /* EnumerateViewController.m */; }; 997A639C253F93F7005C64E6 /* CHIP.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 997A639B253F93F7005C64E6 /* CHIP.framework */; }; 997A639D253F93F7005C64E6 /* CHIP.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 997A639B253F93F7005C64E6 /* CHIP.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; B204A621244E1D0600C7C0E1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B204A620244E1D0600C7C0E1 /* AppDelegate.m */; }; @@ -62,8 +62,8 @@ 2C460C2325D7594B000512D6 /* DeviceSelector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeviceSelector.m; sourceTree = ""; }; 2C460C3025D97CB3000512D6 /* UnpairDevicesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UnpairDevicesViewController.m; sourceTree = ""; }; 2C460C3125D97CB3000512D6 /* UnpairDevicesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnpairDevicesViewController.h; sourceTree = ""; }; - 991DC08F247747F500C13860 /* EchoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EchoViewController.h; sourceTree = ""; }; - 991DC090247747F500C13860 /* EchoViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EchoViewController.m; sourceTree = ""; }; + 991DC08F247747F500C13860 /* EnumerateViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EnumerateViewController.h; sourceTree = ""; }; + 991DC090247747F500C13860 /* EnumerateViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EnumerateViewController.m; sourceTree = ""; }; 997A639B253F93F7005C64E6 /* CHIP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = CHIP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; B204A61C244E1D0600C7C0E1 /* CHIPTool.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CHIPTool.app; sourceTree = BUILT_PRODUCTS_DIR; }; B204A61F244E1D0600C7C0E1 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; @@ -123,13 +123,13 @@ path = QRCode; sourceTree = ""; }; - 0C79937924858B4F0047A373 /* Echo client */ = { + 0C79937924858B4F0047A373 /* Enumeration */ = { isa = PBXGroup; children = ( - 991DC08F247747F500C13860 /* EchoViewController.h */, - 991DC090247747F500C13860 /* EchoViewController.m */, + 991DC08F247747F500C13860 /* EnumerateViewController.h */, + 991DC090247747F500C13860 /* EnumerateViewController.m */, ); - path = "Echo client"; + path = Enumeration; sourceTree = ""; }; 0CA0E0D0248599C4009087B9 /* OnOffCluster */ = { @@ -236,7 +236,7 @@ B2946A3F24C99D21005C87D0 /* WiFi */, 0C79937824858B3B0047A373 /* QRCode */, B2C22672262892D7009DAB8B /* Fabric */, - 0C79937924858B4F0047A373 /* Echo client */, + 0C79937924858B4F0047A373 /* Enumeration */, 0CA0E0D0248599C4009087B9 /* OnOffCluster */, ); path = "View Controllers"; @@ -393,7 +393,7 @@ 2C460C3225D97CB3000512D6 /* UnpairDevicesViewController.m in Sources */, B232D8BA2514BD0800792CB4 /* CHIPUIViewUtils.m in Sources */, B2946A9B24C9A7BF005C87D0 /* DefaultsUtils.m in Sources */, - 991DC091247747F500C13860 /* EchoViewController.m in Sources */, + 991DC091247747F500C13860 /* EnumerateViewController.m in Sources */, B2C2267526289324009DAB8B /* FabricUIViewController.m in Sources */, B2B0209225C9C1AC00A4C220 /* BindingsViewController.m in Sources */, B204A621244E1D0600C7C0E1 /* AppDelegate.m in Sources */, diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.m index 15c639d87b0c63..bbd69810d05499 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Bindings/BindingsViewController.m @@ -132,25 +132,12 @@ - (IBAction)bind:(id)sender uint64_t nodeId; NSScanner * scanner = [NSScanner scannerWithString:_nodeIDTextField.text]; [scanner scanUnsignedLongLong:&nodeId]; - int endpointId = [_endpointIDTextField.text intValue]; - int groupId = [_groupIDTextField.text intValue]; - int clusterId = [_clusterIDTextField.text intValue]; + // TODO Binding Support was removed from ObjC Clusters.h if (CHIPGetConnectedDevice(^(CHIPDevice * _Nullable chipDevice, NSError * _Nullable error) { if (chipDevice) { - CHIPBinding * cluster = [[CHIPBinding alloc] initWithDevice:chipDevice endpoint:0 queue:dispatch_get_main_queue()]; - __auto_type * params = [[CHIPBindingClusterBindParams alloc] init]; - params.nodeId = @(nodeId); - params.groupId = @(groupId); - params.endpointId = @(endpointId); - params.clusterId = @(clusterId); - [cluster bindWithParams:params - completionHandler:^(NSError * _Nullable error) { - NSString * resultString = (error == nil) - ? @"Bind command: success!" - : [NSString stringWithFormat:@"An error occurred: 0x%02lx", error.code]; - NSLog(resultString, nil); - }]; + NSString * resultString = [NSString stringWithFormat:@"Not Supported"]; + NSLog(resultString, nil); } else { NSLog(@"Status: Failed to establish a connection with the device"); } @@ -163,26 +150,10 @@ - (IBAction)bind:(id)sender - (IBAction)unbind:(id)sender { - int nodeId = [_nodeIDTextField.text intValue]; - int endpointId = [_endpointIDTextField.text intValue]; - int groupId = [_groupIDTextField.text intValue]; - int clusterId = [_clusterIDTextField.text intValue]; - if (CHIPGetConnectedDevice(^(CHIPDevice * _Nullable chipDevice, NSError * _Nullable error) { if (chipDevice) { - CHIPBinding * cluster = [[CHIPBinding alloc] initWithDevice:chipDevice endpoint:0 queue:dispatch_get_main_queue()]; - __auto_type * params = [[CHIPBindingClusterUnbindParams alloc] init]; - params.nodeId = @(nodeId); - params.groupId = @(groupId); - params.endpointId = @(endpointId); - params.clusterId = @(clusterId); - [cluster unbindWithParams:params - completionHandler:^(NSError * _Nullable error) { - NSString * resultString = (error == nil) - ? @"Unbind command: success!" - : [NSString stringWithFormat:@"An error occurred: 0x%02lx", error.code]; - NSLog(resultString, nil); - }]; + NSString * resultString = [NSString stringWithFormat:@"Not Supported"]; + NSLog(resultString, nil); } else { NSLog(@"Status: Failed to establish a connection with the device"); } diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Echo client/EchoViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/Echo client/EchoViewController.m deleted file mode 100644 index 69364376a602a5..00000000000000 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/Echo client/EchoViewController.m +++ /dev/null @@ -1,117 +0,0 @@ -/** - * - * Copyright (c) 2020 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "EchoViewController.h" - -#import "CHIPUIViewUtils.h" -#import "DefaultsUtils.h" - -@interface EchoViewController () - -@property (strong, nonatomic) UITextField * messageTextField; -@property (strong, nonatomic) UIButton * sendButton; - -@property (nonatomic, strong) UILabel * resultLabel; -@property (nonatomic, strong) UIStackView * stackView; - -@end - -@implementation EchoViewController - -// MARK: UIViewController methods - -- (void)viewDidLoad -{ - [super viewDidLoad]; - [self setupUIElements]; - - // listen for taps to dismiss the keyboard - UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboard)]; - [self.view addGestureRecognizer:tap]; -} - -- (void)dismissKeyboard -{ - [self.messageTextField resignFirstResponder]; -} - -// MARK: UI Setup - -- (void)setupUIElements -{ - self.view.backgroundColor = UIColor.whiteColor; - - // Title - UILabel * titleLabel = [CHIPUIViewUtils addTitle:@"Echo client" toView:self.view]; - - // stack view - _stackView = [UIStackView new]; - _stackView.axis = UILayoutConstraintAxisVertical; - _stackView.distribution = UIStackViewDistributionEqualSpacing; - _stackView.alignment = UIStackViewAlignmentLeading; - _stackView.spacing = 30; - [self.view addSubview:_stackView]; - - _stackView.translatesAutoresizingMaskIntoConstraints = false; - [_stackView.topAnchor constraintEqualToAnchor:titleLabel.bottomAnchor constant:30].active = YES; - [_stackView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor constant:30].active = YES; - [_stackView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor constant:-30].active = YES; - - // Send message - _messageTextField = [UITextField new]; - _messageTextField.placeholder = @"Hello from iOS!"; - _sendButton = [UIButton new]; - [_sendButton setTitle:@"Send" forState:UIControlStateNormal]; - [_sendButton addTarget:self action:@selector(sendMessage:) forControlEvents:UIControlEventTouchUpInside]; - UIView * sendMessageView = [CHIPUIViewUtils viewWithUITextField:_messageTextField button:_sendButton]; - [_stackView addArrangedSubview:sendMessageView]; - sendMessageView.translatesAutoresizingMaskIntoConstraints = false; - [sendMessageView.trailingAnchor constraintEqualToAnchor:_stackView.trailingAnchor].active = YES; - - // Result message - _resultLabel = [UILabel new]; - _resultLabel.hidden = YES; - _resultLabel.font = [UIFont systemFontOfSize:17]; - _resultLabel.textColor = UIColor.systemBlueColor; - _resultLabel.lineBreakMode = NSLineBreakByWordWrapping; - _resultLabel.numberOfLines = 0; - [_stackView addArrangedSubview:_resultLabel]; - - _resultLabel.translatesAutoresizingMaskIntoConstraints = false; - [_resultLabel.trailingAnchor constraintEqualToAnchor:_stackView.trailingAnchor].active = YES; - _resultLabel.adjustsFontSizeToFitWidth = YES; -} - -- (void)updateResult:(NSString *)result -{ - _resultLabel.hidden = NO; - _resultLabel.text = result; -} - -// MARK: UIButton actions - -- (IBAction)sendMessage:(id)sender -{ - NSString * msg = [self.messageTextField text]; - if (msg.length == 0) { - msg = [self.messageTextField placeholder]; - } - - [self updateResult:@"Not Supported"]; -} - -@end diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Echo client/EchoViewController.h b/src/darwin/CHIPTool/CHIPTool/View Controllers/Enumeration/EnumerateViewController.h similarity index 93% rename from src/darwin/CHIPTool/CHIPTool/View Controllers/Echo client/EchoViewController.h rename to src/darwin/CHIPTool/CHIPTool/View Controllers/Enumeration/EnumerateViewController.h index 898401965278bb..3f4f487a2130ce 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/Echo client/EchoViewController.h +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Enumeration/EnumerateViewController.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface EchoViewController : UIViewController +@interface EnumerateViewController : UIViewController @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Enumeration/EnumerateViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/Enumeration/EnumerateViewController.m new file mode 100644 index 00000000000000..92cd4e822bafda --- /dev/null +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Enumeration/EnumerateViewController.m @@ -0,0 +1,168 @@ +/** + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "EnumerateViewController.h" + +#import "CHIPUIViewUtils.h" +#import "DefaultsUtils.h" + +@interface EnumerateViewController () + +@property (strong, nonatomic) UIButton * sendButton; + +@property (nonatomic, strong) UILabel * resultLabel; +@property (nonatomic, strong) UIStackView * stackView; + +@end + +@implementation EnumerateViewController + +// MARK: UIViewController methods + +- (void)viewDidLoad +{ + [super viewDidLoad]; + [self setupUIElements]; +} + +// MARK: UI Setup + +- (void)setupUIElements +{ + self.view.backgroundColor = UIColor.whiteColor; + + // Title + UILabel * titleLabel = [CHIPUIViewUtils addTitle:@"Enumeration" toView:self.view]; + + // stack view + _stackView = [UIStackView new]; + _stackView.axis = UILayoutConstraintAxisVertical; + _stackView.distribution = UIStackViewDistributionEqualSpacing; + _stackView.alignment = UIStackViewAlignmentLeading; + _stackView.spacing = 30; + [self.view addSubview:_stackView]; + + _stackView.translatesAutoresizingMaskIntoConstraints = false; + [_stackView.topAnchor constraintEqualToAnchor:titleLabel.bottomAnchor constant:30].active = YES; + [_stackView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor constant:30].active = YES; + [_stackView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor constant:-30].active = YES; + + // Send message + _sendButton = [UIButton new]; + [_sendButton setTitle:@"Start" forState:UIControlStateNormal]; + [_sendButton addTarget:self action:@selector(sendMessage:) forControlEvents:UIControlEventTouchUpInside]; + UIView * startView = [CHIPUIViewUtils stackViewWithButtons:@[ _sendButton ]]; + [_stackView addArrangedSubview:startView]; + startView.translatesAutoresizingMaskIntoConstraints = false; + [startView.trailingAnchor constraintEqualToAnchor:_stackView.trailingAnchor].active = YES; + + // Result message + _resultLabel = [UILabel new]; + _resultLabel.hidden = YES; + _resultLabel.font = [UIFont systemFontOfSize:17]; + _resultLabel.textColor = UIColor.systemBlueColor; + _resultLabel.lineBreakMode = NSLineBreakByWordWrapping; + _resultLabel.numberOfLines = 0; + [_stackView addArrangedSubview:_resultLabel]; + + _resultLabel.translatesAutoresizingMaskIntoConstraints = false; + [_resultLabel.trailingAnchor constraintEqualToAnchor:_stackView.trailingAnchor].active = YES; + _resultLabel.adjustsFontSizeToFitWidth = YES; +} + +- (void)updateResult:(NSString *)result +{ + NSLog(@"UpdatingUIResult: %@", result); + _resultLabel.hidden = NO; + _resultLabel.text = result; +} + +// MARK: UIButton actions + +- (IBAction)sendMessage:(id)sender +{ + [self updateResult:@"Enumerating..."]; + [self enumerate]; +} + +// MARK: Enumeration Implementation + +// This API just walks over the accessory and tries to display its information. +// 1. Get the endpoint list +// 2. Get the device list on each endpoint +// 3. Get the clusters in use on each endpoint +// 4. Success? +- (void)enumerate +{ + CHIPGetConnectedDevice(^(CHIPDevice * _Nullable device, NSError * _Nullable error) { + if (error) { + NSString * resultLog = [[NSString alloc] initWithFormat:@"Unable to get connected device: Error: %@", error]; + [self updateResult:resultLog]; + return; + } + + CHIPDescriptor * descriptorCluster = [[CHIPDescriptor alloc] initWithDevice:device + endpoint:0 + queue:dispatch_get_main_queue()]; + NSLog(@"Reading parts list to get list of endpoints in use..."); + [descriptorCluster readAttributePartsListWithCompletionHandler:^( + NSArray * _Nullable endpointsInUse, NSError * _Nullable error) { + if (error) { + NSString * resultLog = [[NSString alloc] initWithFormat:@"Unable to read parts list: Error: %@", error]; + [self updateResult:resultLog]; + return; + } + + NSString * resultLog = [[NSString alloc] initWithFormat:@"Got list of endpoints in Use: %@", endpointsInUse]; + [self updateResult:resultLog]; + + for (NSNumber * endpoint in endpointsInUse) { + CHIPDescriptor * descriptorCluster = [[CHIPDescriptor alloc] initWithDevice:device + endpoint:[endpoint unsignedShortValue] + queue:dispatch_get_main_queue()]; + [descriptorCluster readAttributeDeviceListWithCompletionHandler:^( + NSArray * _Nullable value, NSError * _Nullable error) { + if (error) { + NSString * resultLog = [[NSString alloc] + initWithFormat:@"Unable to read device list for Endpoint:%@ Error: %@", endpoint, error]; + [self updateResult:resultLog]; + return; + } + + NSString * resultLog = [[NSString alloc] initWithFormat:@"Got device list for endpoint:%@ %@", endpoint, value]; + [self updateResult:resultLog]; + + [descriptorCluster + readAttributeServerListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + if (error) { + NSString * resultLog = [[NSString alloc] + initWithFormat:@"Unable to read server list for Endpoint:%@ Error: %@", endpoint, error]; + [self updateResult:resultLog]; + return; + } + + NSString * resultLog = + [[NSString alloc] initWithFormat:@"Got server list for endpoint:%@ %@", endpoint, value]; + [self updateResult:resultLog]; + }]; + }]; + } + }]; + }); +} + +@end diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/RootViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/RootViewController.m index 707b8cc1e8287d..4f40582ae8f295 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/RootViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/RootViewController.m @@ -17,7 +17,7 @@ #import "RootViewController.h" #import "BindingsViewController.h" -#import "EchoViewController.h" +#import "EnumerateViewController.h" #import "FabricUIViewController.h" #import "MultiAdminViewController.h" #import "OnOffViewController.h" @@ -42,7 +42,7 @@ - (void)setUpTableView self.tableView.dataSource = self; [self.view addSubview:self.tableView]; self.options = @[ - @"QRCode scanner", @"Echo client", @"Light on / off cluster", @"Temperature Sensor", @"Bindings", @"WiFi Configuration", + @"QRCode scanner", @"Enumeration", @"Light on / off cluster", @"Temperature Sensor", @"Bindings", @"WiFi Configuration", @"Enable Pairing", @"Unpair Devices", @"Fabric Management" ]; } @@ -73,7 +73,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath [self pushQRCodeScanner]; break; case 1: - [self pushEchoClient]; + [self pushEnumeration]; break; case 2: [self pushLightOnOffCluster]; @@ -131,9 +131,9 @@ - (void)pushQRCodeScanner [self.navigationController pushViewController:controller animated:YES]; } -- (void)pushEchoClient +- (void)pushEnumeration { - EchoViewController * controller = [EchoViewController new]; + EnumerateViewController * controller = [EnumerateViewController new]; [self.navigationController pushViewController:controller animated:YES]; } diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Temperature Sensor/TemperatureSensorViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/Temperature Sensor/TemperatureSensorViewController.m index d4225aafe29648..58581b7c8742bb 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/Temperature Sensor/TemperatureSensorViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Temperature Sensor/TemperatureSensorViewController.m @@ -201,25 +201,18 @@ - (void)reportFromUserEnteredSettings if (chipDevice) { CHIPTemperatureMeasurement * cluster = [[CHIPTemperatureMeasurement alloc] initWithDevice:chipDevice endpoint:1 queue:dispatch_get_main_queue()]; - // TODO - Fix temperature reporting in iOS CHIPTool - /* - [cluster - subscribeAttributeMeasuredValueWithMinInterval:minIntervalSeconds - maxInterval:maxIntervalSeconds - responseHandler:^(NSError * error, NSDictionary * values) { - if (error == nil) - return; - NSLog(@"Status: update reportAttributeMeasuredValue completed with error %@", - [error description]); - }]; - - [cluster reportAttributeMeasuredValueWithResponseHandler:^(NSError * error, NSDictionary * values) { - if (error != nil) - return; - NSNumber * value = values[@"value"]; - [self updateTempInUI:value.shortValue]; - }]; - */ + [cluster subscribeAttributeMeasuredValueWithMinInterval:minIntervalSeconds + maxInterval:maxIntervalSeconds + subscriptionEstablished:^{ + + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + if (error) { + NSLog(@"Status: update reportAttributeMeasuredValue completed with error %@", [error description]); + return; + } + [self updateTempInUI:value.shortValue]; + }]; } else { NSLog(@"Status: Failed to establish a connection with the device"); } diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 4a7e94629ea28e..078a32c6ecd4bb 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -714,16 +714,22 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - CHIPApplicationLauncherClusterApplicationEP * _Nonnull value; - value = [CHIPApplicationLauncherClusterApplicationEP new]; - value.application = [CHIPApplicationLauncherClusterApplication new]; - value.application.catalogVendorId = [NSNumber numberWithUnsignedShort:cppValue.application.catalogVendorId]; - value.application.applicationId = [[NSString alloc] initWithBytes:cppValue.application.applicationId.data() - length:cppValue.application.applicationId.size() - encoding:NSUTF8StringEncoding]; - value.endpoint = [[NSString alloc] initWithBytes:cppValue.endpoint.data() - length:cppValue.endpoint.size() - encoding:NSUTF8StringEncoding]; + CHIPApplicationLauncherClusterApplicationEP * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [CHIPApplicationLauncherClusterApplicationEP new]; + value.application = [CHIPApplicationLauncherClusterApplication new]; + value.application.catalogVendorId = [NSNumber numberWithUnsignedShort:cppValue.Value().application.catalogVendorId]; + value.application.applicationId = [[NSString alloc] initWithBytes:cppValue.Value().application.applicationId.data() + length:cppValue.Value().application.applicationId.size() + encoding:NSUTF8StringEncoding]; + if (cppValue.Value().endpoint.HasValue()) { + value.endpoint = [NSNumber numberWithUnsignedShort:cppValue.Value().endpoint.Value()]; + } else { + value.endpoint = nil; + } + } return value; } case Attributes::ServerGeneratedCommandList::Id: { @@ -1544,36 +1550,6 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader case Clusters::Binding::Id: { using namespace Clusters::Binding; switch (aPath.mAttributeId) { - case Attributes::BindingList::Id: { - using TypeInfo = Attributes::BindingList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - CHIPBindingClusterBindingEntry * newElement_0; - newElement_0 = [CHIPBindingClusterBindingEntry new]; - newElement_0.nodeId = [NSNumber numberWithUnsignedLongLong:entry_0.nodeId]; - newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; - newElement_0.endpointId = [NSNumber numberWithUnsignedShort:entry_0.endpointId]; - newElement_0.clusterId = [NSNumber numberWithUnsignedInt:entry_0.clusterId]; - [array_0 addObject:newElement_0]; - } - { // Scope for the error so we will know what it's named - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - } - value = array_0; - return value; - } case Attributes::ServerGeneratedCommandList::Id: { using TypeInfo = Attributes::ServerGeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -2239,15 +2215,27 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader newElement_0 = [CHIPChannelClusterChannelInfo new]; newElement_0.majorNumber = [NSNumber numberWithUnsignedShort:entry_0.majorNumber]; newElement_0.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.minorNumber]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; - newElement_0.callSign = [[NSString alloc] initWithBytes:entry_0.callSign.data() - length:entry_0.callSign.size() + if (entry_0.name.HasValue()) { + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() + length:entry_0.name.Value().size() encoding:NSUTF8StringEncoding]; - newElement_0.affiliateCallSign = [[NSString alloc] initWithBytes:entry_0.affiliateCallSign.data() - length:entry_0.affiliateCallSign.size() - encoding:NSUTF8StringEncoding]; + } else { + newElement_0.name = nil; + } + if (entry_0.callSign.HasValue()) { + newElement_0.callSign = [[NSString alloc] initWithBytes:entry_0.callSign.Value().data() + length:entry_0.callSign.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + newElement_0.callSign = nil; + } + if (entry_0.affiliateCallSign.HasValue()) { + newElement_0.affiliateCallSign = [[NSString alloc] initWithBytes:entry_0.affiliateCallSign.Value().data() + length:entry_0.affiliateCallSign.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + newElement_0.affiliateCallSign = nil; + } [array_0 addObject:newElement_0]; } { // Scope for the error so we will know what it's named @@ -2267,18 +2255,30 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - CHIPChannelClusterLineupInfo * _Nonnull value; - value = [CHIPChannelClusterLineupInfo new]; - value.operatorName = [[NSString alloc] initWithBytes:cppValue.operatorName.data() - length:cppValue.operatorName.size() - encoding:NSUTF8StringEncoding]; - value.lineupName = [[NSString alloc] initWithBytes:cppValue.lineupName.data() - length:cppValue.lineupName.size() - encoding:NSUTF8StringEncoding]; - value.postalCode = [[NSString alloc] initWithBytes:cppValue.postalCode.data() - length:cppValue.postalCode.size() - encoding:NSUTF8StringEncoding]; - value.lineupInfoType = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.lineupInfoType)]; + CHIPChannelClusterLineupInfo * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [CHIPChannelClusterLineupInfo new]; + value.operatorName = [[NSString alloc] initWithBytes:cppValue.Value().operatorName.data() + length:cppValue.Value().operatorName.size() + encoding:NSUTF8StringEncoding]; + if (cppValue.Value().lineupName.HasValue()) { + value.lineupName = [[NSString alloc] initWithBytes:cppValue.Value().lineupName.Value().data() + length:cppValue.Value().lineupName.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + value.lineupName = nil; + } + if (cppValue.Value().postalCode.HasValue()) { + value.postalCode = [[NSString alloc] initWithBytes:cppValue.Value().postalCode.Value().data() + length:cppValue.Value().postalCode.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + value.postalCode = nil; + } + value.lineupInfoType = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().lineupInfoType)]; + } return value; } case Attributes::CurrentChannel::Id: { @@ -2288,19 +2288,35 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - CHIPChannelClusterChannelInfo * _Nonnull value; - value = [CHIPChannelClusterChannelInfo new]; - value.majorNumber = [NSNumber numberWithUnsignedShort:cppValue.majorNumber]; - value.minorNumber = [NSNumber numberWithUnsignedShort:cppValue.minorNumber]; - value.name = [[NSString alloc] initWithBytes:cppValue.name.data() - length:cppValue.name.size() - encoding:NSUTF8StringEncoding]; - value.callSign = [[NSString alloc] initWithBytes:cppValue.callSign.data() - length:cppValue.callSign.size() - encoding:NSUTF8StringEncoding]; - value.affiliateCallSign = [[NSString alloc] initWithBytes:cppValue.affiliateCallSign.data() - length:cppValue.affiliateCallSign.size() - encoding:NSUTF8StringEncoding]; + CHIPChannelClusterChannelInfo * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [CHIPChannelClusterChannelInfo new]; + value.majorNumber = [NSNumber numberWithUnsignedShort:cppValue.Value().majorNumber]; + value.minorNumber = [NSNumber numberWithUnsignedShort:cppValue.Value().minorNumber]; + if (cppValue.Value().name.HasValue()) { + value.name = [[NSString alloc] initWithBytes:cppValue.Value().name.Value().data() + length:cppValue.Value().name.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + value.name = nil; + } + if (cppValue.Value().callSign.HasValue()) { + value.callSign = [[NSString alloc] initWithBytes:cppValue.Value().callSign.Value().data() + length:cppValue.Value().callSign.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + value.callSign = nil; + } + if (cppValue.Value().affiliateCallSign.HasValue()) { + value.affiliateCallSign = [[NSString alloc] initWithBytes:cppValue.Value().affiliateCallSign.Value().data() + length:cppValue.Value().affiliateCallSign.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + value.affiliateCallSign = nil; + } + } return value; } case Attributes::ServerGeneratedCommandList::Id: { @@ -6300,8 +6316,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } return value; } case Attributes::Duration::Id: { @@ -6311,8 +6331,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } return value; } case Attributes::Position::Id: { @@ -6325,7 +6349,11 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader CHIPMediaPlaybackClusterPlaybackPosition * _Nonnull value; value = [CHIPMediaPlaybackClusterPlaybackPosition new]; value.updatedAt = [NSNumber numberWithUnsignedLongLong:cppValue.updatedAt]; - value.position = [NSNumber numberWithUnsignedLongLong:cppValue.position]; + if (cppValue.position.IsNull()) { + value.position = nil; + } else { + value.position = [NSNumber numberWithUnsignedLongLong:cppValue.position.Value()]; + } return value; } case Attributes::PlaybackSpeed::Id: { @@ -6346,8 +6374,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } return value; } case Attributes::SeekRangeStart::Id: { @@ -6357,8 +6389,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } return value; } case Attributes::ServerGeneratedCommandList::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index 8f9f00bd4a2174..04ef83cd0b70f7 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -1453,19 +1453,25 @@ } } -void CHIPApplicationLauncherApplicationLauncherAppStructAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEP::DecodableType & value) -{ - CHIPApplicationLauncherClusterApplicationEP * _Nonnull objCValue; - objCValue = [CHIPApplicationLauncherClusterApplicationEP new]; - objCValue.application = [CHIPApplicationLauncherClusterApplication new]; - objCValue.application.catalogVendorId = [NSNumber numberWithUnsignedShort:value.application.catalogVendorId]; - objCValue.application.applicationId = [[NSString alloc] initWithBytes:value.application.applicationId.data() - length:value.application.applicationId.size() - encoding:NSUTF8StringEncoding]; - objCValue.endpoint = [[NSString alloc] initWithBytes:value.endpoint.data() - length:value.endpoint.size() - encoding:NSUTF8StringEncoding]; +void CHIPApplicationLauncherApplicationLauncherAppStructAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + CHIPApplicationLauncherClusterApplicationEP * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [CHIPApplicationLauncherClusterApplicationEP new]; + objCValue.application = [CHIPApplicationLauncherClusterApplication new]; + objCValue.application.catalogVendorId = [NSNumber numberWithUnsignedShort:value.Value().application.catalogVendorId]; + objCValue.application.applicationId = [[NSString alloc] initWithBytes:value.Value().application.applicationId.data() + length:value.Value().application.applicationId.size() + encoding:NSUTF8StringEncoding]; + if (value.Value().endpoint.HasValue()) { + objCValue.endpoint = [NSNumber numberWithUnsignedShort:value.Value().endpoint.Value()]; + } else { + objCValue.endpoint = nil; + } + } DispatchSuccess(context, objCValue); }; @@ -2119,49 +2125,6 @@ } } -void CHIPBindingBindingListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) -{ - NSArray * _Nonnull objCValue; - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - CHIPBindingClusterBindingEntry * newElement_0; - newElement_0 = [CHIPBindingClusterBindingEntry new]; - newElement_0.nodeId = [NSNumber numberWithUnsignedLongLong:entry_0.nodeId]; - newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; - newElement_0.endpointId = [NSNumber numberWithUnsignedShort:entry_0.endpointId]; - newElement_0.clusterId = [NSNumber numberWithUnsignedInt:entry_0.clusterId]; - [array_0 addObject:newElement_0]; - } - { // Scope for the error so we will know what it's named - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - } - objCValue = array_0; - DispatchSuccess(context, objCValue); -}; - -void CHIPBindingBindingListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) -{ - auto * self = static_cast(context); - if (!self->mQueue) { - return; - } - - if (self->mEstablishedHandler != nil) { - dispatch_async(self->mQueue, self->mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - self->mEstablishedHandler = nil; - } -} - void CHIPBindingServerGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -2752,15 +2715,27 @@ newElement_0 = [CHIPChannelClusterChannelInfo new]; newElement_0.majorNumber = [NSNumber numberWithUnsignedShort:entry_0.majorNumber]; newElement_0.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.minorNumber]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; - newElement_0.callSign = [[NSString alloc] initWithBytes:entry_0.callSign.data() - length:entry_0.callSign.size() + if (entry_0.name.HasValue()) { + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() + length:entry_0.name.Value().size() encoding:NSUTF8StringEncoding]; - newElement_0.affiliateCallSign = [[NSString alloc] initWithBytes:entry_0.affiliateCallSign.data() - length:entry_0.affiliateCallSign.size() - encoding:NSUTF8StringEncoding]; + } else { + newElement_0.name = nil; + } + if (entry_0.callSign.HasValue()) { + newElement_0.callSign = [[NSString alloc] initWithBytes:entry_0.callSign.Value().data() + length:entry_0.callSign.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + newElement_0.callSign = nil; + } + if (entry_0.affiliateCallSign.HasValue()) { + newElement_0.affiliateCallSign = [[NSString alloc] initWithBytes:entry_0.affiliateCallSign.Value().data() + length:entry_0.affiliateCallSign.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + newElement_0.affiliateCallSign = nil; + } [array_0 addObject:newElement_0]; } { // Scope for the error so we will know what it's named @@ -2791,20 +2766,32 @@ } void CHIPChannelChannelLineupStructAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Channel::Structs::LineupInfo::DecodableType & value) + void * context, const chip::app::DataModel::Nullable & value) { - CHIPChannelClusterLineupInfo * _Nonnull objCValue; - objCValue = [CHIPChannelClusterLineupInfo new]; - objCValue.operatorName = [[NSString alloc] initWithBytes:value.operatorName.data() - length:value.operatorName.size() - encoding:NSUTF8StringEncoding]; - objCValue.lineupName = [[NSString alloc] initWithBytes:value.lineupName.data() - length:value.lineupName.size() - encoding:NSUTF8StringEncoding]; - objCValue.postalCode = [[NSString alloc] initWithBytes:value.postalCode.data() - length:value.postalCode.size() - encoding:NSUTF8StringEncoding]; - objCValue.lineupInfoType = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.lineupInfoType)]; + CHIPChannelClusterLineupInfo * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [CHIPChannelClusterLineupInfo new]; + objCValue.operatorName = [[NSString alloc] initWithBytes:value.Value().operatorName.data() + length:value.Value().operatorName.size() + encoding:NSUTF8StringEncoding]; + if (value.Value().lineupName.HasValue()) { + objCValue.lineupName = [[NSString alloc] initWithBytes:value.Value().lineupName.Value().data() + length:value.Value().lineupName.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + objCValue.lineupName = nil; + } + if (value.Value().postalCode.HasValue()) { + objCValue.postalCode = [[NSString alloc] initWithBytes:value.Value().postalCode.Value().data() + length:value.Value().postalCode.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + objCValue.postalCode = nil; + } + objCValue.lineupInfoType = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value().lineupInfoType)]; + } DispatchSuccess(context, objCValue); }; @@ -2825,19 +2812,37 @@ } void CHIPChannelCurrentChannelStructAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType & value) + void * context, const chip::app::DataModel::Nullable & value) { - CHIPChannelClusterChannelInfo * _Nonnull objCValue; - objCValue = [CHIPChannelClusterChannelInfo new]; - objCValue.majorNumber = [NSNumber numberWithUnsignedShort:value.majorNumber]; - objCValue.minorNumber = [NSNumber numberWithUnsignedShort:value.minorNumber]; - objCValue.name = [[NSString alloc] initWithBytes:value.name.data() length:value.name.size() encoding:NSUTF8StringEncoding]; - objCValue.callSign = [[NSString alloc] initWithBytes:value.callSign.data() - length:value.callSign.size() - encoding:NSUTF8StringEncoding]; - objCValue.affiliateCallSign = [[NSString alloc] initWithBytes:value.affiliateCallSign.data() - length:value.affiliateCallSign.size() - encoding:NSUTF8StringEncoding]; + CHIPChannelClusterChannelInfo * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [CHIPChannelClusterChannelInfo new]; + objCValue.majorNumber = [NSNumber numberWithUnsignedShort:value.Value().majorNumber]; + objCValue.minorNumber = [NSNumber numberWithUnsignedShort:value.Value().minorNumber]; + if (value.Value().name.HasValue()) { + objCValue.name = [[NSString alloc] initWithBytes:value.Value().name.Value().data() + length:value.Value().name.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + objCValue.name = nil; + } + if (value.Value().callSign.HasValue()) { + objCValue.callSign = [[NSString alloc] initWithBytes:value.Value().callSign.Value().data() + length:value.Value().callSign.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + objCValue.callSign = nil; + } + if (value.Value().affiliateCallSign.HasValue()) { + objCValue.affiliateCallSign = [[NSString alloc] initWithBytes:value.Value().affiliateCallSign.Value().data() + length:value.Value().affiliateCallSign.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + objCValue.affiliateCallSign = nil; + } + } DispatchSuccess(context, objCValue); }; @@ -5940,7 +5945,11 @@ CHIPMediaPlaybackClusterPlaybackPosition * _Nonnull objCValue; objCValue = [CHIPMediaPlaybackClusterPlaybackPosition new]; objCValue.updatedAt = [NSNumber numberWithUnsignedLongLong:value.updatedAt]; - objCValue.position = [NSNumber numberWithUnsignedLongLong:value.position]; + if (value.position.IsNull()) { + objCValue.position = nil; + } else { + objCValue.position = [NSNumber numberWithUnsignedLongLong:value.position.Value()]; + } DispatchSuccess(context, objCValue); }; @@ -10043,15 +10052,28 @@ response.channelMatch = [CHIPChannelClusterChannelInfo new]; response.channelMatch.majorNumber = [NSNumber numberWithUnsignedShort:data.channelMatch.majorNumber]; response.channelMatch.minorNumber = [NSNumber numberWithUnsignedShort:data.channelMatch.minorNumber]; - response.channelMatch.name = [[NSString alloc] initWithBytes:data.channelMatch.name.data() - length:data.channelMatch.name.size() - encoding:NSUTF8StringEncoding]; - response.channelMatch.callSign = [[NSString alloc] initWithBytes:data.channelMatch.callSign.data() - length:data.channelMatch.callSign.size() + if (data.channelMatch.name.HasValue()) { + response.channelMatch.name = [[NSString alloc] initWithBytes:data.channelMatch.name.Value().data() + length:data.channelMatch.name.Value().size() encoding:NSUTF8StringEncoding]; - response.channelMatch.affiliateCallSign = [[NSString alloc] initWithBytes:data.channelMatch.affiliateCallSign.data() - length:data.channelMatch.affiliateCallSign.size() - encoding:NSUTF8StringEncoding]; + } else { + response.channelMatch.name = nil; + } + if (data.channelMatch.callSign.HasValue()) { + response.channelMatch.callSign = [[NSString alloc] initWithBytes:data.channelMatch.callSign.Value().data() + length:data.channelMatch.callSign.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + response.channelMatch.callSign = nil; + } + if (data.channelMatch.affiliateCallSign.HasValue()) { + response.channelMatch.affiliateCallSign = + [[NSString alloc] initWithBytes:data.channelMatch.affiliateCallSign.Value().data() + length:data.channelMatch.affiliateCallSign.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + response.channelMatch.affiliateCallSign = nil; + } } { response.errorType = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.errorType)]; @@ -10067,7 +10089,13 @@ response.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; } { - response.data = [[NSString alloc] initWithBytes:data.data.data() length:data.data.size() encoding:NSUTF8StringEncoding]; + if (data.data.HasValue()) { + response.data = [[NSString alloc] initWithBytes:data.data.Value().data() + length:data.data.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + response.data = nil; + } } DispatchSuccess(context, response); }; @@ -10930,7 +10958,13 @@ response.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; } { - response.data = [[NSString alloc] initWithBytes:data.data.data() length:data.data.size() encoding:NSUTF8StringEncoding]; + if (data.data.HasValue()) { + response.data = [[NSString alloc] initWithBytes:data.data.Value().data() + length:data.data.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + response.data = nil; + } } DispatchSuccess(context, response); }; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h index 6991e08148c9ba..a71d0a51bfc96b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h @@ -546,11 +546,12 @@ typedef void (*NullableApplianceEventsAndAlertClusterEventIdentificationAttribut typedef void (*ApplicationBasicApplicationAppStructAttributeCallback)( void *, const chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType &); typedef void (*ApplicationLauncherApplicationLauncherAppStructAttributeCallback)( - void *, const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEP::DecodableType &); + void *, + const chip::app::DataModel::Nullable &); typedef void (*ChannelChannelLineupStructAttributeCallback)( - void *, const chip::app::Clusters::Channel::Structs::LineupInfo::DecodableType &); + void *, const chip::app::DataModel::Nullable &); typedef void (*ChannelCurrentChannelStructAttributeCallback)( - void *, const chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType &); + void *, const chip::app::DataModel::Nullable &); typedef void (*GeneralCommissioningBasicCommissioningInfoStructAttributeCallback)( void *, const chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::DecodableType &); typedef void (*MediaPlaybackPositionStructAttributeCallback)( @@ -1787,8 +1788,10 @@ class CHIPApplicationLauncherApplicationLauncherAppStructAttributeCallbackBridge CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, - const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEP::DecodableType & value); + static void OnSuccessFn( + void * context, + const chip::app::DataModel::Nullable & + value); }; class CHIPApplicationLauncherApplicationLauncherAppStructAttributeCallbackSubscriptionBridge @@ -2264,34 +2267,6 @@ class CHIPBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPBindingBindingListListAttributeCallbackBridge : public CHIPCallbackBridge -{ -public: - CHIPBindingBindingListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - - static void OnSuccessFn( - void * context, - const chip::app::DataModel::DecodableList & value); -}; - -class CHIPBindingBindingListListAttributeCallbackSubscriptionBridge : public CHIPBindingBindingListListAttributeCallbackBridge -{ -public: - CHIPBindingBindingListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPBindingBindingListListAttributeCallbackBridge(queue, handler, action, true), - mEstablishedHandler(establishedHandler) - {} - - static void OnSubscriptionEstablished(void * context); - -private: - SubscriptionEstablishedHandler mEstablishedHandler; -}; - class CHIPBindingServerGeneratedCommandListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -2731,7 +2706,9 @@ class CHIPChannelChannelLineupStructAttributeCallbackBridge : public CHIPCallbac bool keepAlive = false) : CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, const chip::app::Clusters::Channel::Structs::LineupInfo::DecodableType & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; class CHIPChannelChannelLineupStructAttributeCallbackSubscriptionBridge @@ -2759,7 +2736,9 @@ class CHIPChannelCurrentChannelStructAttributeCallbackBridge bool keepAlive = false) : CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, const chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); }; class CHIPChannelCurrentChannelStructAttributeCallbackSubscriptionBridge diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 5d5d93b81c566f..620f0dcbe0c958 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -341,7 +341,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeApplicationLauncherAppWithCompletionHandler: (void (^)(CHIPApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeApplicationLauncherAppWithValue:(CHIPApplicationLauncherClusterApplicationEP * _Nonnull)value +- (void)writeAttributeApplicationLauncherAppWithValue:(CHIPApplicationLauncherClusterApplicationEP * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void) subscribeAttributeApplicationLauncherAppWithMinInterval:(uint16_t)minInterval @@ -792,13 +792,8 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPBinding : CHIPCluster -- (void)readAttributeBindingListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeBindingListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)subscribeAttributeBindingListWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +- (void)bindWithParams:(CHIPBindingClusterBindParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)unbindWithParams:(CHIPBindingClusterUnbindParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)readAttributeServerGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1146,8 +1141,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeChannelLineupWithCompletionHandler:(void (^)(CHIPChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeChannelLineupWithValue:(CHIPChannelClusterLineupInfo * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributeChannelLineupWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -1156,8 +1149,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeCurrentChannelWithCompletionHandler:(void (^)(CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeCurrentChannelWithValue:(CHIPChannelClusterChannelInfo * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributeCurrentChannelWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -3432,8 +3423,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePositionWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributePositionWithValue:(CHIPMediaPlaybackClusterPlaybackPosition * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributePositionWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 36a7e545288d3f..9e5de196191128 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -1249,7 +1249,10 @@ - (void)launchAppRequestWithParams:(CHIPApplicationLauncherClusterLaunchAppReque ApplicationLauncher::Commands::LaunchAppRequest::Type request; request.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; request.application.applicationId = [self asCharSpan:params.application.applicationId]; - request.data = [self asByteSpan:params.data]; + if (params.data != nil) { + auto & definedValue_0 = request.data.Emplace(); + definedValue_0 = [self asByteSpan:params.data]; + } new CHIPApplicationLauncherClusterLauncherResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { @@ -1320,7 +1323,7 @@ new CHIPApplicationLauncherApplicationLauncherAppStructAttributeCallbackBridge( }); } -- (void)writeAttributeApplicationLauncherAppWithValue:(CHIPApplicationLauncherClusterApplicationEP * _Nonnull)value +- (void)writeAttributeApplicationLauncherAppWithValue:(CHIPApplicationLauncherClusterApplicationEP * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -1332,9 +1335,17 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = ApplicationLauncher::Attributes::ApplicationLauncherApp::TypeInfo; TypeInfo::Type cppValue; - cppValue.application.catalogVendorId = value.application.catalogVendorId.unsignedShortValue; - cppValue.application.applicationId = [self asCharSpan:value.application.applicationId]; - cppValue.endpoint = [self asCharSpan:value.endpoint]; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0.application.catalogVendorId = value.application.catalogVendorId.unsignedShortValue; + nonNullValue_0.application.applicationId = [self asCharSpan:value.application.applicationId]; + if (value.endpoint != nil) { + auto & definedValue_2 = nonNullValue_0.endpoint.Emplace(); + definedValue_2 = value.endpoint.unsignedShortValue; + } + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -2991,75 +3002,46 @@ @implementation CHIPBinding return &_cppCluster; } -- (void)readAttributeBindingListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)bindWithParams:(CHIPBindingClusterBindParams *)params completionHandler:(StatusCompletion)completionHandler { - new CHIPBindingBindingListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Binding::Attributes::BindingList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} + ListFreer listFreer; + Binding::Commands::Bind::Type request; + request.nodeId = params.nodeId.unsignedLongLongValue; + request.groupId = params.groupId.unsignedShortValue; + request.endpointId = params.endpointId.unsignedShortValue; + request.clusterId = params.clusterId.unsignedIntValue; -- (void)writeAttributeBindingListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( + new CHIPCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { + ^(id _Nullable value, NSError * _Nullable error) { completionHandler(error); }, ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Binding::Attributes::BindingList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[CHIPBindingClusterBindingEntry class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (CHIPBindingClusterBindingEntry *) value[i_0]; - listHolder_0->mList[i_0].nodeId = element_0.nodeId.unsignedLongLongValue; - listHolder_0->mList[i_0].groupId = element_0.groupId.unsignedShortValue; - listHolder_0->mList[i_0].endpointId = element_0.endpointId.unsignedShortValue; - listHolder_0->mList[i_0].clusterId = element_0.clusterId.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBindingListWithMinInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)unbindWithParams:(CHIPBindingClusterUnbindParams *)params completionHandler:(StatusCompletion)completionHandler { - new CHIPBindingBindingListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + ListFreer listFreer; + Binding::Commands::Unbind::Type request; + request.nodeId = params.nodeId.unsignedLongLongValue; + request.groupId = params.groupId.unsignedShortValue; + request.endpointId = params.endpointId.unsignedShortValue; + request.clusterId = params.clusterId.unsignedIntValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Binding::Attributes::BindingList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPBindingBindingListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)readAttributeServerGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, @@ -4500,29 +4482,6 @@ new CHIPChannelChannelLineupStructAttributeCallbackBridge( }); } -- (void)writeAttributeChannelLineupWithValue:(CHIPChannelClusterLineupInfo * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Channel::Attributes::ChannelLineup::TypeInfo; - TypeInfo::Type cppValue; - cppValue.operatorName = [self asCharSpan:value.operatorName]; - cppValue.lineupName = [self asCharSpan:value.lineupName]; - cppValue.postalCode = [self asCharSpan:value.postalCode]; - cppValue.lineupInfoType - = static_cast>(value.lineupInfoType.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - - (void)subscribeAttributeChannelLineupWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -4554,29 +4513,6 @@ new CHIPChannelCurrentChannelStructAttributeCallbackBridge( }); } -- (void)writeAttributeCurrentChannelWithValue:(CHIPChannelClusterChannelInfo * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; - TypeInfo::Type cppValue; - cppValue.majorNumber = value.majorNumber.unsignedShortValue; - cppValue.minorNumber = value.minorNumber.unsignedShortValue; - cppValue.name = [self asCharSpan:value.name]; - cppValue.callSign = [self asCharSpan:value.callSign]; - cppValue.affiliateCallSign = [self asCharSpan:value.affiliateCallSign]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - - (void)subscribeAttributeCurrentChannelWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -7023,8 +6959,6 @@ - (void)launchContentRequestWithParams:(CHIPContentLauncherClusterLaunchContentR { ListFreer listFreer; ContentLauncher::Commands::LaunchContentRequest::Type request; - request.autoPlay = params.autoPlay.boolValue; - request.data = [self asCharSpan:params.data]; { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -7059,29 +6993,32 @@ - (void)launchContentRequestWithParams:(CHIPContentLauncherClusterLaunchContentR = static_castmList[i_2].type)>>( element_2.type.unsignedCharValue); listHolder_2->mList[i_2].value = [self asCharSpan:element_2.value]; - { - using ListType_4 = std::remove_reference_tmList[i_2].externalIDList)>; - using ListMemberType_4 = ListMemberTypeGetter::Type; - if (element_2.externalIDList.count != 0) { - auto * listHolder_4 = new ListHolder(element_2.externalIDList.count); - if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { - return; - } - listFreer.add(listHolder_4); - for (size_t i_4 = 0; i_4 < element_2.externalIDList.count; ++i_4) { - if (![element_2.externalIDList[i_4] - isKindOfClass:[CHIPContentLauncherClusterAdditionalInfo class]]) { - // Wrong kind of value. + if (element_2.externalIDList != nil) { + auto & definedValue_4 = listHolder_2->mList[i_2].externalIDList.Emplace(); + { + using ListType_5 = std::remove_reference_t; + using ListMemberType_5 = ListMemberTypeGetter::Type; + if (element_2.externalIDList.count != 0) { + auto * listHolder_5 = new ListHolder(element_2.externalIDList.count); + if (listHolder_5 == nullptr || listHolder_5->mList == nullptr) { return; } - auto element_4 = (CHIPContentLauncherClusterAdditionalInfo *) element_2.externalIDList[i_4]; - listHolder_4->mList[i_4].name = [self asCharSpan:element_4.name]; - listHolder_4->mList[i_4].value = [self asCharSpan:element_4.value]; + listFreer.add(listHolder_5); + for (size_t i_5 = 0; i_5 < element_2.externalIDList.count; ++i_5) { + if (![element_2.externalIDList[i_5] + isKindOfClass:[CHIPContentLauncherClusterAdditionalInfo class]]) { + // Wrong kind of value. + return; + } + auto element_5 + = (CHIPContentLauncherClusterAdditionalInfo *) element_2.externalIDList[i_5]; + listHolder_5->mList[i_5].name = [self asCharSpan:element_5.name]; + listHolder_5->mList[i_5].value = [self asCharSpan:element_5.value]; + } + definedValue_4 = ListType_5(listHolder_5->mList, element_2.externalIDList.count); + } else { + definedValue_4 = ListType_5(); } - listHolder_2->mList[i_2].externalIDList - = ListType_4(listHolder_4->mList, element_2.externalIDList.count); - } else { - listHolder_2->mList[i_2].externalIDList = ListType_4(); } } } @@ -7096,6 +7033,11 @@ - (void)launchContentRequestWithParams:(CHIPContentLauncherClusterLaunchContentR request.search = ListType_0(); } } + request.autoPlay = params.autoPlay.boolValue; + if (params.data != nil) { + auto & definedValue_0 = request.data.Emplace(); + definedValue_0 = [self asCharSpan:params.data]; + } new CHIPContentLauncherClusterLaunchResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { @@ -7112,43 +7054,104 @@ - (void)launchURLRequestWithParams:(CHIPContentLauncherClusterLaunchURLRequestPa ListFreer listFreer; ContentLauncher::Commands::LaunchURLRequest::Type request; request.contentURL = [self asCharSpan:params.contentURL]; - request.displayString = [self asCharSpan:params.displayString]; - request.brandingInformation.providerName = [self asCharSpan:params.brandingInformation.providerName]; - request.brandingInformation.background.imageUrl = [self asCharSpan:params.brandingInformation.background.imageUrl]; - request.brandingInformation.background.color = [self asCharSpan:params.brandingInformation.background.color]; - request.brandingInformation.background.size.width = params.brandingInformation.background.size.width.doubleValue; - request.brandingInformation.background.size.height = params.brandingInformation.background.size.height.doubleValue; - request.brandingInformation.background.size.metric - = static_cast>( - params.brandingInformation.background.size.metric.unsignedCharValue); - request.brandingInformation.logo.imageUrl = [self asCharSpan:params.brandingInformation.logo.imageUrl]; - request.brandingInformation.logo.color = [self asCharSpan:params.brandingInformation.logo.color]; - request.brandingInformation.logo.size.width = params.brandingInformation.logo.size.width.doubleValue; - request.brandingInformation.logo.size.height = params.brandingInformation.logo.size.height.doubleValue; - request.brandingInformation.logo.size.metric - = static_cast>( - params.brandingInformation.logo.size.metric.unsignedCharValue); - request.brandingInformation.progressBar.imageUrl = [self asCharSpan:params.brandingInformation.progressBar.imageUrl]; - request.brandingInformation.progressBar.color = [self asCharSpan:params.brandingInformation.progressBar.color]; - request.brandingInformation.progressBar.size.width = params.brandingInformation.progressBar.size.width.doubleValue; - request.brandingInformation.progressBar.size.height = params.brandingInformation.progressBar.size.height.doubleValue; - request.brandingInformation.progressBar.size.metric - = static_cast>( - params.brandingInformation.progressBar.size.metric.unsignedCharValue); - request.brandingInformation.splash.imageUrl = [self asCharSpan:params.brandingInformation.splash.imageUrl]; - request.brandingInformation.splash.color = [self asCharSpan:params.brandingInformation.splash.color]; - request.brandingInformation.splash.size.width = params.brandingInformation.splash.size.width.doubleValue; - request.brandingInformation.splash.size.height = params.brandingInformation.splash.size.height.doubleValue; - request.brandingInformation.splash.size.metric - = static_cast>( - params.brandingInformation.splash.size.metric.unsignedCharValue); - request.brandingInformation.waterMark.imageUrl = [self asCharSpan:params.brandingInformation.waterMark.imageUrl]; - request.brandingInformation.waterMark.color = [self asCharSpan:params.brandingInformation.waterMark.color]; - request.brandingInformation.waterMark.size.width = params.brandingInformation.waterMark.size.width.doubleValue; - request.brandingInformation.waterMark.size.height = params.brandingInformation.waterMark.size.height.doubleValue; - request.brandingInformation.waterMark.size.metric - = static_cast>( - params.brandingInformation.waterMark.size.metric.unsignedCharValue); + if (params.displayString != nil) { + auto & definedValue_0 = request.displayString.Emplace(); + definedValue_0 = [self asCharSpan:params.displayString]; + } + if (params.brandingInformation != nil) { + auto & definedValue_0 = request.brandingInformation.Emplace(); + definedValue_0.providerName = [self asCharSpan:params.brandingInformation.providerName]; + if (params.brandingInformation.background != nil) { + auto & definedValue_2 = definedValue_0.background.Emplace(); + if (params.brandingInformation.background.imageUrl != nil) { + auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.background.imageUrl]; + } + if (params.brandingInformation.background.color != nil) { + auto & definedValue_4 = definedValue_2.color.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.background.color]; + } + if (params.brandingInformation.background.size != nil) { + auto & definedValue_4 = definedValue_2.size.Emplace(); + definedValue_4.width = params.brandingInformation.background.size.width.doubleValue; + definedValue_4.height = params.brandingInformation.background.size.height.doubleValue; + definedValue_4.metric = static_cast>( + params.brandingInformation.background.size.metric.unsignedCharValue); + } + } + if (params.brandingInformation.logo != nil) { + auto & definedValue_2 = definedValue_0.logo.Emplace(); + if (params.brandingInformation.logo.imageUrl != nil) { + auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.logo.imageUrl]; + } + if (params.brandingInformation.logo.color != nil) { + auto & definedValue_4 = definedValue_2.color.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.logo.color]; + } + if (params.brandingInformation.logo.size != nil) { + auto & definedValue_4 = definedValue_2.size.Emplace(); + definedValue_4.width = params.brandingInformation.logo.size.width.doubleValue; + definedValue_4.height = params.brandingInformation.logo.size.height.doubleValue; + definedValue_4.metric = static_cast>( + params.brandingInformation.logo.size.metric.unsignedCharValue); + } + } + if (params.brandingInformation.progressBar != nil) { + auto & definedValue_2 = definedValue_0.progressBar.Emplace(); + if (params.brandingInformation.progressBar.imageUrl != nil) { + auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.progressBar.imageUrl]; + } + if (params.brandingInformation.progressBar.color != nil) { + auto & definedValue_4 = definedValue_2.color.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.progressBar.color]; + } + if (params.brandingInformation.progressBar.size != nil) { + auto & definedValue_4 = definedValue_2.size.Emplace(); + definedValue_4.width = params.brandingInformation.progressBar.size.width.doubleValue; + definedValue_4.height = params.brandingInformation.progressBar.size.height.doubleValue; + definedValue_4.metric = static_cast>( + params.brandingInformation.progressBar.size.metric.unsignedCharValue); + } + } + if (params.brandingInformation.splash != nil) { + auto & definedValue_2 = definedValue_0.splash.Emplace(); + if (params.brandingInformation.splash.imageUrl != nil) { + auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.splash.imageUrl]; + } + if (params.brandingInformation.splash.color != nil) { + auto & definedValue_4 = definedValue_2.color.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.splash.color]; + } + if (params.brandingInformation.splash.size != nil) { + auto & definedValue_4 = definedValue_2.size.Emplace(); + definedValue_4.width = params.brandingInformation.splash.size.width.doubleValue; + definedValue_4.height = params.brandingInformation.splash.size.height.doubleValue; + definedValue_4.metric = static_cast>( + params.brandingInformation.splash.size.metric.unsignedCharValue); + } + } + if (params.brandingInformation.waterMark != nil) { + auto & definedValue_2 = definedValue_0.waterMark.Emplace(); + if (params.brandingInformation.waterMark.imageUrl != nil) { + auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.waterMark.imageUrl]; + } + if (params.brandingInformation.waterMark.color != nil) { + auto & definedValue_4 = definedValue_2.color.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.waterMark.color]; + } + if (params.brandingInformation.waterMark.size != nil) { + auto & definedValue_4 = definedValue_2.size.Emplace(); + definedValue_4.width = params.brandingInformation.waterMark.size.width.doubleValue; + definedValue_4.height = params.brandingInformation.waterMark.size.height.doubleValue; + definedValue_4.metric = static_cast>( + params.brandingInformation.waterMark.size.metric.unsignedCharValue); + } + } + } new CHIPContentLauncherClusterLaunchResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { @@ -14059,12 +14062,13 @@ new CHIPMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge - (void)readAttributeStartTimeWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt64uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeStartTimeWithMinInterval:(uint16_t)minInterval @@ -14072,14 +14076,14 @@ - (void)subscribeAttributeStartTimeWithMinInterval:(uint16_t)minInterval subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt64uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -14087,12 +14091,13 @@ new CHIPInt64uAttributeCallbackSubscriptionBridge( - (void)readAttributeDurationWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt64uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeDurationWithMinInterval:(uint16_t)minInterval @@ -14100,14 +14105,14 @@ - (void)subscribeAttributeDurationWithMinInterval:(uint16_t)minInterval subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt64uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -14124,26 +14129,6 @@ new CHIPMediaPlaybackPositionStructAttributeCallbackBridge( }); } -- (void)writeAttributePositionWithValue:(CHIPMediaPlaybackClusterPlaybackPosition * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaPlayback::Attributes::Position::TypeInfo; - TypeInfo::Type cppValue; - cppValue.updatedAt = value.updatedAt.unsignedLongLongValue; - cppValue.position = value.position.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - - (void)subscribeAttributePositionWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -14195,12 +14180,13 @@ new CHIPFloatAttributeCallbackSubscriptionBridge( - (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt64uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeSeekRangeEndWithMinInterval:(uint16_t)minInterval @@ -14208,14 +14194,14 @@ - (void)subscribeAttributeSeekRangeEndWithMinInterval:(uint16_t)minInterval subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt64uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -14223,12 +14209,13 @@ new CHIPInt64uAttributeCallbackSubscriptionBridge( - (void)readAttributeSeekRangeStartWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt64uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeSeekRangeStartWithMinInterval:(uint16_t)minInterval @@ -14237,14 +14224,14 @@ - (void)subscribeAttributeSeekRangeStartWithMinInterval:(uint16_t)minInterval reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt64uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -19886,7 +19873,10 @@ - (void)navigateTargetRequestWithParams:(CHIPTargetNavigatorClusterNavigateTarge ListFreer listFreer; TargetNavigator::Commands::NavigateTargetRequest::Type request; request.target = params.target.unsignedCharValue; - request.data = [self asCharSpan:params.data]; + if (params.data != nil) { + auto & definedValue_0 = request.data.Emplace(); + definedValue_0 = [self asCharSpan:params.data]; + } new CHIPTargetNavigatorClusterNavigateTargetResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h index bcf8e790454459..4cbc92e9fafaa6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h @@ -470,6 +470,22 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)init; @end +@interface CHIPBindingClusterBindParams : NSObject +@property (strong, nonatomic) NSNumber * _Nonnull nodeId; +@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (strong, nonatomic) NSNumber * _Nonnull endpointId; +@property (strong, nonatomic) NSNumber * _Nonnull clusterId; +- (instancetype)init; +@end + +@interface CHIPBindingClusterUnbindParams : NSObject +@property (strong, nonatomic) NSNumber * _Nonnull nodeId; +@property (strong, nonatomic) NSNumber * _Nonnull groupId; +@property (strong, nonatomic) NSNumber * _Nonnull endpointId; +@property (strong, nonatomic) NSNumber * _Nonnull clusterId; +- (instancetype)init; +@end + @interface CHIPPollControlClusterCheckInResponseParams : NSObject @property (strong, nonatomic) NSNumber * _Nonnull startFastPolling; @property (strong, nonatomic) NSNumber * _Nonnull fastPollTimeout; @@ -1543,13 +1559,13 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPTargetNavigatorClusterNavigateTargetRequestParams : NSObject @property (strong, nonatomic) NSNumber * _Nonnull target; -@property (strong, nonatomic) NSString * _Nonnull data; +@property (strong, nonatomic) NSString * _Nullable data; - (instancetype)init; @end @interface CHIPTargetNavigatorClusterNavigateTargetResponseParams : NSObject @property (strong, nonatomic) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSString * _Nonnull data; +@property (strong, nonatomic) NSString * _Nullable data; - (instancetype)init; @end @@ -1595,22 +1611,22 @@ NS_ASSUME_NONNULL_BEGIN @end @interface CHIPContentLauncherClusterLaunchContentRequestParams : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull autoPlay; -@property (strong, nonatomic) NSString * _Nonnull data; @property (strong, nonatomic) NSArray * _Nonnull search; +@property (strong, nonatomic) NSNumber * _Nonnull autoPlay; +@property (strong, nonatomic) NSString * _Nullable data; - (instancetype)init; @end @interface CHIPContentLauncherClusterLaunchURLRequestParams : NSObject @property (strong, nonatomic) NSString * _Nonnull contentURL; -@property (strong, nonatomic) NSString * _Nonnull displayString; -@property (strong, nonatomic) CHIPContentLauncherClusterBrandingInformation * _Nonnull brandingInformation; +@property (strong, nonatomic) NSString * _Nullable displayString; +@property (strong, nonatomic) CHIPContentLauncherClusterBrandingInformation * _Nullable brandingInformation; - (instancetype)init; @end @interface CHIPContentLauncherClusterLaunchResponseParams : NSObject @property (strong, nonatomic) NSNumber * _Nonnull status; -@property (strong, nonatomic) NSString * _Nonnull data; +@property (strong, nonatomic) NSString * _Nullable data; - (instancetype)init; @end @@ -1627,7 +1643,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPApplicationLauncherClusterLaunchAppRequestParams : NSObject @property (strong, nonatomic) CHIPApplicationLauncherClusterApplication * _Nonnull application; -@property (strong, nonatomic) NSData * _Nonnull data; +@property (strong, nonatomic) NSData * _Nullable data; - (instancetype)init; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm index 6108969a0ecf7a..d06f5a330af113 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm @@ -978,6 +978,40 @@ - (instancetype)init } @end +@implementation CHIPBindingClusterBindParams +- (instancetype)init +{ + if (self = [super init]) { + + _nodeId = @(0); + + _groupId = @(0); + + _endpointId = @(0); + + _clusterId = @(0); + } + return self; +} +@end + +@implementation CHIPBindingClusterUnbindParams +- (instancetype)init +{ + if (self = [super init]) { + + _nodeId = @(0); + + _groupId = @(0); + + _endpointId = @(0); + + _clusterId = @(0); + } + return self; +} +@end + @implementation CHIPPollControlClusterCheckInResponseParams - (instancetype)init { @@ -3280,7 +3314,7 @@ - (instancetype)init _target = @(0); - _data = @""; + _data = nil; } return self; } @@ -3293,7 +3327,7 @@ - (instancetype)init _status = @(0); - _data = @""; + _data = nil; } return self; } @@ -3394,11 +3428,11 @@ - (instancetype)init { if (self = [super init]) { - _autoPlay = @(0); + _search = [NSArray array]; - _data = @""; + _autoPlay = @(0); - _search = [NSArray array]; + _data = nil; } return self; } @@ -3411,9 +3445,9 @@ - (instancetype)init _contentURL = @""; - _displayString = @""; + _displayString = nil; - _brandingInformation = [CHIPContentLauncherClusterBrandingInformation new]; + _brandingInformation = nil; } return self; } @@ -3426,7 +3460,7 @@ - (instancetype)init _status = @(0); - _data = @""; + _data = nil; } return self; } @@ -3463,7 +3497,7 @@ - (instancetype)init _application = [CHIPApplicationLauncherClusterApplication new]; - _data = [NSData data]; + _data = nil; } return self; } diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h index 99fba3e7745d87..b90826f0067027 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h @@ -61,14 +61,6 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)init; @end -@interface CHIPBindingClusterBindingEntry : NSObject -@property (strong, nonatomic) NSNumber * _Nonnull nodeId; -@property (strong, nonatomic) NSNumber * _Nonnull groupId; -@property (strong, nonatomic) NSNumber * _Nonnull endpointId; -@property (strong, nonatomic) NSNumber * _Nonnull clusterId; -- (instancetype)init; -@end - @interface CHIPAccessControlClusterTarget : NSObject @property (strong, nonatomic) NSNumber * _Nullable cluster; @property (strong, nonatomic) NSNumber * _Nullable endpoint; @@ -331,16 +323,16 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPChannelClusterChannelInfo : NSObject @property (strong, nonatomic) NSNumber * _Nonnull majorNumber; @property (strong, nonatomic) NSNumber * _Nonnull minorNumber; -@property (strong, nonatomic) NSString * _Nonnull name; -@property (strong, nonatomic) NSString * _Nonnull callSign; -@property (strong, nonatomic) NSString * _Nonnull affiliateCallSign; +@property (strong, nonatomic) NSString * _Nullable name; +@property (strong, nonatomic) NSString * _Nullable callSign; +@property (strong, nonatomic) NSString * _Nullable affiliateCallSign; - (instancetype)init; @end @interface CHIPChannelClusterLineupInfo : NSObject @property (strong, nonatomic) NSString * _Nonnull operatorName; -@property (strong, nonatomic) NSString * _Nonnull lineupName; -@property (strong, nonatomic) NSString * _Nonnull postalCode; +@property (strong, nonatomic) NSString * _Nullable lineupName; +@property (strong, nonatomic) NSString * _Nullable postalCode; @property (strong, nonatomic) NSNumber * _Nonnull lineupInfoType; - (instancetype)init; @end @@ -353,7 +345,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPMediaPlaybackClusterPlaybackPosition : NSObject @property (strong, nonatomic) NSNumber * _Nonnull updatedAt; -@property (strong, nonatomic) NSNumber * _Nonnull position; +@property (strong, nonatomic) NSNumber * _Nullable position; - (instancetype)init; @end @@ -381,7 +373,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPContentLauncherClusterParameter : NSObject @property (strong, nonatomic) NSNumber * _Nonnull type; @property (strong, nonatomic) NSString * _Nonnull value; -@property (strong, nonatomic) NSArray * _Nonnull externalIDList; +@property (strong, nonatomic) NSArray * _Nullable externalIDList; - (instancetype)init; @end @@ -391,19 +383,19 @@ NS_ASSUME_NONNULL_BEGIN @end @interface CHIPContentLauncherClusterStyleInformation : NSObject -@property (strong, nonatomic) NSString * _Nonnull imageUrl; -@property (strong, nonatomic) NSString * _Nonnull color; -@property (strong, nonatomic) CHIPContentLauncherClusterDimension * _Nonnull size; +@property (strong, nonatomic) NSString * _Nullable imageUrl; +@property (strong, nonatomic) NSString * _Nullable color; +@property (strong, nonatomic) CHIPContentLauncherClusterDimension * _Nullable size; - (instancetype)init; @end @interface CHIPContentLauncherClusterBrandingInformation : NSObject @property (strong, nonatomic) NSString * _Nonnull providerName; -@property (strong, nonatomic) CHIPContentLauncherClusterStyleInformation * _Nonnull background; -@property (strong, nonatomic) CHIPContentLauncherClusterStyleInformation * _Nonnull logo; -@property (strong, nonatomic) CHIPContentLauncherClusterStyleInformation * _Nonnull progressBar; -@property (strong, nonatomic) CHIPContentLauncherClusterStyleInformation * _Nonnull splash; -@property (strong, nonatomic) CHIPContentLauncherClusterStyleInformation * _Nonnull waterMark; +@property (strong, nonatomic) CHIPContentLauncherClusterStyleInformation * _Nullable background; +@property (strong, nonatomic) CHIPContentLauncherClusterStyleInformation * _Nullable logo; +@property (strong, nonatomic) CHIPContentLauncherClusterStyleInformation * _Nullable progressBar; +@property (strong, nonatomic) CHIPContentLauncherClusterStyleInformation * _Nullable splash; +@property (strong, nonatomic) CHIPContentLauncherClusterStyleInformation * _Nullable waterMark; - (instancetype)init; @end @@ -422,7 +414,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPApplicationLauncherClusterApplicationEP : NSObject @property (strong, nonatomic) CHIPApplicationLauncherClusterApplication * _Nonnull application; -@property (strong, nonatomic) NSString * _Nonnull endpoint; +@property (strong, nonatomic) NSNumber * _Nullable endpoint; - (instancetype)init; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm index 03754efda6be53..8be67c4392df72 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm @@ -100,23 +100,6 @@ - (instancetype)init } @end -@implementation CHIPBindingClusterBindingEntry -- (instancetype)init -{ - if (self = [super init]) { - - _nodeId = @(0); - - _groupId = @(0); - - _endpointId = @(0); - - _clusterId = @(0); - } - return self; -} -@end - @implementation CHIPAccessControlClusterTarget - (instancetype)init { @@ -675,11 +658,11 @@ - (instancetype)init _minorNumber = @(0); - _name = @""; + _name = nil; - _callSign = @""; + _callSign = nil; - _affiliateCallSign = @""; + _affiliateCallSign = nil; } return self; } @@ -692,9 +675,9 @@ - (instancetype)init _operatorName = @""; - _lineupName = @""; + _lineupName = nil; - _postalCode = @""; + _postalCode = nil; _lineupInfoType = @(0); } @@ -722,7 +705,7 @@ - (instancetype)init _updatedAt = @(0); - _position = @(0); + _position = nil; } return self; } @@ -782,7 +765,7 @@ - (instancetype)init _value = @""; - _externalIDList = [NSArray array]; + _externalIDList = nil; } return self; } @@ -804,11 +787,11 @@ - (instancetype)init { if (self = [super init]) { - _imageUrl = @""; + _imageUrl = nil; - _color = @""; + _color = nil; - _size = [CHIPContentLauncherClusterDimension new]; + _size = nil; } return self; } @@ -821,15 +804,15 @@ - (instancetype)init _providerName = @""; - _background = [CHIPContentLauncherClusterStyleInformation new]; + _background = nil; - _logo = [CHIPContentLauncherClusterStyleInformation new]; + _logo = nil; - _progressBar = [CHIPContentLauncherClusterStyleInformation new]; + _progressBar = nil; - _splash = [CHIPContentLauncherClusterStyleInformation new]; + _splash = nil; - _waterMark = [CHIPContentLauncherClusterStyleInformation new]; + _waterMark = nil; } return self; } @@ -870,7 +853,7 @@ - (instancetype)init _application = [CHIPApplicationLauncherClusterApplication new]; - _endpoint = @""; + _endpoint = nil; } return self; } diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index 2495e07b205d66..3e5888b5d0b943 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -283,6 +283,10 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPTestChannel : CHIPChannel - (void)writeAttributeChannelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeChannelLineupWithValue:(CHIPChannelClusterLineupInfo * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeCurrentChannelWithValue:(CHIPChannelClusterChannelInfo * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeServerGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClientGeneratedCommandListWithValue:(NSArray * _Nonnull)value @@ -727,11 +731,13 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPTestMediaPlayback : CHIPMediaPlayback - (void)writeAttributePlaybackStateWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeStartTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeDurationWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeStartTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeDurationWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePositionWithValue:(CHIPMediaPlaybackClusterPlaybackPosition * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributePlaybackSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeSeekRangeEndWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeSeekRangeStartWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeSeekRangeEndWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeSeekRangeStartWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeServerGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClientGeneratedCommandListWithValue:(NSArray * _Nonnull)value diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index b77974cb263cc9..ab354fc884cd75 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -3110,9 +3110,18 @@ new CHIPDefaultSuccessCallbackBridge( auto element_0 = (CHIPChannelClusterChannelInfo *) value[i_0]; listHolder_0->mList[i_0].majorNumber = element_0.majorNumber.unsignedShortValue; listHolder_0->mList[i_0].minorNumber = element_0.minorNumber.unsignedShortValue; - listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; - listHolder_0->mList[i_0].callSign = [self asCharSpan:element_0.callSign]; - listHolder_0->mList[i_0].affiliateCallSign = [self asCharSpan:element_0.affiliateCallSign]; + if (element_0.name != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); + definedValue_2 = [self asCharSpan:element_0.name]; + } + if (element_0.callSign != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].callSign.Emplace(); + definedValue_2 = [self asCharSpan:element_0.callSign]; + } + if (element_0.affiliateCallSign != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].affiliateCallSign.Emplace(); + definedValue_2 = [self asCharSpan:element_0.affiliateCallSign]; + } } cppValue = ListType_0(listHolder_0->mList, value.count); } else { @@ -3125,6 +3134,77 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeChannelLineupWithValue:(CHIPChannelClusterLineupInfo * _Nullable)value + completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Channel::Attributes::ChannelLineup::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0.operatorName = [self asCharSpan:value.operatorName]; + if (value.lineupName != nil) { + auto & definedValue_2 = nonNullValue_0.lineupName.Emplace(); + definedValue_2 = [self asCharSpan:value.lineupName]; + } + if (value.postalCode != nil) { + auto & definedValue_2 = nonNullValue_0.postalCode.Emplace(); + definedValue_2 = [self asCharSpan:value.postalCode]; + } + nonNullValue_0.lineupInfoType = static_cast>( + value.lineupInfoType.unsignedCharValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeCurrentChannelWithValue:(CHIPChannelClusterChannelInfo * _Nullable)value + completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0.majorNumber = value.majorNumber.unsignedShortValue; + nonNullValue_0.minorNumber = value.minorNumber.unsignedShortValue; + if (value.name != nil) { + auto & definedValue_2 = nonNullValue_0.name.Emplace(); + definedValue_2 = [self asCharSpan:value.name]; + } + if (value.callSign != nil) { + auto & definedValue_2 = nonNullValue_0.callSign.Emplace(); + definedValue_2 = [self asCharSpan:value.callSign]; + } + if (value.affiliateCallSign != nil) { + auto & definedValue_2 = nonNullValue_0.affiliateCallSign.Emplace(); + definedValue_2 = [self asCharSpan:value.affiliateCallSign]; + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeServerGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { @@ -8705,7 +8785,7 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeStartTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeStartTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -8716,14 +8796,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeDurationWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeDurationWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -8734,7 +8819,37 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributePositionWithValue:(CHIPMediaPlaybackClusterPlaybackPosition * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaPlayback::Attributes::Position::TypeInfo; + TypeInfo::Type cppValue; + cppValue.updatedAt = value.updatedAt.unsignedLongLongValue; + if (value.position == nil) { + cppValue.position.SetNull(); + } else { + auto & nonNullValue_1 = cppValue.position.SetNonNull(); + nonNullValue_1 = value.position.unsignedLongLongValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -8759,7 +8874,7 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeSeekRangeEndWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeSeekRangeEndWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -8770,14 +8885,19 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeSeekRangeStartWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeSeekRangeStartWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -8788,7 +8908,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); diff --git a/src/include/platform/OTAImageProcessor.h b/src/include/platform/OTAImageProcessor.h index 95815230bc3136..7fd7a2487ba95a 100644 --- a/src/include/platform/OTAImageProcessor.h +++ b/src/include/platform/OTAImageProcessor.h @@ -33,21 +33,6 @@ struct OTAImageProcessorParams uint64_t totalFileBytes = 0; }; -// TODO: Parse the header when the image is received -struct OTAImageProcessorHeader -{ - uint16_t vendorId; - uint16_t productId; - uint32_t softwareVersion; - CharSpan softwareVersionString; - uint64_t payloadSize; - uint16_t minApplicableSoftwareVersion; - uint16_t maxApplicableSoftwareVersion; - CharSpan releaseNotesUrl; - uint8_t imageDigestType; - ByteSpan imageDigest; -}; - /** * @class OTAImageProcessorInterface * @@ -99,16 +84,11 @@ class DLL_EXPORT OTAImageProcessorInterface /** * Called to check the current download status of the OTA image download. */ - virtual void GetPercentComplete(app::DataModel::Nullable & percent) + virtual app::DataModel::Nullable GetPercentComplete() { - if (mParams.totalFileBytes == 0) - { - percent.SetNull(); - } - else - { - percent.SetNonNull(static_cast((mParams.downloadedBytes * 100) / mParams.totalFileBytes)); - } + return mParams.totalFileBytes > 0 + ? app::DataModel::Nullable(static_cast((mParams.downloadedBytes * 100) / mParams.totalFileBytes)) + : app::DataModel::Nullable{}; } /** @@ -118,7 +98,6 @@ class DLL_EXPORT OTAImageProcessorInterface protected: OTAImageProcessorParams mParams; - OTAImageProcessorHeader mHeader; }; } // namespace chip diff --git a/src/lib/core/OTAImageHeader.cpp b/src/lib/core/OTAImageHeader.cpp index 9f9efed25f0652..51088bbab90cc4 100644 --- a/src/lib/core/OTAImageHeader.cpp +++ b/src/lib/core/OTAImageHeader.cpp @@ -39,23 +39,93 @@ enum class Tag : uint8_t kImageDigest = 9, }; +/// Length of the fixed portion of the Matter OTA image header: FileIdentifier (4B), TotalSize (8B) and HeaderSize (4B) +constexpr uint32_t kFixedHeaderSize = 16; + +/// Maximum supported Matter OTA image header size +constexpr uint32_t kMaxHeaderSize = 1024; + +/// Maximum size of the software version string +constexpr size_t kMaxSoftwareVersionStringSize = 64; + +/// Maximum size of the release notes URL +constexpr size_t kMaxReleaseNotesURLSize = 256; + } // namespace -CHIP_ERROR DecodeOTAImageHeader(ByteSpan buffer, OTAImageHeader & header) +void OTAImageHeaderParser::Init() +{ + mState = State::kInitialized; + mBufferOffset = 0; + mHeaderTlvSize = 0; + mBuffer.Alloc(kFixedHeaderSize); +} + +void OTAImageHeaderParser::Clear() +{ + mState = State::kNotInitialized; + mBufferOffset = 0; + mHeaderTlvSize = 0; + mBuffer.Free(); +} + +CHIP_ERROR OTAImageHeaderParser::AccumulateAndDecode(ByteSpan & buffer, OTAImageHeader & header) { - Encoding::LittleEndian::Reader reader(buffer); + CHIP_ERROR error = CHIP_NO_ERROR; + + if (mState == State::kInitialized) + { + Append(buffer, kFixedHeaderSize - mBufferOffset); + error = DecodeFixed(); + } + + if (mState == State::kTlv) + { + Append(buffer, mHeaderTlvSize - mBufferOffset); + error = DecodeTlv(header); + } - // Parse the fixed part of the header + if (error != CHIP_NO_ERROR && error != CHIP_ERROR_BUFFER_TOO_SMALL) + { + Clear(); + } + + return error; +} + +void OTAImageHeaderParser::Append(ByteSpan & buffer, uint32_t numBytes) +{ + numBytes = chip::min(numBytes, static_cast(buffer.size())); + memcpy(&mBuffer[mBufferOffset], buffer.data(), numBytes); + mBufferOffset += numBytes; + buffer = buffer.SubSpan(numBytes); +} + +CHIP_ERROR OTAImageHeaderParser::DecodeFixed() +{ + ReturnErrorCodeIf(mBufferOffset < kFixedHeaderSize, CHIP_ERROR_BUFFER_TOO_SMALL); + + Encoding::LittleEndian::Reader reader(mBuffer.Get(), mBufferOffset); uint32_t fileIdentifier; - ReturnErrorOnFailure(reader.Read32(&fileIdentifier).StatusCode()); - VerifyOrReturnError(fileIdentifier == kOTAImageFileIdentifier, CHIP_ERROR_INVALID_FILE_IDENTIFIER); - ReturnErrorOnFailure(reader.Read64(&header.mTotalSize).Read32(&header.mHeaderSize).StatusCode()); + uint64_t totalSize; + ReturnErrorOnFailure(reader.Read32(&fileIdentifier).Read64(&totalSize).Read32(&mHeaderTlvSize).StatusCode()); + ReturnErrorCodeIf(fileIdentifier != kOTAImageFileIdentifier, CHIP_ERROR_INVALID_FILE_IDENTIFIER); + // Safety check against malicious headers. + ReturnErrorCodeIf(mHeaderTlvSize > kMaxHeaderSize, CHIP_ERROR_NO_MEMORY); + ReturnErrorCodeIf(!mBuffer.Alloc(mHeaderTlvSize), CHIP_ERROR_NO_MEMORY); - // Parse the TLV elements of the header - VerifyOrReturnError(header.mHeaderSize <= reader.Remaining(), CHIP_ERROR_BUFFER_TOO_SMALL); + mState = State::kTlv; + mBufferOffset = 0; + + return CHIP_NO_ERROR; +} + +CHIP_ERROR OTAImageHeaderParser::DecodeTlv(OTAImageHeader & header) +{ + ReturnErrorCodeIf(mBufferOffset < mHeaderTlvSize, CHIP_ERROR_BUFFER_TOO_SMALL); TLV::TLVReader tlvReader; - tlvReader.Init(buffer.data() + reader.OctetsRead(), header.mHeaderSize); + tlvReader.Init(mBuffer.Get(), mBufferOffset); ReturnErrorOnFailure(tlvReader.Next(TLV::TLVType::kTLVType_Structure, TLV::AnonymousTag())); TLV::TLVType outerType; @@ -69,6 +139,7 @@ CHIP_ERROR DecodeOTAImageHeader(ByteSpan buffer, OTAImageHeader & header) ReturnErrorOnFailure(tlvReader.Get(header.mSoftwareVersion)); ReturnErrorOnFailure(tlvReader.Next(TLV::ContextTag(to_underlying(Tag::kSoftwareVersionString)))); ReturnErrorOnFailure(tlvReader.Get(header.mSoftwareVersionString)); + ReturnErrorCodeIf(header.mSoftwareVersionString.size() > kMaxSoftwareVersionStringSize, CHIP_ERROR_INVALID_STRING_LENGTH); ReturnErrorOnFailure(tlvReader.Next(TLV::ContextTag(to_underlying(Tag::kPayloadSize)))); ReturnErrorOnFailure(tlvReader.Get(header.mPayloadSize)); ReturnErrorOnFailure(tlvReader.Next()); @@ -88,6 +159,7 @@ CHIP_ERROR DecodeOTAImageHeader(ByteSpan buffer, OTAImageHeader & header) if (tlvReader.GetTag() == TLV::ContextTag(to_underlying(Tag::kReleaseNotesURL))) { ReturnErrorOnFailure(tlvReader.Get(header.mReleaseNotesURL)); + ReturnErrorCodeIf(header.mReleaseNotesURL.size() > kMaxReleaseNotesURLSize, CHIP_ERROR_INVALID_STRING_LENGTH); ReturnErrorOnFailure(tlvReader.Next()); } diff --git a/src/lib/core/OTAImageHeader.h b/src/lib/core/OTAImageHeader.h index 5295d4e3051460..4d3eea420432c6 100644 --- a/src/lib/core/OTAImageHeader.h +++ b/src/lib/core/OTAImageHeader.h @@ -18,12 +18,14 @@ #pragma once #include +#include #include #include namespace chip { +/// File signature (aka magic number) of a valid Matter OTA image constexpr uint32_t kOTAImageFileIdentifier = 0x1BEEF11E; enum class OTAImageDigestType : uint8_t @@ -44,8 +46,6 @@ enum class OTAImageDigestType : uint8_t struct OTAImageHeader { - uint64_t mTotalSize; - uint32_t mHeaderSize; uint16_t mVendorId; uint16_t mProductId; uint32_t mSoftwareVersion; @@ -58,6 +58,65 @@ struct OTAImageHeader ByteSpan mImageDigest; }; -CHIP_ERROR DecodeOTAImageHeader(ByteSpan buffer, OTAImageHeader & header); +class OTAImageHeaderParser +{ +public: + /** + * @brief Prepare the parser for accepting Matter OTA image chunks. + * + * The method can be called many times to reset the parser state. + */ + void Init(); + + /** + * @brief Clear all resources associated with the parser. + */ + void Clear(); + + /** + * @brief Returns if the parser is ready to accept subsequent Matter OTA image chunks. + */ + bool IsInitialized() const { return mState != State::kNotInitialized; } + + /** + * @brief Decode Matter OTA image header + * + * The method takes subsequent chunks of the Matter OTA image file and decodes the header when + * enough data has been provided. If more image chunks are needed, CHIP_ERROR_BUFFER_TOO_SMALL + * error is returned. Other error codes indicate that the header is invalid. + * + * @param buffer Byte span containing a subsequent Matter OTA image chunk. When the method + * returns CHIP_NO_ERROR, the byte span is used to return a remaining part + * of the chunk, not used by the header. + * @param header Structure to store results of the operation. Note that the results must not be + * referenced after the parser is cleared since string members of the structure + * are only shallow-copied by the method. + * + * @retval CHIP_NO_ERROR Header has been decoded successfully. + * @retval CHIP_ERROR_BUFFER_TOO_SMALL Provided buffers are insufficient to decode the + * header. A user is expected call the method again + * when the next image chunk is available. + * @retval CHIP_ERROR_INVALID_FILE_IDENTIFIER Not a Matter OTA image file. + * @retval Error code Encoded header is invalid. + */ + CHIP_ERROR AccumulateAndDecode(ByteSpan & buffer, OTAImageHeader & header); + +private: + enum State + { + kNotInitialized, + kInitialized, + kTlv + }; + + void Append(ByteSpan & buffer, uint32_t numBytes); + CHIP_ERROR DecodeFixed(); + CHIP_ERROR DecodeTlv(OTAImageHeader & header); + + State mState; + uint32_t mHeaderTlvSize; + uint32_t mBufferOffset; + Platform::ScopedMemoryBuffer mBuffer; +}; } // namespace chip diff --git a/src/lib/core/tests/TestOTAImageHeader.cpp b/src/lib/core/tests/TestOTAImageHeader.cpp index 6d5b6fc226b69b..03b829ac743c29 100644 --- a/src/lib/core/tests/TestOTAImageHeader.cpp +++ b/src/lib/core/tests/TestOTAImageHeader.cpp @@ -72,10 +72,14 @@ const uint8_t kMinOtaImageWithoutVendor[] = { 0x1e, 0xf1, 0xee, 0x1b, 0x44, 0x00 void TestHappyPath(nlTestSuite * inSuite, void * inContext) { + ByteSpan buffer(kOtaImage); OTAImageHeader header; - NL_TEST_ASSERT(inSuite, DecodeOTAImageHeader(ByteSpan(kOtaImage), header) == CHIP_NO_ERROR); - NL_TEST_ASSERT(inSuite, header.mTotalSize == sizeof(kOtaImage)); - NL_TEST_ASSERT(inSuite, header.mHeaderSize == 82); + OTAImageHeaderParser parser; + + parser.Init(); + NL_TEST_ASSERT(inSuite, parser.AccumulateAndDecode(buffer, header) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, parser.IsInitialized()); + NL_TEST_ASSERT(inSuite, buffer.size() == strlen("test payload")); NL_TEST_ASSERT(inSuite, header.mVendorId == 0xDEAD); NL_TEST_ASSERT(inSuite, header.mProductId == 0xBEEF); NL_TEST_ASSERT(inSuite, header.mSoftwareVersion == 0xFFFFFFFF); @@ -92,30 +96,89 @@ void TestHappyPath(nlTestSuite * inSuite, void * inContext) void TestEmptyBuffer(nlTestSuite * inSuite, void * inContext) { + ByteSpan buffer{}; OTAImageHeader header; - NL_TEST_ASSERT(inSuite, DecodeOTAImageHeader(ByteSpan(), header) == CHIP_ERROR_BUFFER_TOO_SMALL); + OTAImageHeaderParser parser; + + parser.Init(); + NL_TEST_ASSERT(inSuite, parser.AccumulateAndDecode(buffer, header) == CHIP_ERROR_BUFFER_TOO_SMALL); + NL_TEST_ASSERT(inSuite, parser.IsInitialized()); } void TestInvalidFileIdentifier(nlTestSuite * inSuite, void * inContext) { - static const uint8_t otaImage[] = { 0x1e, 0xf1, 0xee, 0x1c }; + static const uint8_t otaImage[] = { 0x1e, 0xf1, 0xee, 0x1c, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + ByteSpan buffer(otaImage); OTAImageHeader header; - NL_TEST_ASSERT(inSuite, DecodeOTAImageHeader(ByteSpan(otaImage), header) == CHIP_ERROR_INVALID_FILE_IDENTIFIER); + OTAImageHeaderParser parser; + + parser.Init(); + NL_TEST_ASSERT(inSuite, parser.AccumulateAndDecode(buffer, header) == CHIP_ERROR_INVALID_FILE_IDENTIFIER); + NL_TEST_ASSERT(inSuite, !parser.IsInitialized()); } void TestTooSmallHeader(nlTestSuite * inSuite, void * inContext) { + ByteSpan buffer(kMinOtaImage); OTAImageHeader header; - NL_TEST_ASSERT(inSuite, DecodeOTAImageHeader(ByteSpan(kMinOtaImage), header) == CHIP_NO_ERROR); - NL_TEST_ASSERT(inSuite, - DecodeOTAImageHeader(ByteSpan(kMinOtaImage, sizeof(kMinOtaImage) - 1), header) == CHIP_ERROR_BUFFER_TOO_SMALL); + OTAImageHeaderParser parser; + + parser.Init(); + NL_TEST_ASSERT(inSuite, parser.AccumulateAndDecode(buffer, header) == CHIP_NO_ERROR); + + buffer = ByteSpan(kMinOtaImage, sizeof(kMinOtaImage) - 1); + parser.Init(); + NL_TEST_ASSERT(inSuite, parser.AccumulateAndDecode(buffer, header) == CHIP_ERROR_BUFFER_TOO_SMALL); + NL_TEST_ASSERT(inSuite, parser.IsInitialized()); } void TestMissingMandatoryField(nlTestSuite * inSuite, void * inContext) { + ByteSpan buffer(kMinOtaImageWithoutVendor); OTAImageHeader header; - NL_TEST_ASSERT(inSuite, DecodeOTAImageHeader(ByteSpan(kMinOtaImageWithoutVendor), header) == CHIP_ERROR_UNEXPECTED_TLV_ELEMENT); + OTAImageHeaderParser parser; + + parser.Init(); + NL_TEST_ASSERT(inSuite, parser.AccumulateAndDecode(buffer, header) == CHIP_ERROR_UNEXPECTED_TLV_ELEMENT); + NL_TEST_ASSERT(inSuite, !parser.IsInitialized()); +} + +void TestSmallBlocks(nlTestSuite * inSuite, void * inContext) +{ + constexpr size_t kImageSize = sizeof(kOtaImage); + + CHIP_ERROR error; + OTAImageHeader header; + OTAImageHeaderParser parser; + + for (size_t blockSize : { 1u, 16u, 128u }) + { + error = CHIP_ERROR_BUFFER_TOO_SMALL; + parser.Init(); + + for (size_t offset = 0; offset < kImageSize && error == CHIP_ERROR_BUFFER_TOO_SMALL; offset += blockSize) + { + ByteSpan block(&kOtaImage[offset], chip::min(kImageSize - offset, blockSize)); + error = parser.AccumulateAndDecode(block, header); + } + + NL_TEST_ASSERT(inSuite, error == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, parser.IsInitialized()); + NL_TEST_ASSERT(inSuite, header.mVendorId == 0xDEAD); + NL_TEST_ASSERT(inSuite, header.mProductId == 0xBEEF); + NL_TEST_ASSERT(inSuite, header.mSoftwareVersion == 0xFFFFFFFF); + NL_TEST_ASSERT(inSuite, header.mSoftwareVersionString.data_equal(CharSpan::fromCharString("1.0"))); + NL_TEST_ASSERT(inSuite, header.mPayloadSize == strlen("test payload")); + NL_TEST_ASSERT(inSuite, header.mMinApplicableVersion.HasValue()); + NL_TEST_ASSERT(inSuite, header.mMinApplicableVersion.Value() == 1); + NL_TEST_ASSERT(inSuite, header.mMaxApplicableVersion.HasValue()); + NL_TEST_ASSERT(inSuite, header.mMaxApplicableVersion.Value() == 2); + NL_TEST_ASSERT(inSuite, header.mReleaseNotesURL.data_equal(CharSpan::fromCharString("https://rn"))); + NL_TEST_ASSERT(inSuite, header.mImageDigestType == OTAImageDigestType::kSha256); + NL_TEST_ASSERT(inSuite, header.mImageDigest.size() == 256 / 8); + } } // clang-format off @@ -126,15 +189,27 @@ const nlTest sTests[] = NL_TEST_DEF("Test invalid File Identifier", TestInvalidFileIdentifier), NL_TEST_DEF("Test too small header", TestTooSmallHeader), NL_TEST_DEF("Test missing mandatory field", TestMissingMandatoryField), + NL_TEST_DEF("Test small blocks", TestSmallBlocks), NL_TEST_SENTINEL() }; // clang-format on +int SetupSuite(void * inContext) +{ + return Platform::MemoryInit() == CHIP_NO_ERROR ? SUCCESS : FAILURE; +} + +int TearDownSuite(void * inContext) +{ + Platform::MemoryShutdown(); + return SUCCESS; +} + } // namespace int TestOTAImageHeader(void) { - nlTestSuite theSuite = { "OTA Image header test", &sTests[0] }; + nlTestSuite theSuite = { "OTA Image header test", &sTests[0], SetupSuite, TearDownSuite }; nlTestRunner(&theSuite, nullptr); return nlTestRunnerStats(&theSuite); diff --git a/src/lib/shell/commands/Ota.cpp b/src/lib/shell/commands/Ota.cpp index f0569d2c68bb24..8ad2b2776a005c 100644 --- a/src/lib/shell/commands/Ota.cpp +++ b/src/lib/shell/commands/Ota.cpp @@ -137,7 +137,7 @@ static void HandleProgress(intptr_t context) } else { - streamer_printf(streamer_get(), "Update progress: %d %%\r\n", progress); + streamer_printf(streamer_get(), "Update progress: %d %%\r\n", progress.Value()); } } else diff --git a/src/lib/support/ThreadOperationalDataset.cpp b/src/lib/support/ThreadOperationalDataset.cpp index 35dedc8878a8e6..a30c6a82cd489f 100644 --- a/src/lib/support/ThreadOperationalDataset.cpp +++ b/src/lib/support/ThreadOperationalDataset.cpp @@ -486,8 +486,7 @@ void OperationalDataset::UnsetPSKc(void) bool OperationalDataset::IsCommissioned(void) const { - return Has(ThreadTLV::kNetworkName) && Has(ThreadTLV::kPanId) && Has(ThreadTLV::kMasterKey) && Has(ThreadTLV::kExtendedPanId) && - Has(ThreadTLV::kChannel); + return Has(ThreadTLV::kPanId) && Has(ThreadTLV::kMasterKey) && Has(ThreadTLV::kExtendedPanId) && Has(ThreadTLV::kChannel); } const ThreadTLV * OperationalDataset::Locate(uint8_t aType) const diff --git a/src/platform/ESP32/CHIPPlatformConfig.h b/src/platform/ESP32/CHIPPlatformConfig.h index 7a1e507b0c8783..b37b87dfa3daef 100644 --- a/src/platform/ESP32/CHIPPlatformConfig.h +++ b/src/platform/ESP32/CHIPPlatformConfig.h @@ -58,6 +58,7 @@ #define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS #define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS CONFIG_MAX_EXCHANGE_CONTEXTS #define CHIP_CONFIG_MAX_SESSION_KEYS CONFIG_MAX_SESSION_KEYS +#define CHIP_CONFIG_MAX_FABRICS CONFIG_MAX_FABRICS #define CHIP_CONFIG_SECURITY_TEST_MODE CONFIG_SECURITY_TEST_MODE #define CHIP_CONFIG_REQUIRE_AUTH !CONFIG_DISABLE_PROVISIONING_AUTH #define CHIP_CONFIG_DEFAULT_INCOMING_CONNECTION_IDLE_TIMEOUT CONFIG_DEFAULT_INCOMING_CONNECTION_IDLE_TIMEOUT diff --git a/src/platform/Linux/OTAImageProcessorImpl.cpp b/src/platform/Linux/OTAImageProcessorImpl.cpp index 39016699f98984..6ae4dbb47faf3a 100644 --- a/src/platform/Linux/OTAImageProcessorImpl.cpp +++ b/src/platform/Linux/OTAImageProcessorImpl.cpp @@ -96,6 +96,7 @@ void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context) return; } + imageProcessor->mHeaderParser.Init(); imageProcessor->mOfs.open(imageProcessor->mParams.imageFile.data(), std::ofstream::out | std::ofstream::ate | std::ofstream::app); if (!imageProcessor->mOfs.good()) @@ -134,7 +135,8 @@ void OTAImageProcessorImpl::HandleApply(intptr_t context) OTARequestorInterface * requestor = chip::GetRequestorInstance(); if (requestor != nullptr) { - requestor->NotifyUpdateApplied(imageProcessor->mHeader.softwareVersion); + // TODO: Use software version from Configuration Manager + requestor->NotifyUpdateApplied(imageProcessor->mSoftwareVersion); } } @@ -165,19 +167,48 @@ void OTAImageProcessorImpl::HandleProcessBlock(intptr_t context) return; } - // TODO: Process block header if any + ByteSpan block = imageProcessor->mBlock; + CHIP_ERROR error = imageProcessor->ProcessHeader(block); - if (!imageProcessor->mOfs.write(reinterpret_cast(imageProcessor->mBlock.data()), - static_cast(imageProcessor->mBlock.size()))) + if (error == CHIP_NO_ERROR && + !imageProcessor->mOfs.write(reinterpret_cast(block.data()), static_cast(block.size()))) { - imageProcessor->mDownloader->EndDownload(CHIP_ERROR_WRITE_FAILED); + error = CHIP_ERROR_WRITE_FAILED; + } + + if (error != CHIP_NO_ERROR) + { + imageProcessor->mDownloader->EndDownload(error); return; } - imageProcessor->mParams.downloadedBytes += imageProcessor->mBlock.size(); + imageProcessor->mParams.downloadedBytes += block.size(); imageProcessor->mDownloader->FetchNextData(); } +CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block) +{ + if (mHeaderParser.IsInitialized()) + { + OTAImageHeader header; + CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(block, header); + + // Needs more data to decode the header + ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + ReturnErrorOnFailure(error); + + // We save the software version to be used in the next NotifyUpdateApplied, but it's a non-standard + // behavior of the Linux implementation and the pattern should not be blindly followed by real-life + // products. In general, it's up to the implementation to decide which header fields will be + // validated or presented to the user. + mSoftwareVersion = header.mSoftwareVersion; + mParams.totalFileBytes = header.mPayloadSize; + mHeaderParser.Clear(); + } + + return CHIP_NO_ERROR; +} + CHIP_ERROR OTAImageProcessorImpl::SetBlock(ByteSpan & block) { if (!IsSpanUsable(block)) diff --git a/src/platform/Linux/OTAImageProcessorImpl.h b/src/platform/Linux/OTAImageProcessorImpl.h index c78735485a9a3b..334bbd7d223afa 100644 --- a/src/platform/Linux/OTAImageProcessorImpl.h +++ b/src/platform/Linux/OTAImageProcessorImpl.h @@ -19,6 +19,7 @@ #pragma once #include +#include #include #include @@ -46,6 +47,8 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface static void HandleAbort(intptr_t context); static void HandleProcessBlock(intptr_t context); + CHIP_ERROR ProcessHeader(ByteSpan & block); + /** * Called to allocate memory for mBlock if necessary and set it to block */ @@ -59,6 +62,8 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface std::ofstream mOfs; MutableByteSpan mBlock; OTADownloader * mDownloader; + OTAImageHeaderParser mHeaderParser; + uint32_t mSoftwareVersion; }; } // namespace chip diff --git a/src/platform/P6/ConnectivityManagerImpl.cpp b/src/platform/P6/ConnectivityManagerImpl.cpp index 27a38150089d11..5e284d54659e3e 100644 --- a/src/platform/P6/ConnectivityManagerImpl.cpp +++ b/src/platform/P6/ConnectivityManagerImpl.cpp @@ -69,17 +69,22 @@ CHIP_ERROR ConnectivityManagerImpl::_SetWiFiStationMode(WiFiStationMode val) CHIP_ERROR err = CHIP_NO_ERROR; VerifyOrExit(val != kWiFiStationMode_NotSupported, err = CHIP_ERROR_INVALID_ARGUMENT); if (val != kWiFiStationMode_ApplicationControlled) - { - mWiFiStationMode = val; - DeviceLayer::SystemLayer().ScheduleWork(DriveStationState, NULL); - } - if (mWiFiStationMode != val) { ChipLogProgress(DeviceLayer, "WiFi station mode change: %s -> %s", WiFiStationModeToStr(mWiFiStationMode), WiFiStationModeToStr(val)); + mWiFiStationMode = val; + /* Schedule work for disabled case causes station mode not getting enabled */ + if (mWiFiStationMode != kWiFiStationMode_Disabled) + { + DeviceLayer::SystemLayer().ScheduleWork(DriveStationState, NULL); + } + else + { + /* Call Drive Station directly to disable directly instead of scheduling */ + DriveStationState(); + } } - mWiFiStationMode = val; exit: return err; } @@ -200,21 +205,38 @@ CHIP_ERROR ConnectivityManagerImpl::_Init() // Ensure that P6 station mode is enabled. err = Internal::P6Utils::EnableStationMode(); SuccessOrExit(err); - // If the code has been compiled with a default WiFi station provision, configure that now. - if (CHIP_DEVICE_CONFIG_DEFAULT_STA_SSID[0] != 0) + // If there is no persistent station provision... + if (!IsWiFiStationProvisioned()) { - ChipLogProgress(DeviceLayer, "Setting default WiFi station configuration (SSID: %s)", CHIP_DEVICE_CONFIG_DEFAULT_STA_SSID); - - // Set a default station configuration. - wifi_config_t wifiConfig; - memset(&wifiConfig, 0, sizeof(wifiConfig)); - memcpy(wifiConfig.sta.ssid, CHIP_DEVICE_CONFIG_DEFAULT_STA_SSID, - min(strlen(CHIP_DEVICE_CONFIG_DEFAULT_STA_SSID), sizeof(wifiConfig.sta.ssid))); - memcpy(wifiConfig.sta.password, CHIP_DEVICE_CONFIG_DEFAULT_STA_PASSWORD, - min(strlen(CHIP_DEVICE_CONFIG_DEFAULT_STA_PASSWORD), sizeof(wifiConfig.sta.password))); - wifiConfig.sta.security = CHIP_DEVICE_CONFIG_DEFAULT_STA_SECURITY; - err = Internal::P6Utils::p6_wifi_set_config(WIFI_IF_STA, &wifiConfig); - SuccessOrExit(err); + // If the code has been compiled with a default WiFi station provision, configure that now. + if (CHIP_DEVICE_CONFIG_DEFAULT_STA_SSID[0] != 0) + { + ChipLogProgress(DeviceLayer, "Setting default WiFi station configuration (SSID: %s)", + CHIP_DEVICE_CONFIG_DEFAULT_STA_SSID); + + // Set a default station configuration. + wifi_config_t wifiConfig; + memset(&wifiConfig, 0, sizeof(wifiConfig)); + memcpy(wifiConfig.sta.ssid, CHIP_DEVICE_CONFIG_DEFAULT_STA_SSID, + min(strlen(CHIP_DEVICE_CONFIG_DEFAULT_STA_SSID), sizeof(wifiConfig.sta.ssid))); + memcpy(wifiConfig.sta.password, CHIP_DEVICE_CONFIG_DEFAULT_STA_PASSWORD, + min(strlen(CHIP_DEVICE_CONFIG_DEFAULT_STA_PASSWORD), sizeof(wifiConfig.sta.password))); + wifiConfig.sta.security = CHIP_DEVICE_CONFIG_DEFAULT_STA_SECURITY; + err = Internal::P6Utils::p6_wifi_set_config(WIFI_IF_STA, &wifiConfig); + SuccessOrExit(err); + + // Enable WiFi station mode. + ReturnErrorOnFailure(SetWiFiStationMode(kWiFiStationMode_Enabled)); + } + else + { + ReturnErrorOnFailure(SetWiFiStationMode(kWiFiStationMode_Disabled)); + } + } + else + { + // Enable WiFi station mode. + ReturnErrorOnFailure(SetWiFiStationMode(kWiFiStationMode_Enabled)); } // Force AP mode off for now. err = Internal::P6Utils::SetAPMode(false); @@ -474,9 +496,6 @@ void ConnectivityManagerImpl::DriveStationState() CHIP_ERROR err = CHIP_NO_ERROR; bool stationConnected; - // Refresh the current station mode by reading the configuration from storage. - GetWiFiStationMode(); - // If the station interface is NOT under application control... if (mWiFiStationMode != kWiFiStationMode_ApplicationControlled) { diff --git a/src/platform/P6/MTBKeyValueStore.cpp b/src/platform/P6/MTBKeyValueStore.cpp index 17a01db87c4223..839be54bf37f72 100644 --- a/src/platform/P6/MTBKeyValueStore.cpp +++ b/src/platform/P6/MTBKeyValueStore.cpp @@ -23,23 +23,32 @@ */ #include "MTBKeyValueStore.h" +#include "cy_serial_flash_qspi.h" +#include "cybsp.h" +#include "cycfg_qspi_memslot.h" +#include "cyhal.h" namespace { -cyhal_flash_block_info_t block_info; -cyhal_flash_t flash_obj; mtb_kvstore_bd_t block_device; } // namespace +#define MEM_SLOT_NUM (0u) /* Slot number of the memory to use */ +#define QSPI_BUS_FREQUENCY_HZ (50000000lu) cy_rslt_t mtb_key_value_store_init(mtb_kvstore_t * kvstore_obj) { - cyhal_flash_info_t flash_info; - + uint32_t ext_mem_address = 0x00; + size_t sectorSize; // Initialize the block device - cy_rslt_t result = cyhal_flash_init(&flash_obj); + cy_rslt_t result = + cy_serial_flash_qspi_init(smifMemConfigs[MEM_SLOT_NUM], CYBSP_QSPI_D0, CYBSP_QSPI_D1, CYBSP_QSPI_D2, CYBSP_QSPI_D3, NC, NC, + NC, NC, CYBSP_QSPI_SCK, CYBSP_QSPI_SS, QSPI_BUS_FREQUENCY_HZ); if (CY_RSLT_SUCCESS != result) { return result; } + sectorSize = cy_serial_flash_qspi_get_erase_size(ext_mem_address); + uint32_t length = sectorSize * 2; + uint32_t start_addr = 0; block_device.read = bd_read; block_device.program = bd_program; @@ -47,16 +56,13 @@ cy_rslt_t mtb_key_value_store_init(mtb_kvstore_t * kvstore_obj) block_device.read_size = bd_read_size; block_device.program_size = bd_program_size; block_device.erase_size = bd_erase_size; - block_device.context = &flash_obj; - - cyhal_flash_get_info(&flash_obj, &flash_info); - block_info = flash_info.blocks[flash_info.block_count - 1]; + block_device.context = NULL; // Initialize the kv-store library - result = mtb_kvstore_init(kvstore_obj, block_info.start_address, block_info.size, &block_device); + result = mtb_kvstore_init(kvstore_obj, start_addr, length, &block_device); if (CY_RSLT_SUCCESS != result) { - cyhal_flash_free(&flash_obj); + cy_serial_flash_qspi_deinit(); } return result; @@ -69,40 +75,25 @@ uint32_t bd_read_size(void * context, uint32_t addr) uint32_t bd_program_size(void * context, uint32_t addr) { - return block_info.page_size; + return cy_serial_flash_qspi_get_prog_size(addr); } uint32_t bd_erase_size(void * context, uint32_t addr) { - return block_info.sector_size; + return cy_serial_flash_qspi_get_erase_size(addr); } cy_rslt_t bd_read(void * context, uint32_t addr, uint32_t length, uint8_t * buf) { - memcpy(buf, (const uint8_t *) (addr), length); - return CY_RSLT_SUCCESS; + return cy_serial_flash_qspi_read(addr, length, buf); } cy_rslt_t bd_program(void * context, uint32_t addr, uint32_t length, const uint8_t * buf) { - uint32_t prog_size = bd_program_size(context, addr); - CY_ASSERT(0 == (length % prog_size)); - cy_rslt_t result = CY_RSLT_SUCCESS; - for (uint32_t loc = addr; (result == CY_RSLT_SUCCESS) && (loc < addr + length); loc += prog_size, buf += prog_size) - { - result = cyhal_flash_program((cyhal_flash_t *) context, loc, (const uint32_t *) buf); - } - return result; + return cy_serial_flash_qspi_write(addr, length, buf); } cy_rslt_t bd_erase(void * context, uint32_t addr, uint32_t length) { - uint32_t erase_size = bd_erase_size(context, addr); - CY_ASSERT(0 == (length % erase_size)); - cy_rslt_t result = CY_RSLT_SUCCESS; - for (uint32_t loc = addr; (result == CY_RSLT_SUCCESS) && (loc < addr + length); loc += erase_size) - { - result = cyhal_flash_erase((cyhal_flash_t *) context, loc); - } - return result; + return cy_serial_flash_qspi_erase(addr, length); } diff --git a/src/platform/P6/NetworkCommissioningWiFiDriver.cpp b/src/platform/P6/NetworkCommissioningWiFiDriver.cpp index ec1fb771274e79..fe911c79c687a8 100644 --- a/src/platform/P6/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/P6/NetworkCommissioningWiFiDriver.cpp @@ -97,9 +97,11 @@ Status P6WiFiDriver::AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials) VerifyOrReturnError(credentials.size() <= sizeof(mStagingNetwork.credentials), Status::kOutOfRange); VerifyOrReturnError(ssid.size() <= sizeof(mStagingNetwork.ssid), Status::kOutOfRange); + memset(mStagingNetwork.credentials, 0, sizeof(mStagingNetwork.credentials)); memcpy(mStagingNetwork.credentials, credentials.data(), credentials.size()); mStagingNetwork.credentialsLen = static_cast(credentials.size()); + memset(mStagingNetwork.ssid, 0, sizeof(mStagingNetwork.ssid)); memcpy(mStagingNetwork.ssid, ssid.data(), ssid.size()); mStagingNetwork.ssidLen = static_cast(ssid.size()); @@ -147,6 +149,7 @@ void P6WiFiDriver::OnConnectWiFiNetwork() { if (mpConnectCallback) { + CommitConfiguration(); mpConnectCallback->OnResult(Status::kSuccess, CharSpan(), 0); mpConnectCallback = nullptr; } @@ -159,7 +162,7 @@ void P6WiFiDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * callback VerifyOrExit(NetworkMatch(mStagingNetwork, networkId), networkingStatus = Status::kNetworkIDNotFound); VerifyOrExit(mpConnectCallback == nullptr, networkingStatus = Status::kUnknownError); - ChipLogProgress(NetworkProvisioning, "P6 NetworkCommissioningDelegate: SSID: %s", networkId.data()); + ChipLogProgress(NetworkProvisioning, "P6 NetworkCommissioningDelegate: SSID: %s", mStagingNetwork.ssid); err = ConnectWiFiNetwork(reinterpret_cast(mStagingNetwork.ssid), mStagingNetwork.ssidLen, reinterpret_cast(mStagingNetwork.credentials), mStagingNetwork.credentialsLen); mpConnectCallback = callback; diff --git a/src/platform/P6/P6Utils.cpp b/src/platform/P6/P6Utils.cpp index 4c38e6d89ac255..186ac46cc00359 100644 --- a/src/platform/P6/P6Utils.cpp +++ b/src/platform/P6/P6Utils.cpp @@ -210,9 +210,9 @@ CHIP_ERROR P6Utils::GetWiFiSSID(char * buf, size_t bufSize) return P6Config::ReadConfigValueStr(P6Config::kConfigKey_WiFiSSID, buf, bufSize, num); } -CHIP_ERROR P6Utils::StoreWiFiSSID(char * buf) +CHIP_ERROR P6Utils::StoreWiFiSSID(char * buf, size_t size) { - return P6Config::WriteConfigValueStr(P6Config::kConfigKey_WiFiSSID, buf); + return P6Config::WriteConfigValueStr(P6Config::kConfigKey_WiFiSSID, buf, size); } CHIP_ERROR P6Utils::GetWiFiPassword(char * buf, size_t bufSize) @@ -221,9 +221,9 @@ CHIP_ERROR P6Utils::GetWiFiPassword(char * buf, size_t bufSize) return P6Config::ReadConfigValueStr(P6Config::kConfigKey_WiFiPassword, buf, bufSize, num); } -CHIP_ERROR P6Utils::StoreWiFiPassword(char * buf) +CHIP_ERROR P6Utils::StoreWiFiPassword(char * buf, size_t size) { - return P6Config::WriteConfigValueStr(P6Config::kConfigKey_WiFiPassword, buf); + return P6Config::WriteConfigValueStr(P6Config::kConfigKey_WiFiPassword, buf, size); } CHIP_ERROR P6Utils::GetWiFiSecurityCode(uint32_t & security) @@ -252,10 +252,10 @@ CHIP_ERROR P6Utils::p6_wifi_set_config(wifi_interface_t interface, wifi_config_t if (interface == WIFI_IF_STA) { /* Store Wi-Fi Configurations in Storage */ - err = StoreWiFiSSID((char *) conf->sta.ssid); + err = StoreWiFiSSID((char *) conf->sta.ssid, strlen((char *) conf->sta.ssid)); SuccessOrExit(err); - err = StoreWiFiPassword((char *) conf->sta.password); + err = StoreWiFiPassword((char *) conf->sta.password, strlen((char *) conf->sta.password)); SuccessOrExit(err); err = StoreWiFiSecurityCode(conf->sta.security); @@ -759,7 +759,7 @@ static int xtlv_size_for_data(int dlen, uint16_t opts, const uint8_t ** data) { int hsz; hsz = xtlv_hdr_size(opts, data); - return ((opts & XTLV_OPTION_ALIGN32) ? ALIGN_SIZE(dlen + hsz, 4) : (dlen + hsz)); + return ((opts & XTLV_OPTION_ALIGN32) ? P6_ALIGN_SIZE(dlen + hsz, 4) : (dlen + hsz)); } static int xtlv_len(const xtlv_t * elt, uint16_t opts) diff --git a/src/platform/P6/P6Utils.h b/src/platform/P6/P6Utils.h index 411d498e211ea5..5861a75e25c6e7 100644 --- a/src/platform/P6/P6Utils.h +++ b/src/platform/P6/P6Utils.h @@ -166,6 +166,7 @@ typedef struct xtlv #define XTLV_OPTION_LENU8 0x0004 /* shorted length */ #define OFFSETOF(type, member) ((uintptr_t) & ((type *) 0)->member) #define _LTOH16_UA(cp) ((cp)[0] | ((cp)[1] << 8)) +#define P6_ALIGN_SIZE(value, align_to) (((value) + (align_to) -1) & ~((align_to) -1)) #define CHK_CNTBUF_DATALEN(cntbuf, ioctl_buflen) \ do \ @@ -219,9 +220,9 @@ class P6Utils static void unpack_xtlv_buf(const uint8_t * tlv_buf, uint16_t buflen, wl_cnt_ver_30_t * cnt, wl_cnt_ge40mcst_v1_t * cnt_ge40); static void heap_usage(heap_info_t * heap); static CHIP_ERROR GetWiFiSSID(char * buf, size_t bufSize); - static CHIP_ERROR StoreWiFiSSID(char * buf); + static CHIP_ERROR StoreWiFiSSID(char * buf, size_t size); static CHIP_ERROR GetWiFiPassword(char * buf, size_t bufSize); - static CHIP_ERROR StoreWiFiPassword(char * buf); + static CHIP_ERROR StoreWiFiPassword(char * buf, size_t size); static CHIP_ERROR GetWiFiSecurityCode(uint32_t & security); static CHIP_ERROR StoreWiFiSecurityCode(uint32_t security); static CHIP_ERROR wifi_get_mode(uint32_t & security); diff --git a/src/platform/Zephyr/ThreadStackManagerImpl.cpp b/src/platform/Zephyr/ThreadStackManagerImpl.cpp index f0e02f073638e9..d6633007992476 100644 --- a/src/platform/Zephyr/ThreadStackManagerImpl.cpp +++ b/src/platform/Zephyr/ThreadStackManagerImpl.cpp @@ -61,12 +61,6 @@ CHIP_ERROR ThreadStackManagerImpl::_InitThreadStack() return CHIP_NO_ERROR; } -CHIP_ERROR ThreadStackManagerImpl::_StartThreadTask() -{ - // Intentionally empty. - return CHIP_NO_ERROR; -} - void ThreadStackManagerImpl::_LockThreadStack() { openthread_api_mutex_lock(openthread_get_default_context()); @@ -83,9 +77,25 @@ void ThreadStackManagerImpl::_UnlockThreadStack() openthread_api_mutex_unlock(openthread_get_default_context()); } -void ThreadStackManagerImpl::_ProcessThreadActivity() +void ThreadStackManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) { - // Intentionally empty. + Internal::GenericThreadStackManagerImpl_OpenThread::_OnPlatformEvent(event); + + if (event->Type == DeviceEventType::kThreadStateChange && event->ThreadStateChange.RoleChanged) + { + const bool isAttached = IsThreadAttached(); + VerifyOrReturn(isAttached != mIsAttached); + + ChipDeviceEvent attachEvent; + attachEvent.Type = DeviceEventType::kThreadConnectivityChange; + attachEvent.ThreadConnectivityChange.Result = isAttached ? kConnectivity_Established : kConnectivity_Lost; + + CHIP_ERROR error = PlatformMgr().PostEvent(&attachEvent); + VerifyOrReturn(error == CHIP_NO_ERROR, + ChipLogError(DeviceLayer, "Failed to post Thread connectivity change: %" CHIP_ERROR_FORMAT, error.Format())); + + mIsAttached = isAttached; + } } } // namespace DeviceLayer diff --git a/src/platform/Zephyr/ThreadStackManagerImpl.h b/src/platform/Zephyr/ThreadStackManagerImpl.h index c98bc3fb128db0..992d2b0780629c 100644 --- a/src/platform/Zephyr/ThreadStackManagerImpl.h +++ b/src/platform/Zephyr/ThreadStackManagerImpl.h @@ -64,14 +64,15 @@ class ThreadStackManagerImpl final : public ThreadStackManager, protected: // ===== Methods that implement the ThreadStackManager abstract interface. - CHIP_ERROR _StartThreadTask(); + CHIP_ERROR _StartThreadTask() { return CHIP_NO_ERROR; } void _LockThreadStack(); bool _TryLockThreadStack(); void _UnlockThreadStack(); // ===== Methods that override the GenericThreadStackManagerImpl_OpenThread abstract interface. - void _ProcessThreadActivity(); + void _ProcessThreadActivity() {} + void _OnPlatformEvent(const ChipDeviceEvent * event); //} // namespace Internal @@ -85,7 +86,7 @@ class ThreadStackManagerImpl final : public ThreadStackManager, // ===== Private members for use by this class only. - ThreadStackManagerImpl() = default; + bool mIsAttached = false; }; /** diff --git a/src/platform/nrfconnect/OTAImageProcessorImpl.cpp b/src/platform/nrfconnect/OTAImageProcessorImpl.cpp index 4e3949fdae7dea..08e37f36d4646a 100644 --- a/src/platform/nrfconnect/OTAImageProcessorImpl.cpp +++ b/src/platform/nrfconnect/OTAImageProcessorImpl.cpp @@ -37,8 +37,10 @@ CHIP_ERROR OTAImageProcessorImpl::PrepareDownload() CHIP_ERROR OTAImageProcessorImpl::PrepareDownloadImpl() { + mHeaderParser.Init(); ReturnErrorOnFailure(System::MapErrorZephyr(dfu_target_mcuboot_set_buf(mBuffer, sizeof(mBuffer)))); ReturnErrorOnFailure(System::MapErrorZephyr(dfu_target_reset())); + return System::MapErrorZephyr(dfu_target_init(DFU_TARGET_IMAGE_TYPE_MCUBOOT, /* size */ 0, nullptr)); } @@ -61,8 +63,13 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessBlock(ByteSpan & block) { VerifyOrReturnError(mDownloader != nullptr, CHIP_ERROR_INCORRECT_STATE); - // DFU target library buffers data internally, so do not clone the block data. - CHIP_ERROR error = System::MapErrorZephyr(dfu_target_write(block.data(), block.size())); + CHIP_ERROR error = ProcessHeader(block); + + if (error == CHIP_NO_ERROR) + { + // DFU target library buffers data internally, so do not clone the block data. + error = System::MapErrorZephyr(dfu_target_write(block.data(), block.size())); + } // Report the result back to the downloader asynchronously. return DeviceLayer::SystemLayer().ScheduleLambda([this, error, block] { @@ -78,5 +85,23 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessBlock(ByteSpan & block) }); } +CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block) +{ + if (mHeaderParser.IsInitialized()) + { + OTAImageHeader header; + CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(block, header); + + // Needs more data to decode the header + ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + ReturnErrorOnFailure(error); + + mParams.totalFileBytes = header.mPayloadSize; + mHeaderParser.Clear(); + } + + return CHIP_NO_ERROR; +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/nrfconnect/OTAImageProcessorImpl.h b/src/platform/nrfconnect/OTAImageProcessorImpl.h index a9db9201ec6565..e5aa1032c3002f 100644 --- a/src/platform/nrfconnect/OTAImageProcessorImpl.h +++ b/src/platform/nrfconnect/OTAImageProcessorImpl.h @@ -17,6 +17,7 @@ #pragma once +#include #include #include @@ -41,8 +42,10 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface private: CHIP_ERROR PrepareDownloadImpl(); + CHIP_ERROR ProcessHeader(ByteSpan & block); OTADownloader * mDownloader = nullptr; + OTAImageHeaderParser mHeaderParser; uint8_t mBuffer[kBufferSize]; }; diff --git a/third_party/p6/p6_sdk/build/CY8CKIT-062S2-43012/Debug/GCC_ARM.json b/third_party/p6/p6_sdk/build/CY8CKIT-062S2-43012/Debug/GCC_ARM.json index 106edbd7d88be6..c8d7625938c4d7 100644 --- a/third_party/p6/p6_sdk/build/CY8CKIT-062S2-43012/Debug/GCC_ARM.json +++ b/third_party/p6/p6_sdk/build/CY8CKIT-062S2-43012/Debug/GCC_ARM.json @@ -142,6 +142,7 @@ "-I./libs/secure-sockets/include", "-I./libs/secure-sockets/include/COMPONENT_FREERTOS", "-I./libs/secure-sockets/source", + "-I./libs/serial-flash/", "-I./libs/whd-bsp-integration", "-I./libs/wifi-connection-manager", "-I./libs/wifi-connection-manager/include", @@ -428,6 +429,8 @@ "./libs/mtb-pdl-cat1/drivers/source/cy_wdt.c", "./libs/retarget-io/cy_retarget_io.c", "./libs/secure-sockets/source/cy_tls_weak.c", + "./libs/serial-flash/cy_serial_flash_prog.c", + "./libs/serial-flash/cy_serial_flash_qspi.c", "./libs/whd-bsp-integration/cy_network_buffer.c", "./libs/whd-bsp-integration/cybsp_wifi.c", "./libs/wifi-host-driver/WiFi_Host_Driver/resources/resource_imp/whd_resources.c", diff --git a/third_party/p6/p6_sdk/build/CY8CKIT-062S2-43012/Release/GCC_ARM.json b/third_party/p6/p6_sdk/build/CY8CKIT-062S2-43012/Release/GCC_ARM.json index c7449050d04e15..1ab41aaeef6975 100644 --- a/third_party/p6/p6_sdk/build/CY8CKIT-062S2-43012/Release/GCC_ARM.json +++ b/third_party/p6/p6_sdk/build/CY8CKIT-062S2-43012/Release/GCC_ARM.json @@ -142,6 +142,7 @@ "-I./libs/secure-sockets/include", "-I./libs/secure-sockets/include/COMPONENT_FREERTOS", "-I./libs/secure-sockets/source", + "-I./libs/serial-flash/", "-I./libs/whd-bsp-integration", "-I./libs/wifi-connection-manager", "-I./libs/wifi-connection-manager/include", @@ -428,6 +429,8 @@ "./libs/mtb-pdl-cat1/drivers/source/cy_wdt.c", "./libs/retarget-io/cy_retarget_io.c", "./libs/secure-sockets/source/cy_tls_weak.c", + "./libs/serial-flash/cy_serial_flash_prog.c", + "./libs/serial-flash/cy_serial_flash_qspi.c", "./libs/whd-bsp-integration/cy_network_buffer.c", "./libs/whd-bsp-integration/cybsp_wifi.c", "./libs/wifi-host-driver/WiFi_Host_Driver/resources/resource_imp/whd_resources.c", diff --git a/third_party/p6/p6_sdk/configs/FreeRTOSConfig.h b/third_party/p6/p6_sdk/configs/FreeRTOSConfig.h index e9f80425ec10c6..df4d89c52c93a4 100644 --- a/third_party/p6/p6_sdk/configs/FreeRTOSConfig.h +++ b/third_party/p6/p6_sdk/configs/FreeRTOSConfig.h @@ -79,7 +79,7 @@ extern uint32_t SystemCoreClock; #define configCHECK_FOR_STACK_OVERFLOW 2 #define configUSE_MALLOC_FAILED_HOOK 1 -#define configUSE_DAEMON_TASK_STARTUP_HOOK 0 +#define configUSE_DAEMON_TASK_STARTUP_HOOK 1 #define configUSE_APPLICATION_TASK_TAG 0 /* Run time and task stats gathering related definitions. */ diff --git a/third_party/p6/p6_sdk/libs/serial-flash b/third_party/p6/p6_sdk/libs/serial-flash new file mode 160000 index 00000000000000..db4a5dd646629a --- /dev/null +++ b/third_party/p6/p6_sdk/libs/serial-flash @@ -0,0 +1 @@ +Subproject commit db4a5dd646629ac31d669b4ed943d8ab1fa4a9d7 diff --git a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp index 432cd50061c786..4cf492b693448d 100644 --- a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp @@ -145,6 +145,52 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace BarrierControl +namespace Binding { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::Bind::Id: { + Commands::Bind::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBindingClusterBindCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::Unbind::Id: { + Commands::Unbind::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBindingClusterUnbindCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace Binding + namespace ColorControl { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -1771,6 +1817,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::BarrierControl::Id: Clusters::BarrierControl::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::Binding::Id: + Clusters::Binding::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::ColorControl::Id: Clusters::ColorControl::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 59eddf9c93e1c0..fc16faf24ef43d 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -29,30 +29,12 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 0, Cluster: Binding (server), big-endian */ \ + /* Endpoint: 0, Cluster: Localization Configuration (server), big-endian */ \ \ - /* 0 - binding list, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 0, Cluster: Localization Configuration (server), big-endian */ \ + /* 0 - ActiveLocale, */ \ + 5, 'e', 'n', '-', 'U', 'S', \ \ - /* 254 - ActiveLocale, */ \ - 5, 'e', 'n', '-', 'U', 'S', \ - \ - /* 260 - SupportedLocales, */ \ + /* 6 - SupportedLocales, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -70,299 +52,281 @@ \ /* Endpoint: 0, Cluster: Unit Localization (server), big-endian */ \ \ - /* 514 - FeatureMap, */ \ + /* 260 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Commissioning (server), big-endian */ \ \ - /* 518 - Breadcrumb, */ \ + /* 264 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 526 - FeatureMap, */ \ + /* 272 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 530 - Networks, */ \ + /* 276 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 542 - LastConnectErrorValue, */ \ + /* 288 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 546 - FeatureMap, */ \ + /* 292 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x02, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 550 - UpTime, */ \ + /* 296 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 558 - TotalOperationalHours, */ \ + /* 304 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 562 - CurrentHeapFree, */ \ + /* 308 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 570 - CurrentHeapUsed, */ \ + /* 316 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 578 - CurrentHeapHighWatermark, */ \ + /* 324 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 586 - FeatureMap, */ \ + /* 332 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 590 - NetworkName, */ \ + /* 336 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 592 - ExtendedPanId, */ \ + /* 338 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 600 - OverrunCount, */ \ + /* 346 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 608 - PartitionId, */ \ + /* 354 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 612 - TxTotalCount, */ \ + /* 358 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 616 - TxUnicastCount, */ \ + /* 362 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 620 - TxBroadcastCount, */ \ + /* 366 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 624 - TxAckRequestedCount, */ \ + /* 370 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 628 - TxAckedCount, */ \ + /* 374 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 632 - TxNoAckRequestedCount, */ \ + /* 378 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 636 - TxDataCount, */ \ + /* 382 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 640 - TxDataPollCount, */ \ + /* 386 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 644 - TxBeaconCount, */ \ + /* 390 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 648 - TxBeaconRequestCount, */ \ + /* 394 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 652 - TxOtherCount, */ \ + /* 398 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 656 - TxRetryCount, */ \ + /* 402 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 660 - TxDirectMaxRetryExpiryCount, */ \ + /* 406 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 664 - TxIndirectMaxRetryExpiryCount, */ \ + /* 410 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 668 - TxErrCcaCount, */ \ + /* 414 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 672 - TxErrAbortCount, */ \ + /* 418 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 676 - TxErrBusyChannelCount, */ \ + /* 422 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 680 - RxTotalCount, */ \ + /* 426 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 684 - RxUnicastCount, */ \ + /* 430 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 688 - RxBroadcastCount, */ \ + /* 434 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 692 - RxDataCount, */ \ + /* 438 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 696 - RxDataPollCount, */ \ + /* 442 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 700 - RxBeaconCount, */ \ + /* 446 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 704 - RxBeaconRequestCount, */ \ + /* 450 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 708 - RxOtherCount, */ \ + /* 454 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 712 - RxAddressFilteredCount, */ \ + /* 458 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 716 - RxDestAddrFilteredCount, */ \ + /* 462 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 720 - RxDuplicatedCount, */ \ + /* 466 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 724 - RxErrNoFrameCount, */ \ + /* 470 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 728 - RxErrUnknownNeighborCount, */ \ + /* 474 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 732 - RxErrInvalidSrcAddrCount, */ \ + /* 478 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 736 - RxErrSecCount, */ \ + /* 482 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 740 - RxErrFcsCount, */ \ + /* 486 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 744 - RxErrOtherCount, */ \ + /* 490 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 748 - ActiveTimestamp, */ \ + /* 494 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 756 - PendingTimestamp, */ \ + /* 502 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 764 - delay, */ \ + /* 510 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 768 - ChannelMask, */ \ + /* 514 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 775 - FeatureMap, */ \ + /* 521 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 779 - BeaconLostCount, */ \ + /* 525 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 783 - BeaconRxCount, */ \ + /* 529 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 787 - PacketMulticastRxCount, */ \ + /* 533 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 791 - PacketMulticastTxCount, */ \ + /* 537 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 795 - PacketUnicastRxCount, */ \ + /* 541 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 799 - PacketUnicastTxCount, */ \ + /* 545 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 803 - CurrentMaxRate, */ \ + /* 549 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 811 - OverrunCount, */ \ + /* 557 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 819 - FeatureMap, */ \ + /* 565 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 823 - PacketRxCount, */ \ + /* 569 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 831 - PacketTxCount, */ \ + /* 577 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 839 - TxErrCount, */ \ + /* 585 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 847 - CollisionCount, */ \ + /* 593 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 855 - OverrunCount, */ \ + /* 601 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 863 - TimeSinceReset, */ \ + /* 609 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 871 - FeatureMap, */ \ + /* 617 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 1, Cluster: On/Off (server), big-endian */ \ \ - /* 875 - FeatureMap, */ \ + /* 621 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Level Control (server), big-endian */ \ \ - /* 879 - FeatureMap, */ \ + /* 625 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ - /* Endpoint: 1, Cluster: Binding (server), big-endian */ \ - \ - /* 883 - binding list, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ /* Endpoint: 1, Cluster: Power Source (server), big-endian */ \ \ - /* 1137 - BatteryVoltage, */ \ + /* 629 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1141 - BatteryTimeRemaining, */ \ + /* 633 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1145 - ActiveBatteryFaults, */ \ + /* 637 - ActiveBatteryFaults, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1153 - FeatureMap, */ \ + /* 645 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 1157 - Networks, */ \ + /* 649 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1169 - LastConnectErrorValue, */ \ + /* 661 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1173 - FeatureMap, */ \ + /* 665 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server), big-endian */ \ \ - /* 1177 - SoftwareVersion, */ \ + /* 669 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), big-endian */ \ \ - /* 1181 - FeatureMap, */ \ + /* 673 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), big-endian */ \ \ - /* 1185 - label list, */ \ + /* 677 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -380,58 +344,58 @@ \ /* Endpoint: 1, Cluster: Mode Select (server), big-endian */ \ \ - /* 1439 - Description, */ \ + /* 931 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), big-endian */ \ \ - /* 1446 - DoorOpenEvents, */ \ + /* 938 - DoorOpenEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1450 - DoorClosedEvents, */ \ + /* 942 - DoorClosedEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1454 - Language, */ \ + /* 946 - Language, */ \ 2, 'e', 'n', \ \ - /* 1457 - AutoRelockTime, */ \ + /* 949 - AutoRelockTime, */ \ 0x00, 0x00, 0x00, 0x60, \ \ - /* 1461 - FeatureMap, */ \ + /* 953 - FeatureMap, */ \ 0x00, 0x00, 0x01, 0x03, \ \ /* Endpoint: 1, Cluster: Window Covering (server), big-endian */ \ \ - /* 1465 - FeatureMap, */ \ + /* 957 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), big-endian */ \ \ - /* 1469 - LifetimeRunningHours, */ \ + /* 961 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 1472 - Power, */ \ + /* 964 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 1475 - LifetimeEnergyConsumed, */ \ + /* 967 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1479 - FeatureMap, */ \ + /* 971 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), big-endian */ \ \ - /* 1483 - FeatureMap, */ \ + /* 975 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0B, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), big-endian */ \ \ - /* 1487 - IAS CIE address, */ \ + /* 979 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Channel (server), big-endian */ \ \ - /* 1495 - channel list, */ \ + /* 987 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -449,7 +413,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), big-endian */ \ \ - /* 1749 - target navigator list, */ \ + /* 1241 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -467,24 +431,24 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), big-endian */ \ \ - /* 2003 - start time, */ \ + /* 1495 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 2011 - duration, */ \ + /* 1503 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2019 - playback speed, */ \ + /* 1511 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2023 - seek range end, */ \ + /* 1515 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2031 - seek range start, */ \ + /* 1523 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), big-endian */ \ \ - /* 2039 - media input list, */ \ + /* 1531 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -502,7 +466,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), big-endian */ \ \ - /* 2293 - accept header list, */ \ + /* 1785 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -518,12 +482,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2547 - supported streaming protocols, */ \ + /* 2039 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), big-endian */ \ \ - /* 2551 - audio output list, */ \ + /* 2043 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -541,7 +505,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), big-endian */ \ \ - /* 2805 - application launcher list, */ \ + /* 2297 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -559,67 +523,67 @@ \ /* Endpoint: 1, Cluster: Application Basic (server), big-endian */ \ \ - /* 3059 - allowed vendor list, */ \ + /* 2551 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), big-endian */ \ \ - /* 3091 - bitmap32, */ \ + /* 2583 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3095 - bitmap64, */ \ + /* 2587 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3103 - int24u, */ \ + /* 2595 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3106 - int32u, */ \ + /* 2598 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3110 - int40u, */ \ + /* 2602 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3115 - int48u, */ \ + /* 2607 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3121 - int56u, */ \ + /* 2613 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3128 - int64u, */ \ + /* 2620 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3136 - int24s, */ \ + /* 2628 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3139 - int32s, */ \ + /* 2631 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3143 - int40s, */ \ + /* 2635 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3148 - int48s, */ \ + /* 2640 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3154 - int56s, */ \ + /* 2646 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3161 - int64s, */ \ + /* 2653 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3169 - float_single, */ \ + /* 2661 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3173 - float_double, */ \ + /* 2665 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3181 - epoch_us, */ \ + /* 2673 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3189 - epoch_s, */ \ + /* 2681 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3193 - list_long_octet_string, */ \ + /* 2685 - list_long_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -674,65 +638,65 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4193 - nullable_bitmap32, */ \ + /* 3685 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4197 - nullable_bitmap64, */ \ + /* 3689 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4205 - nullable_int24u, */ \ + /* 3697 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 4208 - nullable_int32u, */ \ + /* 3700 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4212 - nullable_int40u, */ \ + /* 3704 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4217 - nullable_int48u, */ \ + /* 3709 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4223 - nullable_int56u, */ \ + /* 3715 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4230 - nullable_int64u, */ \ + /* 3722 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4238 - nullable_int24s, */ \ + /* 3730 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 4241 - nullable_int32s, */ \ + /* 3733 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4245 - nullable_int40s, */ \ + /* 3737 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4250 - nullable_int48s, */ \ + /* 3742 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4256 - nullable_int56s, */ \ + /* 3748 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4263 - nullable_int64s, */ \ + /* 3755 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4271 - nullable_float_single, */ \ + /* 3763 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4275 - nullable_float_double, */ \ + /* 3767 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), big-endian */ \ \ - /* 4283 - measurement type, */ \ + /* 3775 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4287 - total active power, */ \ + /* 3779 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), big-endian */ \ \ - /* 4291 - FeatureMap, */ \ + /* 3783 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } @@ -740,30 +704,12 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 0, Cluster: Binding (server), little-endian */ \ + /* Endpoint: 0, Cluster: Localization Configuration (server), little-endian */ \ \ - /* 0 - binding list, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 0, Cluster: Localization Configuration (server), little-endian */ \ - \ - /* 254 - ActiveLocale, */ \ - 5, 'e', 'n', '-', 'U', 'S', \ + /* 0 - ActiveLocale, */ \ + 5, 'e', 'n', '-', 'U', 'S', \ \ - /* 260 - SupportedLocales, */ \ + /* 6 - SupportedLocales, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -781,299 +727,281 @@ \ /* Endpoint: 0, Cluster: Unit Localization (server), little-endian */ \ \ - /* 514 - FeatureMap, */ \ + /* 260 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ \ - /* 518 - Breadcrumb, */ \ + /* 264 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 526 - FeatureMap, */ \ + /* 272 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 530 - Networks, */ \ + /* 276 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 542 - LastConnectErrorValue, */ \ + /* 288 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 546 - FeatureMap, */ \ + /* 292 - FeatureMap, */ \ 0x02, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 550 - UpTime, */ \ + /* 296 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 558 - TotalOperationalHours, */ \ + /* 304 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 562 - CurrentHeapFree, */ \ + /* 308 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 570 - CurrentHeapUsed, */ \ + /* 316 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 578 - CurrentHeapHighWatermark, */ \ + /* 324 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 586 - FeatureMap, */ \ + /* 332 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 590 - NetworkName, */ \ + /* 336 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 592 - ExtendedPanId, */ \ + /* 338 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 600 - OverrunCount, */ \ + /* 346 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 608 - PartitionId, */ \ + /* 354 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 612 - TxTotalCount, */ \ + /* 358 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 616 - TxUnicastCount, */ \ + /* 362 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 620 - TxBroadcastCount, */ \ + /* 366 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 624 - TxAckRequestedCount, */ \ + /* 370 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 628 - TxAckedCount, */ \ + /* 374 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 632 - TxNoAckRequestedCount, */ \ + /* 378 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 636 - TxDataCount, */ \ + /* 382 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 640 - TxDataPollCount, */ \ + /* 386 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 644 - TxBeaconCount, */ \ + /* 390 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 648 - TxBeaconRequestCount, */ \ + /* 394 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 652 - TxOtherCount, */ \ + /* 398 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 656 - TxRetryCount, */ \ + /* 402 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 660 - TxDirectMaxRetryExpiryCount, */ \ + /* 406 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 664 - TxIndirectMaxRetryExpiryCount, */ \ + /* 410 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 668 - TxErrCcaCount, */ \ + /* 414 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 672 - TxErrAbortCount, */ \ + /* 418 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 676 - TxErrBusyChannelCount, */ \ + /* 422 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 680 - RxTotalCount, */ \ + /* 426 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 684 - RxUnicastCount, */ \ + /* 430 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 688 - RxBroadcastCount, */ \ + /* 434 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 692 - RxDataCount, */ \ + /* 438 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 696 - RxDataPollCount, */ \ + /* 442 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 700 - RxBeaconCount, */ \ + /* 446 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 704 - RxBeaconRequestCount, */ \ + /* 450 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 708 - RxOtherCount, */ \ + /* 454 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 712 - RxAddressFilteredCount, */ \ + /* 458 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 716 - RxDestAddrFilteredCount, */ \ + /* 462 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 720 - RxDuplicatedCount, */ \ + /* 466 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 724 - RxErrNoFrameCount, */ \ + /* 470 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 728 - RxErrUnknownNeighborCount, */ \ + /* 474 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 732 - RxErrInvalidSrcAddrCount, */ \ + /* 478 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 736 - RxErrSecCount, */ \ + /* 482 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 740 - RxErrFcsCount, */ \ + /* 486 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 744 - RxErrOtherCount, */ \ + /* 490 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 748 - ActiveTimestamp, */ \ + /* 494 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 756 - PendingTimestamp, */ \ + /* 502 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 764 - delay, */ \ + /* 510 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 768 - ChannelMask, */ \ + /* 514 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 775 - FeatureMap, */ \ + /* 521 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 779 - BeaconLostCount, */ \ + /* 525 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 783 - BeaconRxCount, */ \ + /* 529 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 787 - PacketMulticastRxCount, */ \ + /* 533 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 791 - PacketMulticastTxCount, */ \ + /* 537 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 795 - PacketUnicastRxCount, */ \ + /* 541 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 799 - PacketUnicastTxCount, */ \ + /* 545 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 803 - CurrentMaxRate, */ \ + /* 549 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 811 - OverrunCount, */ \ + /* 557 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 819 - FeatureMap, */ \ + /* 565 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 823 - PacketRxCount, */ \ + /* 569 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 831 - PacketTxCount, */ \ + /* 577 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 839 - TxErrCount, */ \ + /* 585 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 847 - CollisionCount, */ \ + /* 593 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 855 - OverrunCount, */ \ + /* 601 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 863 - TimeSinceReset, */ \ + /* 609 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 871 - FeatureMap, */ \ + /* 617 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: On/Off (server), little-endian */ \ \ - /* 875 - FeatureMap, */ \ + /* 621 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Level Control (server), little-endian */ \ \ - /* 879 - FeatureMap, */ \ + /* 625 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: Binding (server), little-endian */ \ - \ - /* 883 - binding list, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ /* Endpoint: 1, Cluster: Power Source (server), little-endian */ \ \ - /* 1137 - BatteryVoltage, */ \ + /* 629 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1141 - BatteryTimeRemaining, */ \ + /* 633 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1145 - ActiveBatteryFaults, */ \ + /* 637 - ActiveBatteryFaults, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1153 - FeatureMap, */ \ + /* 645 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 1157 - Networks, */ \ + /* 649 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1169 - LastConnectErrorValue, */ \ + /* 661 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1173 - FeatureMap, */ \ + /* 665 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server), little-endian */ \ \ - /* 1177 - SoftwareVersion, */ \ + /* 669 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), little-endian */ \ \ - /* 1181 - FeatureMap, */ \ + /* 673 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), little-endian */ \ \ - /* 1185 - label list, */ \ + /* 677 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1091,58 +1019,58 @@ \ /* Endpoint: 1, Cluster: Mode Select (server), little-endian */ \ \ - /* 1439 - Description, */ \ + /* 931 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), little-endian */ \ \ - /* 1446 - DoorOpenEvents, */ \ + /* 938 - DoorOpenEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1450 - DoorClosedEvents, */ \ + /* 942 - DoorClosedEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1454 - Language, */ \ + /* 946 - Language, */ \ 2, 'e', 'n', \ \ - /* 1457 - AutoRelockTime, */ \ + /* 949 - AutoRelockTime, */ \ 0x60, 0x00, 0x00, 0x00, \ \ - /* 1461 - FeatureMap, */ \ + /* 953 - FeatureMap, */ \ 0x03, 0x01, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Window Covering (server), little-endian */ \ \ - /* 1465 - FeatureMap, */ \ + /* 957 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), little-endian */ \ \ - /* 1469 - LifetimeRunningHours, */ \ + /* 961 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 1472 - Power, */ \ + /* 964 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 1475 - LifetimeEnergyConsumed, */ \ + /* 967 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1479 - FeatureMap, */ \ + /* 971 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), little-endian */ \ \ - /* 1483 - FeatureMap, */ \ + /* 975 - FeatureMap, */ \ 0x0B, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), little-endian */ \ \ - /* 1487 - IAS CIE address, */ \ + /* 979 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Channel (server), little-endian */ \ \ - /* 1495 - channel list, */ \ + /* 987 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1160,7 +1088,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), little-endian */ \ \ - /* 1749 - target navigator list, */ \ + /* 1241 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1178,24 +1106,24 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), little-endian */ \ \ - /* 2003 - start time, */ \ + /* 1495 - start time, */ \ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2011 - duration, */ \ + /* 1503 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2019 - playback speed, */ \ + /* 1511 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2023 - seek range end, */ \ + /* 1515 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2031 - seek range start, */ \ + /* 1523 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), little-endian */ \ \ - /* 2039 - media input list, */ \ + /* 1531 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1213,7 +1141,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), little-endian */ \ \ - /* 2293 - accept header list, */ \ + /* 1785 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1229,12 +1157,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2547 - supported streaming protocols, */ \ + /* 2039 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), little-endian */ \ \ - /* 2551 - audio output list, */ \ + /* 2043 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1252,7 +1180,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), little-endian */ \ \ - /* 2805 - application launcher list, */ \ + /* 2297 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1270,67 +1198,67 @@ \ /* Endpoint: 1, Cluster: Application Basic (server), little-endian */ \ \ - /* 3059 - allowed vendor list, */ \ + /* 2551 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), little-endian */ \ \ - /* 3091 - bitmap32, */ \ + /* 2583 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3095 - bitmap64, */ \ + /* 2587 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3103 - int24u, */ \ + /* 2595 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3106 - int32u, */ \ + /* 2598 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3110 - int40u, */ \ + /* 2602 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3115 - int48u, */ \ + /* 2607 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3121 - int56u, */ \ + /* 2613 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3128 - int64u, */ \ + /* 2620 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3136 - int24s, */ \ + /* 2628 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3139 - int32s, */ \ + /* 2631 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3143 - int40s, */ \ + /* 2635 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3148 - int48s, */ \ + /* 2640 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3154 - int56s, */ \ + /* 2646 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3161 - int64s, */ \ + /* 2653 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3169 - float_single, */ \ + /* 2661 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3173 - float_double, */ \ + /* 2665 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3181 - epoch_us, */ \ + /* 2673 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3189 - epoch_s, */ \ + /* 2681 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3193 - list_long_octet_string, */ \ + /* 2685 - list_long_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1385,71 +1313,71 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4193 - nullable_bitmap32, */ \ + /* 3685 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4197 - nullable_bitmap64, */ \ + /* 3689 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4205 - nullable_int24u, */ \ + /* 3697 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 4208 - nullable_int32u, */ \ + /* 3700 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4212 - nullable_int40u, */ \ + /* 3704 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4217 - nullable_int48u, */ \ + /* 3709 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4223 - nullable_int56u, */ \ + /* 3715 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4230 - nullable_int64u, */ \ + /* 3722 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4238 - nullable_int24s, */ \ + /* 3730 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 4241 - nullable_int32s, */ \ + /* 3733 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4245 - nullable_int40s, */ \ + /* 3737 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4250 - nullable_int48s, */ \ + /* 3742 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4256 - nullable_int56s, */ \ + /* 3748 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4263 - nullable_int64s, */ \ + /* 3755 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4271 - nullable_float_single, */ \ + /* 3763 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4275 - nullable_float_double, */ \ + /* 3767 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), little-endian */ \ \ - /* 4283 - measurement type, */ \ + /* 3775 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4287 - total active power, */ \ + /* 3779 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), little-endian */ \ \ - /* 4291 - FeatureMap, */ \ + /* 3783 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (151) +#define GENERATED_DEFAULTS_COUNT (149) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1545,7 +1473,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 645 +#define GENERATED_ATTRIBUTE_COUNT 643 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1567,8 +1495,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Binding (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(0) }, /* binding list */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Access Control (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1629,9 +1556,9 @@ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(254) }, /* ActiveLocale */ \ - { 0x00000002, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* SupportedLocales */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + ZAP_LONG_DEFAULTS_INDEX(0) }, /* ActiveLocale */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(6) }, /* SupportedLocales */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, \ @@ -1646,7 +1573,7 @@ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ @@ -1654,31 +1581,31 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(518) }, /* Breadcrumb */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(264) }, /* Breadcrumb */ \ { 0x00000001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfo */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(526) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(272) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(530) }, /* Networks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(276) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(542) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(546) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(288) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(292) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(550) }, /* UpTime */ \ - { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(558) }, /* TotalOperationalHours */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(296) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(304) }, /* TotalOperationalHours */ \ { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ @@ -1689,23 +1616,23 @@ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(562) }, /* CurrentHeapFree */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(570) }, /* CurrentHeapUsed */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(578) }, /* CurrentHeapHighWatermark */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(586) }, /* FeatureMap */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(308) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(316) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(324) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(332) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x00000002, ZAP_TYPE(CHAR_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(590) }, /* NetworkName */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* NetworkName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(592) }, /* ExtendedPanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(338) }, /* ExtendedPanId */ \ { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(600) }, /* OverrunCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(346) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(608) }, /* PartitionId */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(354) }, /* PartitionId */ \ { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -1718,50 +1645,50 @@ { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(612) }, /* TxTotalCount */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(616) }, /* TxUnicastCount */ \ - { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(620) }, /* TxBroadcastCount */ \ - { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(624) }, /* TxAckRequestedCount */ \ - { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(628) }, /* TxAckedCount */ \ - { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(632) }, /* TxNoAckRequestedCount */ \ - { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(636) }, /* TxDataCount */ \ - { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(640) }, /* TxDataPollCount */ \ - { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(644) }, /* TxBeaconCount */ \ - { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(648) }, /* TxBeaconRequestCount */ \ - { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(652) }, /* TxOtherCount */ \ - { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(656) }, /* TxRetryCount */ \ - { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(660) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(664) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(668) }, /* TxErrCcaCount */ \ - { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(672) }, /* TxErrAbortCount */ \ - { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(676) }, /* TxErrBusyChannelCount */ \ - { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(680) }, /* RxTotalCount */ \ - { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(684) }, /* RxUnicastCount */ \ - { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(688) }, /* RxBroadcastCount */ \ - { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(692) }, /* RxDataCount */ \ - { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(696) }, /* RxDataPollCount */ \ - { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(700) }, /* RxBeaconCount */ \ - { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(704) }, /* RxBeaconRequestCount */ \ - { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(708) }, /* RxOtherCount */ \ - { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(712) }, /* RxAddressFilteredCount */ \ - { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(716) }, /* RxDestAddrFilteredCount */ \ - { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(720) }, /* RxDuplicatedCount */ \ - { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(724) }, /* RxErrNoFrameCount */ \ - { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(728) }, /* RxErrUnknownNeighborCount */ \ - { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(732) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(736) }, /* RxErrSecCount */ \ - { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(740) }, /* RxErrFcsCount */ \ - { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(744) }, /* RxErrOtherCount */ \ - { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(748) }, /* ActiveTimestamp */ \ - { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(756) }, /* PendingTimestamp */ \ - { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(764) }, /* delay */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(358) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(362) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(366) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(370) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(374) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(378) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(382) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(386) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(390) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(394) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(402) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(406) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(410) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(414) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(418) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(422) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(426) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(430) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(434) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(438) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(442) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(446) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(450) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(454) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(458) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(462) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(466) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(470) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(474) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(478) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(482) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(486) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(490) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(494) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(502) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(510) }, /* delay */ \ { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(768) }, /* ChannelMask */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* ChannelMask */ \ { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(775) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(521) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ @@ -1770,28 +1697,28 @@ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(779) }, /* BeaconLostCount */ \ - { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(783) }, /* BeaconRxCount */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(787) }, /* PacketMulticastRxCount */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(791) }, /* PacketMulticastTxCount */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(795) }, /* PacketUnicastRxCount */ \ - { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(799) }, /* PacketUnicastTxCount */ \ - { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(803) }, /* CurrentMaxRate */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(811) }, /* OverrunCount */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(819) }, /* FeatureMap */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(525) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(529) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(533) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(537) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(541) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(545) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(549) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(557) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(565) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(823) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(831) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(839) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(847) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(855) }, /* OverrunCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(577) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(585) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(593) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(601) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(863) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(871) }, /* FeatureMap */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(609) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(617) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -1861,7 +1788,7 @@ { 0x00004001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OnTime */ \ { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ { 0x00004003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(875) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(621) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ @@ -1893,7 +1820,7 @@ { 0x00004000, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(879) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(625) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ @@ -1911,7 +1838,6 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binding (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(883) }, /* binding list */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ @@ -1922,28 +1848,28 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Power Source (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ - { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ - { 0x00000002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* Description */ \ - { 0x0000000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1137) }, /* BatteryVoltage */ \ - { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryPercentRemaining */ \ - { 0x0000000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1141) }, /* BatteryTimeRemaining */ \ - { 0x0000000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ - { 0x00000012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1145) }, /* ActiveBatteryFaults */ \ - { 0x0000001A, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeState */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1153) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* Description */ \ + { 0x0000000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(629) }, /* BatteryVoltage */ \ + { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryPercentRemaining */ \ + { 0x0000000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(633) }, /* BatteryTimeRemaining */ \ + { 0x0000000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ + { 0x00000012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(637) }, /* ActiveBatteryFaults */ \ + { 0x0000001A, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeState */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(645) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(1157) }, /* Networks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(649) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1169) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1173) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(661) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(665) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ @@ -1956,7 +1882,7 @@ { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(1177) }, /* SoftwareVersion */ \ + ZAP_LONG_DEFAULTS_INDEX(669) }, /* SoftwareVersion */ \ { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ @@ -1969,15 +1895,15 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Switch (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ - { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* current position */ \ - { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* multi press max */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1181) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* current position */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* multi press max */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(673) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1185) }, /* label list */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(677) }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: User Label (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1993,17 +1919,17 @@ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedModes */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnMode */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* StartUpMode */ \ - { 0x00000004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(1439) }, /* Description */ \ + { 0x00000004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(931) }, /* Description */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(2) }, /* LockState */ \ - { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LockType */ \ - { 0x00000002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ActuatorEnabled */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* DoorState */ \ - { 0x00000004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1446) }, /* DoorOpenEvents */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(2) }, /* LockState */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LockType */ \ + { 0x00000002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ActuatorEnabled */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* DoorState */ \ + { 0x00000004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(938) }, /* DoorOpenEvents */ \ { 0x00000005, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1450) }, /* DoorClosedEvents */ \ + ZAP_LONG_DEFAULTS_INDEX(942) }, /* DoorClosedEvents */ \ { 0x00000006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* OpenPeriod */ \ { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfTotalUsersSupported */ \ { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfPINUsersSupported */ \ @@ -2016,8 +1942,8 @@ { 0x00000019, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(20) }, /* MaxRFIDCodeLength */ \ { 0x0000001A, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(10) }, /* MinRFIDCodeLength */ \ { 0x0000001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ - { 0x00000021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1454) }, /* Language */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1457) }, /* AutoRelockTime */ \ + { 0x00000021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(946) }, /* Language */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(949) }, /* AutoRelockTime */ \ { 0x00000024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* SoundVolume */ \ { 0x00000025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -2034,9 +1960,9 @@ { 0x00000031, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* UserCodeTemporaryDisableTime */ \ { 0x00000033, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* RequirePINforRemoteOperation */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1461) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(0) }, /* RequirePINforRemoteOperation */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(953) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ @@ -2069,10 +1995,10 @@ ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ { 0x00000017, ZAP_TYPE(BITMAP8), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* Mode */ \ - { 0x0000001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1465) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* Mode */ \ + { 0x0000001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(957) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier moving state */ \ @@ -2101,17 +2027,17 @@ { 0x00000013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1469) }, /* LifetimeRunningHours */ \ - { 0x00000016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(1472) }, /* Power */ \ + ZAP_LONG_DEFAULTS_INDEX(961) }, /* LifetimeRunningHours */ \ + { 0x00000016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(964) }, /* Power */ \ { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1475) }, /* LifetimeEnergyConsumed */ \ + ZAP_LONG_DEFAULTS_INDEX(967) }, /* LifetimeEnergyConsumed */ \ { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* OperationMode */ \ { 0x00000021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(12) }, /* ControlMode */ \ - { 0x00000022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1479) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(12) }, /* ControlMode */ \ + { 0x00000022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(971) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* local temperature */ \ @@ -2136,12 +2062,12 @@ { 0x0000001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* control sequence of operation */ \ { 0x0000001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(19) }, /* system mode */ \ - { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ - { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ - { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1483) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(19) }, /* system mode */ \ + { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ + { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ + { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(975) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -2263,7 +2189,7 @@ { 0x00000001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ { 0x00000002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ { 0x00000010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1487) }, /* IAS CIE address */ \ + ZAP_LONG_DEFAULTS_INDEX(979) }, /* IAS CIE address */ \ { 0x00000011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ @@ -2272,25 +2198,26 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Channel (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1495) }, /* channel list */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(987) }, /* channel list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1749) }, /* target navigator list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1241) }, /* target navigator list */ \ { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current navigator target */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x00000001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2003) }, /* start time */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2011) }, /* duration */ \ - { 0x00000004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2019) }, /* playback speed */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2023) }, /* seek range end */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2031) }, /* seek range start */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ + { 0x00000001, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_LONG_DEFAULTS_INDEX(1495) }, /* start time */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_LONG_DEFAULTS_INDEX(1503) }, /* duration */ \ + { 0x00000004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1511) }, /* playback speed */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_LONG_DEFAULTS_INDEX(1515) }, /* seek range end */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(1523) }, /* seek range start */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Input (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2039) }, /* media input list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1531) }, /* media input list */ \ { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current media input */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -2301,18 +2228,18 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2293) }, /* accept header list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1785) }, /* accept header list */ \ { 0x00000001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(2547) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(2039) }, /* supported streaming protocols */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2551) }, /* audio output list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2043) }, /* audio output list */ \ { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2805) }, /* application launcher list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2297) }, /* application launcher list */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ @@ -2322,7 +2249,7 @@ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ { 0x00000006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x00000007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(3059) }, /* allowed vendor list */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2551) }, /* allowed vendor list */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Account Login (server) */ \ @@ -2332,28 +2259,28 @@ { 0x00000000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ { 0x00000001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ { 0x00000002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ - { 0x00000003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3091) }, /* bitmap32 */ \ - { 0x00000004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3095) }, /* bitmap64 */ \ + { 0x00000003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2583) }, /* bitmap32 */ \ + { 0x00000004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2587) }, /* bitmap64 */ \ { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ { 0x00000006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ - { 0x00000007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3103) }, /* int24u */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3106) }, /* int32u */ \ - { 0x00000009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3110) }, /* int40u */ \ - { 0x0000000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3115) }, /* int48u */ \ - { 0x0000000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3121) }, /* int56u */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3128) }, /* int64u */ \ + { 0x00000007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2595) }, /* int24u */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2598) }, /* int32u */ \ + { 0x00000009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2602) }, /* int40u */ \ + { 0x0000000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2607) }, /* int48u */ \ + { 0x0000000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2613) }, /* int56u */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2620) }, /* int64u */ \ { 0x0000000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ { 0x0000000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ - { 0x0000000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3136) }, /* int24s */ \ - { 0x00000010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3139) }, /* int32s */ \ - { 0x00000011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3143) }, /* int40s */ \ - { 0x00000012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3148) }, /* int48s */ \ - { 0x00000013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3154) }, /* int56s */ \ - { 0x00000014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3161) }, /* int64s */ \ + { 0x0000000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2628) }, /* int24s */ \ + { 0x00000010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2631) }, /* int32s */ \ + { 0x00000011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2635) }, /* int40s */ \ + { 0x00000012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2640) }, /* int48s */ \ + { 0x00000013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2646) }, /* int56s */ \ + { 0x00000014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2653) }, /* int64s */ \ { 0x00000015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ { 0x00000016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ - { 0x00000017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3169) }, /* float_single */ \ - { 0x00000018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3173) }, /* float_double */ \ + { 0x00000017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2661) }, /* float_single */ \ + { 0x00000018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2665) }, /* float_double */ \ { 0x00000019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* octet_string */ \ { 0x0000001A, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_int8u */ \ @@ -2366,8 +2293,8 @@ { 0x0000001E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* char_string */ \ { 0x0000001F, ZAP_TYPE(LONG_CHAR_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* long_char_string */ \ - { 0x00000020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3181) }, /* epoch_us */ \ - { 0x00000021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(3189) }, /* epoch_s */ \ + { 0x00000020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2673) }, /* epoch_us */ \ + { 0x00000021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2681) }, /* epoch_s */ \ { 0x00000022, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* vendor_id */ \ { 0x00000023, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_nullables_and_optionals_struct */ \ @@ -2382,7 +2309,7 @@ ZAP_MIN_MAX_DEFAULTS_INDEX(34) }, /* range_restricted_int16u */ \ { 0x00000029, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(35) }, /* range_restricted_int16s */ \ - { 0x0000002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(3193) }, /* list_long_octet_string */ \ + { 0x0000002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(2685) }, /* list_long_octet_string */ \ { 0x0000002B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* list_fabric_scoped */ \ { 0x00000030, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(MUST_USE_TIMED_WRITE), \ @@ -2398,49 +2325,49 @@ { 0x00008002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_bitmap16 */ \ { 0x00008003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4193) }, /* nullable_bitmap32 */ \ + ZAP_LONG_DEFAULTS_INDEX(3685) }, /* nullable_bitmap32 */ \ { 0x00008004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4197) }, /* nullable_bitmap64 */ \ + ZAP_LONG_DEFAULTS_INDEX(3689) }, /* nullable_bitmap64 */ \ { 0x00008005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8u */ \ { 0x00008006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16u */ \ { 0x00008007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4205) }, /* nullable_int24u */ \ + ZAP_LONG_DEFAULTS_INDEX(3697) }, /* nullable_int24u */ \ { 0x00008008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4208) }, /* nullable_int32u */ \ + ZAP_LONG_DEFAULTS_INDEX(3700) }, /* nullable_int32u */ \ { 0x00008009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4212) }, /* nullable_int40u */ \ + ZAP_LONG_DEFAULTS_INDEX(3704) }, /* nullable_int40u */ \ { 0x0000800A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4217) }, /* nullable_int48u */ \ + ZAP_LONG_DEFAULTS_INDEX(3709) }, /* nullable_int48u */ \ { 0x0000800B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4223) }, /* nullable_int56u */ \ + ZAP_LONG_DEFAULTS_INDEX(3715) }, /* nullable_int56u */ \ { 0x0000800C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4230) }, /* nullable_int64u */ \ + ZAP_LONG_DEFAULTS_INDEX(3722) }, /* nullable_int64u */ \ { 0x0000800D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8s */ \ { 0x0000800E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16s */ \ { 0x0000800F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4238) }, /* nullable_int24s */ \ + ZAP_LONG_DEFAULTS_INDEX(3730) }, /* nullable_int24s */ \ { 0x00008010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4241) }, /* nullable_int32s */ \ + ZAP_LONG_DEFAULTS_INDEX(3733) }, /* nullable_int32s */ \ { 0x00008011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4245) }, /* nullable_int40s */ \ + ZAP_LONG_DEFAULTS_INDEX(3737) }, /* nullable_int40s */ \ { 0x00008012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4250) }, /* nullable_int48s */ \ + ZAP_LONG_DEFAULTS_INDEX(3742) }, /* nullable_int48s */ \ { 0x00008013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4256) }, /* nullable_int56s */ \ + ZAP_LONG_DEFAULTS_INDEX(3748) }, /* nullable_int56s */ \ { 0x00008014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4263) }, /* nullable_int64s */ \ + ZAP_LONG_DEFAULTS_INDEX(3755) }, /* nullable_int64s */ \ { 0x00008015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum8 */ \ { 0x00008016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum16 */ \ { 0x00008017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4271) }, /* nullable_float_single */ \ + ZAP_LONG_DEFAULTS_INDEX(3763) }, /* nullable_float_single */ \ { 0x00008018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4275) }, /* nullable_float_double */ \ + ZAP_LONG_DEFAULTS_INDEX(3767) }, /* nullable_float_double */ \ { 0x00008019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* nullable_octet_string */ \ { 0x0000801E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -2465,8 +2392,8 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ - { 0x00000000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4283) }, /* measurement type */ \ - { 0x00000304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4287) }, /* total active power */ \ + { 0x00000000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3775) }, /* measurement type */ \ + { 0x00000304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3779) }, /* total active power */ \ { 0x00000505, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms voltage */ \ { 0x00000506, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage min */ \ { 0x00000507, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage max */ \ @@ -2488,7 +2415,7 @@ { 0x00004001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnTime */ \ { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OffWaitTime */ \ { 0x00004003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4291) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3783) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ @@ -2591,6 +2518,11 @@ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Binding (server) */\ + /* client_generated */ \ + 0x00000000 /* Bind */, \ + 0x00000001 /* Unbind */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* client_generated */ \ 0x00000000 /* AnnounceOtaProvider */, \ @@ -2737,6 +2669,11 @@ 0x00000006 /* StepWithOnOff */, \ 0x00000007 /* StopWithOnOff */, \ chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 1, Cluster: Binding (server) */\ + /* client_generated */ \ + 0x00000000 /* Bind */, \ + 0x00000001 /* Unbind */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Network Commissioning (server) */\ /* client_generated */ \ 0x00000000 /* ScanNetworks */, \ @@ -2826,13 +2763,6 @@ 0x00000000 /* PlayRequest */, \ 0x00000001 /* PauseRequest */, \ 0x00000002 /* StopRequest */, \ - 0x00000003 /* StartOverRequest */, \ - 0x00000004 /* PreviousRequest */, \ - 0x00000005 /* NextRequest */, \ - 0x00000006 /* RewindRequest */, \ - 0x00000007 /* FastForwardRequest */, \ - 0x00000008 /* SkipForwardRequest */, \ - 0x00000009 /* SkipBackwardRequest */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Media Input (server) */\ /* client_generated */ \ @@ -2965,17 +2895,17 @@ /* Endpoint: 0, Cluster: Binding (server) */ \ .clusterId = 0x0000001E, \ .attributes = ZAP_ATTRIBUTE_INDEX(10), \ - .attributeCount = 2, \ - .clusterSize = 256, \ + .attributeCount = 1, \ + .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = nullptr ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 18 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Access Control (server) */ \ .clusterId = 0x0000001F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(12), \ + .attributes = ZAP_ATTRIBUTE_INDEX(11), \ .attributeCount = 3, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2986,7 +2916,7 @@ { \ /* Endpoint: 0, Cluster: Basic (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(15), \ + .attributes = ZAP_ATTRIBUTE_INDEX(14), \ .attributeCount = 20, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2997,7 +2927,7 @@ { \ /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ .clusterId = 0x00000029, \ - .attributes = ZAP_ATTRIBUTE_INDEX(35), \ + .attributes = ZAP_ATTRIBUTE_INDEX(34), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -3008,18 +2938,18 @@ { \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ .clusterId = 0x0000002A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(35), \ + .attributes = ZAP_ATTRIBUTE_INDEX(34), \ .attributeCount = 5, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 18 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ .clusterId = 0x0000002B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(40), \ + .attributes = ZAP_ATTRIBUTE_INDEX(39), \ .attributeCount = 3, \ .clusterSize = 292, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3030,7 +2960,7 @@ { \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ .clusterId = 0x0000002C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(43), \ + .attributes = ZAP_ATTRIBUTE_INDEX(42), \ .attributeCount = 4, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3041,7 +2971,7 @@ { \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ .clusterId = 0x0000002D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(47), \ + .attributes = ZAP_ATTRIBUTE_INDEX(46), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3052,7 +2982,7 @@ { \ /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ .clusterId = 0x0000002E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(50), \ + .attributes = ZAP_ATTRIBUTE_INDEX(49), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3063,40 +2993,40 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(52), \ + .attributes = ZAP_ATTRIBUTE_INDEX(51), \ .attributeCount = 6, \ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 20 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 28 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(58), \ + .attributes = ZAP_ATTRIBUTE_INDEX(57), \ .attributeCount = 10, \ .clusterSize = 60, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 28 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 36 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 31 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ .clusterId = 0x00000032, \ - .attributes = ZAP_ATTRIBUTE_INDEX(68), \ + .attributes = ZAP_ATTRIBUTE_INDEX(67), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 42 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ .clusterId = 0x00000033, \ - .attributes = ZAP_ATTRIBUTE_INDEX(68), \ + .attributes = ZAP_ATTRIBUTE_INDEX(67), \ .attributeCount = 9, \ .clusterSize = 17, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3107,84 +3037,84 @@ { \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ .clusterId = 0x00000034, \ - .attributes = ZAP_ATTRIBUTE_INDEX(77), \ + .attributes = ZAP_ATTRIBUTE_INDEX(76), \ .attributeCount = 6, \ .clusterSize = 30, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 41 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 44 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ .clusterId = 0x00000035, \ - .attributes = ZAP_ATTRIBUTE_INDEX(83), \ + .attributes = ZAP_ATTRIBUTE_INDEX(82), \ .attributeCount = 65, \ .clusterSize = 247, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 46 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ .clusterId = 0x00000036, \ - .attributes = ZAP_ATTRIBUTE_INDEX(148), \ + .attributes = ZAP_ATTRIBUTE_INDEX(147), \ .attributeCount = 15, \ .clusterSize = 58, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 48 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ .clusterId = 0x00000037, \ - .attributes = ZAP_ATTRIBUTE_INDEX(163), \ + .attributes = ZAP_ATTRIBUTE_INDEX(162), \ .attributeCount = 11, \ .clusterSize = 57, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 50 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ .clusterId = 0x0000003C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(174), \ + .attributes = ZAP_ATTRIBUTE_INDEX(173), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(178), \ + .attributes = ZAP_ATTRIBUTE_INDEX(177), \ .attributeCount = 7, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 53 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 63 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 56 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 66 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ .clusterId = 0x0000003F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(185), \ + .attributes = ZAP_ATTRIBUTE_INDEX(184), \ .attributeCount = 5, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 68 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 73 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 71 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 76 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(190), \ + .attributes = ZAP_ATTRIBUTE_INDEX(189), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3195,7 +3125,7 @@ { \ /* Endpoint: 0, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(192), \ + .attributes = ZAP_ATTRIBUTE_INDEX(191), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3206,7 +3136,7 @@ { \ /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(194), \ + .attributes = ZAP_ATTRIBUTE_INDEX(193), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3217,51 +3147,51 @@ { \ /* Endpoint: 1, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(198), \ + .attributes = ZAP_ATTRIBUTE_INDEX(197), \ .attributeCount = 3, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 76 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 80 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 79 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 83 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(201), \ + .attributes = ZAP_ATTRIBUTE_INDEX(200), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 82 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 89 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 85 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 92 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ .clusterId = 0x00000005, \ - .attributes = ZAP_ATTRIBUTE_INDEX(203), \ + .attributes = ZAP_ATTRIBUTE_INDEX(202), \ .attributeCount = 6, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 94 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 102 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 97 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 105 ) ,\ },\ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(209), \ + .attributes = ZAP_ATTRIBUTE_INDEX(208), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 109 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 112 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ .clusterId = 0x00000007, \ - .attributes = ZAP_ATTRIBUTE_INDEX(216), \ + .attributes = ZAP_ATTRIBUTE_INDEX(215), \ .attributeCount = 3, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3272,18 +3202,18 @@ { \ /* Endpoint: 1, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(219), \ + .attributes = ZAP_ATTRIBUTE_INDEX(218), \ .attributeCount = 16, \ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 116 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 119 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ .clusterId = 0x0000000F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(235), \ + .attributes = ZAP_ATTRIBUTE_INDEX(234), \ .attributeCount = 4, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3294,7 +3224,7 @@ { \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(239), \ + .attributes = ZAP_ATTRIBUTE_INDEX(238), \ .attributeCount = 5, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3305,18 +3235,18 @@ { \ /* Endpoint: 1, Cluster: Binding (server) */ \ .clusterId = 0x0000001E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(244), \ - .attributeCount = 2, \ - .clusterSize = 256, \ + .attributes = ZAP_ATTRIBUTE_INDEX(243), \ + .attributeCount = 1, \ + .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = nullptr ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 128 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ .clusterId = 0x00000025, \ - .attributes = ZAP_ATTRIBUTE_INDEX(246), \ + .attributes = ZAP_ATTRIBUTE_INDEX(244), \ .attributeCount = 4, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3327,7 +3257,7 @@ { \ /* Endpoint: 1, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(250), \ + .attributes = ZAP_ATTRIBUTE_INDEX(248), \ .attributeCount = 11, \ .clusterSize = 88, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3338,18 +3268,18 @@ { \ /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(261), \ + .attributes = ZAP_ATTRIBUTE_INDEX(259), \ .attributeCount = 10, \ .clusterSize = 60, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 125 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 132 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 131 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 138 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ .clusterId = 0x00000039, \ - .attributes = ZAP_ATTRIBUTE_INDEX(271), \ + .attributes = ZAP_ATTRIBUTE_INDEX(269), \ .attributeCount = 16, \ .clusterSize = 679, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3360,7 +3290,7 @@ { \ /* Endpoint: 1, Cluster: Switch (server) */ \ .clusterId = 0x0000003B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(287), \ + .attributes = ZAP_ATTRIBUTE_INDEX(285), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3371,7 +3301,7 @@ { \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(292), \ + .attributes = ZAP_ATTRIBUTE_INDEX(290), \ .attributeCount = 2, \ .clusterSize = 256, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3382,7 +3312,7 @@ { \ /* Endpoint: 1, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(294), \ + .attributes = ZAP_ATTRIBUTE_INDEX(292), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3393,7 +3323,7 @@ { \ /* Endpoint: 1, Cluster: Boolean State (server) */ \ .clusterId = 0x00000045, \ - .attributes = ZAP_ATTRIBUTE_INDEX(296), \ + .attributes = ZAP_ATTRIBUTE_INDEX(294), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3404,51 +3334,51 @@ { \ /* Endpoint: 1, Cluster: Mode Select (server) */ \ .clusterId = 0x00000050, \ - .attributes = ZAP_ATTRIBUTE_INDEX(298), \ + .attributes = ZAP_ATTRIBUTE_INDEX(296), \ .attributeCount = 6, \ .clusterSize = 38, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 135 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 141 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ .clusterId = 0x00000101, \ - .attributes = ZAP_ATTRIBUTE_INDEX(304), \ + .attributes = ZAP_ATTRIBUTE_INDEX(302), \ .attributeCount = 32, \ .clusterSize = 54, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayDoorLockServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 137 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 143 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ .clusterId = 0x00000102, \ - .attributes = ZAP_ATTRIBUTE_INDEX(336), \ + .attributes = ZAP_ATTRIBUTE_INDEX(334), \ .attributeCount = 20, \ .clusterSize = 35, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 146 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 152 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ .clusterId = 0x00000103, \ - .attributes = ZAP_ATTRIBUTE_INDEX(356), \ + .attributes = ZAP_ATTRIBUTE_INDEX(354), \ .attributeCount = 5, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 150 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 156 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ .clusterId = 0x00000200, \ - .attributes = ZAP_ATTRIBUTE_INDEX(361), \ + .attributes = ZAP_ATTRIBUTE_INDEX(359), \ .attributeCount = 26, \ .clusterSize = 54, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3459,18 +3389,18 @@ { \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ .clusterId = 0x00000201, \ - .attributes = ZAP_ATTRIBUTE_INDEX(387), \ + .attributes = ZAP_ATTRIBUTE_INDEX(385), \ .attributeCount = 19, \ .clusterSize = 34, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 153 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 159 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ .clusterId = 0x00000204, \ - .attributes = ZAP_ATTRIBUTE_INDEX(406), \ + .attributes = ZAP_ATTRIBUTE_INDEX(404), \ .attributeCount = 4, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3481,18 +3411,18 @@ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ .clusterId = 0x00000300, \ - .attributes = ZAP_ATTRIBUTE_INDEX(410), \ + .attributes = ZAP_ATTRIBUTE_INDEX(408), \ .attributeCount = 53, \ .clusterSize = 341, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayColorControlServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 157 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 163 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ .clusterId = 0x00000400, \ - .attributes = ZAP_ATTRIBUTE_INDEX(463), \ + .attributes = ZAP_ATTRIBUTE_INDEX(461), \ .attributeCount = 6, \ .clusterSize = 11, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3503,7 +3433,7 @@ { \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(469), \ + .attributes = ZAP_ATTRIBUTE_INDEX(467), \ .attributeCount = 5, \ .clusterSize = 10, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3514,7 +3444,7 @@ { \ /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ .clusterId = 0x00000403, \ - .attributes = ZAP_ATTRIBUTE_INDEX(474), \ + .attributes = ZAP_ATTRIBUTE_INDEX(472), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3525,7 +3455,7 @@ { \ /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ .clusterId = 0x00000404, \ - .attributes = ZAP_ATTRIBUTE_INDEX(478), \ + .attributes = ZAP_ATTRIBUTE_INDEX(476), \ .attributeCount = 5, \ .clusterSize = 10, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3536,7 +3466,7 @@ { \ /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(483), \ + .attributes = ZAP_ATTRIBUTE_INDEX(481), \ .attributeCount = 5, \ .clusterSize = 10, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3547,7 +3477,7 @@ { \ /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(488), \ + .attributes = ZAP_ATTRIBUTE_INDEX(486), \ .attributeCount = 4, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -3558,18 +3488,18 @@ { \ /* Endpoint: 1, Cluster: IAS Zone (server) */ \ .clusterId = 0x00000500, \ - .attributes = ZAP_ATTRIBUTE_INDEX(492), \ + .attributes = ZAP_ATTRIBUTE_INDEX(490), \ .attributeCount = 6, \ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ .functions = chipFuncArrayIasZoneServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 177 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 179 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 183 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 185 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ .clusterId = 0x00000503, \ - .attributes = ZAP_ATTRIBUTE_INDEX(498), \ + .attributes = ZAP_ATTRIBUTE_INDEX(496), \ .attributeCount = 2, \ .clusterSize = 35, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3580,106 +3510,106 @@ { \ /* Endpoint: 1, Cluster: Channel (server) */ \ .clusterId = 0x00000504, \ - .attributes = ZAP_ATTRIBUTE_INDEX(500), \ + .attributes = ZAP_ATTRIBUTE_INDEX(498), \ .attributeCount = 2, \ .clusterSize = 256, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 182 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 188 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ .clusterId = 0x00000505, \ - .attributes = ZAP_ATTRIBUTE_INDEX(502), \ + .attributes = ZAP_ATTRIBUTE_INDEX(500), \ .attributeCount = 3, \ .clusterSize = 257, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 185 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 191 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ .clusterId = 0x00000506, \ - .attributes = ZAP_ATTRIBUTE_INDEX(505), \ + .attributes = ZAP_ATTRIBUTE_INDEX(503), \ .attributeCount = 7, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 187 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 193 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Media Input (server) */ \ .clusterId = 0x00000507, \ - .attributes = ZAP_ATTRIBUTE_INDEX(512), \ + .attributes = ZAP_ATTRIBUTE_INDEX(510), \ .attributeCount = 3, \ .clusterSize = 257, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 198 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 197 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Low Power (server) */ \ .clusterId = 0x00000508, \ - .attributes = ZAP_ATTRIBUTE_INDEX(515), \ + .attributes = ZAP_ATTRIBUTE_INDEX(513), \ .attributeCount = 1, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 203 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 202 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Keypad Input (server) */ \ .clusterId = 0x00000509, \ - .attributes = ZAP_ATTRIBUTE_INDEX(516), \ + .attributes = ZAP_ATTRIBUTE_INDEX(514), \ .attributeCount = 1, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 205 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 204 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ .clusterId = 0x0000050A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(517), \ + .attributes = ZAP_ATTRIBUTE_INDEX(515), \ .attributeCount = 3, \ .clusterSize = 260, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 207 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 206 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ .clusterId = 0x0000050B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(520), \ + .attributes = ZAP_ATTRIBUTE_INDEX(518), \ .attributeCount = 3, \ .clusterSize = 257, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 210 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 209 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ .clusterId = 0x0000050C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(523), \ + .attributes = ZAP_ATTRIBUTE_INDEX(521), \ .attributeCount = 2, \ .clusterSize = 256, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 213 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 212 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ .clusterId = 0x0000050D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(525), \ + .attributes = ZAP_ATTRIBUTE_INDEX(523), \ .attributeCount = 8, \ .clusterSize = 138, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3690,29 +3620,29 @@ { \ /* Endpoint: 1, Cluster: Account Login (server) */ \ .clusterId = 0x0000050E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(533), \ + .attributes = ZAP_ATTRIBUTE_INDEX(531), \ .attributeCount = 1, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 215 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 214 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Test Cluster (server) */ \ .clusterId = 0x0000050F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(534), \ + .attributes = ZAP_ATTRIBUTE_INDEX(532), \ .attributeCount = 81, \ .clusterSize = 3285, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 217 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 236 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 216 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 235 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ .clusterId = 0x00000B04, \ - .attributes = ZAP_ATTRIBUTE_INDEX(615), \ + .attributes = ZAP_ATTRIBUTE_INDEX(613), \ .attributeCount = 12, \ .clusterSize = 28, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3723,29 +3653,29 @@ { \ /* Endpoint: 2, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(627), \ + .attributes = ZAP_ATTRIBUTE_INDEX(625), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 245 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 252 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 244 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 251 ) ,\ },\ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(629), \ + .attributes = ZAP_ATTRIBUTE_INDEX(627), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 257 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 256 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(636), \ + .attributes = ZAP_ATTRIBUTE_INDEX(634), \ .attributeCount = 5, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3756,7 +3686,7 @@ { \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(641), \ + .attributes = ZAP_ATTRIBUTE_INDEX(639), \ .attributeCount = 4, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -3775,7 +3705,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 26, 1118 }, { ZAP_CLUSTER_INDEX(26), 46, 7130 }, { ZAP_CLUSTER_INDEX(72), 4, 21 }, \ + { ZAP_CLUSTER_INDEX(0), 26, 864 }, { ZAP_CLUSTER_INDEX(26), 46, 6876 }, { ZAP_CLUSTER_INDEX(72), 4, 21 }, \ } // Largest attribute size is needed for various buffers @@ -3787,7 +3717,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (718) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (8269) +#define ATTRIBUTE_MAX_SIZE (7761) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/app-common/app-common/zap-generated/af-structs.h b/zzz_generated/app-common/app-common/zap-generated/af-structs.h index dc375d282e5fc4..746086c2a011c8 100644 --- a/zzz_generated/app-common/app-common/zap-generated/af-structs.h +++ b/zzz_generated/app-common/app-common/zap-generated/af-structs.h @@ -143,7 +143,7 @@ typedef struct _Application typedef struct _ApplicationEP { Application application; - chip::CharSpan endpoint; + chip::EndpointId endpoint; } ApplicationEP; // Struct for Target @@ -202,15 +202,6 @@ typedef struct _BatFaultChangeType /* TYPE WARNING: array array defaults to */ uint8_t * previous; } BatFaultChangeType; -// Struct for BindingEntry -typedef struct _BindingEntry -{ - chip::NodeId nodeId; - chip::GroupId groupId; - chip::EndpointId endpointId; - chip::ClusterId clusterId; -} BindingEntry; - // Struct for ChannelInfo typedef struct _ChannelInfo { diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index 58799ddb656b52..75fc255f267f19 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -252,7 +252,6 @@ // Client attributes // Server attributes -#define ZCL_BINDING_LIST_ATTRIBUTE_ID (0x0000) // Attribute ids for cluster: Access Control diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index da01c015267786..9afcffe774ca6d 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -30024,24 +30024,27 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback: namespace StartTime { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -30051,28 +30054,50 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace StartTime namespace Duration { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -30082,6 +30107,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace Duration namespace PlaybackSpeed { @@ -30117,24 +30161,27 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) namespace SeekRangeEnd { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -30144,28 +30191,50 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace SeekRangeEnd namespace SeekRangeStart { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -30175,6 +30244,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace SeekRangeStart namespace FeatureMap { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index cca17bb395316a..8b5521b96a7380 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -5276,13 +5276,17 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback: } // namespace PlaybackState namespace StartTime { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value); // epoch_us +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_us EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace StartTime namespace Duration { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value); // int64u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int64u EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace Duration namespace PlaybackSpeed { @@ -5291,13 +5295,17 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value); } // namespace PlaybackSpeed namespace SeekRangeEnd { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value); // int64u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int64u EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace SeekRangeEnd namespace SeekRangeStart { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value); // int64u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int64u EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace SeekRangeStart namespace FeatureMap { diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 54c8cb0f00fbbe..00c6799c9b5ab7 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -13734,6 +13734,16 @@ bool emberAfApplianceControlClusterOverloadPauseCallback( bool emberAfApplianceControlClusterOverloadWarningCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::ApplianceControl::Commands::OverloadWarning::DecodableType & commandData); +/** + * @brief Binding Cluster Bind Command callback (from client) + */ +bool emberAfBindingClusterBindCallback(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Binding::Commands::Bind::DecodableType & commandData); +/** + * @brief Binding Cluster Unbind Command callback (from client) + */ +bool emberAfBindingClusterUnbindCallback(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Binding::Commands::Unbind::DecodableType & commandData); /** * @brief Poll Control Cluster CheckIn Command callback (from server) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 2edf33b1d53c4d..6c2742ceb7d3c9 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -4437,8 +4437,9 @@ namespace Events { } // namespace Descriptor namespace Binding { -namespace Structs { -namespace BindingEntry { + +namespace Commands { +namespace Bind { CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; @@ -4456,8 +4457,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVType outer; VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - err = reader.EnterContainer(outer); - ReturnErrorOnFailure(err); + ReturnErrorOnFailure(reader.EnterContainer(outer)); while ((err = reader.Next()) == CHIP_NO_ERROR) { VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); @@ -4482,14 +4482,55 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) VerifyOrReturnError(err == CHIP_END_OF_TLV, err); ReturnErrorOnFailure(reader.ExitContainer(outer)); - + return CHIP_NO_ERROR; +} +} // namespace Bind. +namespace Unbind { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNodeId)), nodeId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEndpointId)), endpointId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClusterId)), clusterId)); + ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } -} // namespace BindingEntry -} // namespace Structs +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kNodeId): + ReturnErrorOnFailure(DataModel::Decode(reader, nodeId)); + break; + case to_underlying(Fields::kGroupId): + ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + break; + case to_underlying(Fields::kEndpointId): + ReturnErrorOnFailure(DataModel::Decode(reader, endpointId)); + break; + case to_underlying(Fields::kClusterId): + ReturnErrorOnFailure(DataModel::Decode(reader, clusterId)); + break; + default: + break; + } + } -namespace Commands { + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace Unbind. } // namespace Commands namespace Attributes { @@ -4497,9 +4538,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::BindingList::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, bindingList)); - break; case Attributes::ServerGeneratedCommandList::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, serverGeneratedCommandList)); break; @@ -21624,9 +21662,9 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSearch)), search)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAutoPlay)), autoPlay)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kData)), data)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSearch)), search)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -21642,15 +21680,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); switch (TLV::TagNumFromTag(reader.GetTag())) { + case to_underlying(Fields::kSearch): + ReturnErrorOnFailure(DataModel::Decode(reader, search)); + break; case to_underlying(Fields::kAutoPlay): ReturnErrorOnFailure(DataModel::Decode(reader, autoPlay)); break; case to_underlying(Fields::kData): ReturnErrorOnFailure(DataModel::Decode(reader, data)); break; - case to_underlying(Fields::kSearch): - ReturnErrorOnFailure(DataModel::Decode(reader, search)); - break; default: break; } diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 8f5a26b898b726..cf7947920d7c18 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -6650,8 +6650,23 @@ struct TypeInfo } // namespace Descriptor namespace Binding { -namespace Structs { -namespace BindingEntry { +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace Bind { +struct Type; +struct DecodableType; +} // namespace Bind + +namespace Unbind { +struct Type; +struct DecodableType; +} // namespace Unbind + +} // namespace Commands + +namespace Commands { +namespace Bind { enum class Fields { kNodeId = 0, @@ -6663,37 +6678,80 @@ enum class Fields struct Type { public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Bind::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } + chip::NodeId nodeId = static_cast(0); chip::GroupId groupId = static_cast(0); chip::EndpointId endpointId = static_cast(0); chip::ClusterId clusterId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; - CHIP_ERROR Decode(TLV::TLVReader & reader); - static constexpr bool kIsFabricScoped = false; -}; + using ResponseType = DataModel::NullObjectType; -using DecodableType = Type; + static constexpr bool MustUseTimedInvoke() { return false; } +}; -} // namespace BindingEntry -} // namespace Structs +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::Bind::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } -namespace Attributes { + chip::NodeId nodeId = static_cast(0); + chip::GroupId groupId = static_cast(0); + chip::EndpointId endpointId = static_cast(0); + chip::ClusterId clusterId = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace Bind +namespace Unbind { +enum class Fields +{ + kNodeId = 0, + kGroupId = 1, + kEndpointId = 2, + kClusterId = 3, +}; -namespace BindingList { -struct TypeInfo +struct Type { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Unbind::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } + + chip::NodeId nodeId = static_cast(0); + chip::GroupId groupId = static_cast(0); + chip::EndpointId endpointId = static_cast(0); + chip::ClusterId clusterId = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::Unbind::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BindingList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + + chip::NodeId nodeId = static_cast(0); + chip::GroupId groupId = static_cast(0); + chip::EndpointId endpointId = static_cast(0); + chip::ClusterId clusterId = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace BindingList +}; // namespace Unbind +} // namespace Commands + +namespace Attributes { + namespace ServerGeneratedCommandList { struct TypeInfo { @@ -6763,7 +6821,6 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::BindingList::TypeInfo::DecodableType bindingList; Attributes::ServerGeneratedCommandList::TypeInfo::DecodableType serverGeneratedCommandList; Attributes::ClientGeneratedCommandList::TypeInfo::DecodableType clientGeneratedCommandList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; @@ -33348,9 +33405,9 @@ struct Type public: uint16_t majorNumber = static_cast(0); uint16_t minorNumber = static_cast(0); - chip::CharSpan name; - chip::CharSpan callSign; - chip::CharSpan affiliateCallSign; + Optional name; + Optional callSign; + Optional affiliateCallSign; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -33374,8 +33431,8 @@ struct Type { public: chip::CharSpan operatorName; - chip::CharSpan lineupName; - chip::CharSpan postalCode; + Optional lineupName; + Optional postalCode; LineupInfoTypeEnum lineupInfoType = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -33569,9 +33626,10 @@ struct TypeInfo namespace ChannelLineup { struct TypeInfo { - using Type = chip::app::Clusters::Channel::Structs::LineupInfo::Type; - using DecodableType = chip::app::Clusters::Channel::Structs::LineupInfo::DecodableType; - using DecodableArgType = const chip::app::Clusters::Channel::Structs::LineupInfo::DecodableType &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = + const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ChannelLineup::Id; } @@ -33581,9 +33639,10 @@ struct TypeInfo namespace CurrentChannel { struct TypeInfo { - using Type = chip::app::Clusters::Channel::Structs::ChannelInfo::Type; - using DecodableType = chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType; - using DecodableArgType = const chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = + const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentChannel::Id; } @@ -33736,7 +33795,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } uint8_t target = static_cast(0); - chip::CharSpan data; + Optional data; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -33752,7 +33811,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } uint8_t target = static_cast(0); - chip::CharSpan data; + Optional data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace NavigateTargetRequest @@ -33771,7 +33830,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } StatusEnum status = static_cast(0); - chip::CharSpan data; + Optional data; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -33787,7 +33846,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } StatusEnum status = static_cast(0); - chip::CharSpan data; + Optional data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace NavigateTargetResponse @@ -33933,7 +33992,7 @@ struct Type { public: uint64_t updatedAt = static_cast(0); - uint64_t position = static_cast(0); + DataModel::Nullable position; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -34383,9 +34442,9 @@ struct TypeInfo namespace StartTime { struct TypeInfo { - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::StartTime::Id; } @@ -34395,9 +34454,9 @@ struct TypeInfo namespace Duration { struct TypeInfo { - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Duration::Id; } @@ -34431,9 +34490,9 @@ struct TypeInfo namespace SeekRangeEnd { struct TypeInfo { - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SeekRangeEnd::Id; } @@ -34443,9 +34502,9 @@ struct TypeInfo namespace SeekRangeStart { struct TypeInfo { - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SeekRangeStart::Id; } @@ -34523,12 +34582,12 @@ struct TypeInfo Attributes::PlaybackState::TypeInfo::DecodableType playbackState = static_cast(0); - Attributes::StartTime::TypeInfo::DecodableType startTime = static_cast(0); - Attributes::Duration::TypeInfo::DecodableType duration = static_cast(0); + Attributes::StartTime::TypeInfo::DecodableType startTime; + Attributes::Duration::TypeInfo::DecodableType duration; Attributes::Position::TypeInfo::DecodableType position; - Attributes::PlaybackSpeed::TypeInfo::DecodableType playbackSpeed = static_cast(0); - Attributes::SeekRangeEnd::TypeInfo::DecodableType seekRangeEnd = static_cast(0); - Attributes::SeekRangeStart::TypeInfo::DecodableType seekRangeStart = static_cast(0); + Attributes::PlaybackSpeed::TypeInfo::DecodableType playbackSpeed = static_cast(0); + Attributes::SeekRangeEnd::TypeInfo::DecodableType seekRangeEnd; + Attributes::SeekRangeStart::TypeInfo::DecodableType seekRangeStart; Attributes::ServerGeneratedCommandList::TypeInfo::DecodableType serverGeneratedCommandList; Attributes::ClientGeneratedCommandList::TypeInfo::DecodableType clientGeneratedCommandList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; @@ -35347,7 +35406,7 @@ struct Type public: ParameterEnum type = static_cast(0); chip::CharSpan value; - DataModel::List externalIDList; + Optional> externalIDList; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -35359,7 +35418,7 @@ struct DecodableType public: ParameterEnum type = static_cast(0); chip::CharSpan value; - DataModel::DecodableList externalIDList; + Optional> externalIDList; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -35405,9 +35464,9 @@ enum class Fields struct Type { public: - chip::CharSpan imageUrl; - chip::CharSpan color; - Structs::Dimension::Type size; + Optional imageUrl; + Optional color; + Optional size; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -35433,11 +35492,11 @@ struct Type { public: chip::CharSpan providerName; - Structs::StyleInformation::Type background; - Structs::StyleInformation::Type logo; - Structs::StyleInformation::Type progressBar; - Structs::StyleInformation::Type splash; - Structs::StyleInformation::Type waterMark; + Optional background; + Optional logo; + Optional progressBar; + Optional splash; + Optional waterMark; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -35474,9 +35533,9 @@ namespace Commands { namespace LaunchContentRequest { enum class Fields { - kAutoPlay = 0, - kData = 1, - kSearch = 2, + kSearch = 0, + kAutoPlay = 1, + kData = 2, }; struct Type @@ -35486,9 +35545,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::LaunchContentRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } - bool autoPlay = static_cast(0); - chip::CharSpan data; DataModel::List search; + bool autoPlay = static_cast(0); + Optional data; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -35503,9 +35562,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::LaunchContentRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } - bool autoPlay = static_cast(0); - chip::CharSpan data; DataModel::DecodableList search; + bool autoPlay = static_cast(0); + Optional data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace LaunchContentRequest @@ -35525,8 +35584,8 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } chip::CharSpan contentURL; - chip::CharSpan displayString; - Structs::BrandingInformation::Type brandingInformation; + Optional displayString; + Optional brandingInformation; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -35542,8 +35601,8 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } chip::CharSpan contentURL; - chip::CharSpan displayString; - Structs::BrandingInformation::DecodableType brandingInformation; + Optional displayString; + Optional brandingInformation; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace LaunchURLRequest @@ -35562,7 +35621,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } StatusEnum status = static_cast(0); - chip::CharSpan data; + Optional data; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -35578,7 +35637,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } StatusEnum status = static_cast(0); - chip::CharSpan data; + Optional data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace LaunchResponse @@ -35983,7 +36042,7 @@ struct Type { public: Structs::Application::Type application; - chip::CharSpan endpoint; + Optional endpoint; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -36037,7 +36096,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } Structs::Application::Type application; - chip::ByteSpan data; + Optional data; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -36053,7 +36112,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } Structs::Application::DecodableType application; - chip::ByteSpan data; + Optional data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace LaunchAppRequest @@ -36175,9 +36234,11 @@ struct TypeInfo namespace ApplicationLauncherApp { struct TypeInfo { - using Type = chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEP::Type; - using DecodableType = chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEP::DecodableType; - using DecodableArgType = const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEP::DecodableType &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = + chip::app::DataModel::Nullable; + using DecodableArgType = + const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ApplicationLauncherApp::Id; } diff --git a/zzz_generated/app-common/app-common/zap-generated/command-id.h b/zzz_generated/app-common/app-common/zap-generated/command-id.h index 9af383a1136477..96f0cd8fe5955e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/command-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/command-id.h @@ -130,6 +130,10 @@ #define ZCL_OVERLOAD_PAUSE_COMMAND_ID (0x04) #define ZCL_OVERLOAD_WARNING_COMMAND_ID (0x05) +// Commands for cluster: Binding +#define ZCL_BIND_COMMAND_ID (0x00) +#define ZCL_UNBIND_COMMAND_ID (0x01) + // Commands for cluster: Poll Control #define ZCL_CHECK_IN_COMMAND_ID (0x00) #define ZCL_CHECK_IN_RESPONSE_COMMAND_ID (0x00) diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index b531cb4f74f2d7..255f8256af8f78 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -956,10 +956,6 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace Binding { namespace Attributes { -namespace BindingList { -static constexpr AttributeId Id = 0x00000000; -} // namespace BindingList - namespace ServerGeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::ServerGeneratedCommandList::Id; } // namespace ServerGeneratedCommandList diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 214494bc379098..ff43c5a7551193 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -403,6 +403,20 @@ static constexpr CommandId Id = 0x00000005; } // namespace Commands } // namespace ApplianceControl +namespace Binding { +namespace Commands { + +namespace Bind { +static constexpr CommandId Id = 0x00000000; +} // namespace Bind + +namespace Unbind { +static constexpr CommandId Id = 0x00000001; +} // namespace Unbind + +} // namespace Commands +} // namespace Binding + namespace PollControl { namespace Commands { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 4cc276bdac2a1c..62d2a8a4c05a1c 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -482,8 +482,9 @@ class WriteApplicationLauncherApplicationLauncherApp : public WriteAttribute } private: - chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEP::Type mValue; - TypedComplexArgument mComplex; + chip::app::DataModel::Nullable mValue; + TypedComplexArgument> + mComplex; }; /*----------------------------------------------------------------------------*\ @@ -786,9 +787,10 @@ class WriteBinaryInputBasicPresentValue : public WriteAttribute | Cluster Binding | 0x001E | |------------------------------------------------------------------------------| | Commands: | | +| * Bind | 0x00 | +| * Unbind | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * BindingList | 0x0000 | | * ServerGeneratedCommandList | 0xFFF8 | | * ClientGeneratedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -797,27 +799,56 @@ class WriteBinaryInputBasicPresentValue : public WriteAttribute | Events: | | \*----------------------------------------------------------------------------*/ -class WriteBindingBindingList : public WriteAttribute +/* + * Command Bind + */ +class BindingBind : public ClusterCommand { public: - WriteBindingBindingList(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BindingList", credsIssuerConfig), mComplex(&mValue) + BindingBind(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("bind", credsIssuerConfig) { - AddArgument("attr-name", "binding-list"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); + AddArgument("NodeId", 0, UINT64_MAX, &mRequest.nodeId); + AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("EndpointId", 0, UINT16_MAX, &mRequest.endpointId); + AddArgument("ClusterId", 0, UINT32_MAX, &mRequest.clusterId); + ClusterCommand::AddArguments(); } - ~WriteBindingBindingList() {} + CHIP_ERROR SendCommand(ChipDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001E) command (0x00000000) on endpoint %" PRIu16, endpointId); + + return ClusterCommand::SendCommand(device, endpointId, 0x0000001E, 0x00000000, mRequest); + } + +private: + chip::app::Clusters::Binding::Commands::Bind::Type mRequest; +}; + +/* + * Command Unbind + */ +class BindingUnbind : public ClusterCommand +{ +public: + BindingUnbind(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("unbind", credsIssuerConfig) + { + AddArgument("NodeId", 0, UINT64_MAX, &mRequest.nodeId); + AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("EndpointId", 0, UINT16_MAX, &mRequest.endpointId); + AddArgument("ClusterId", 0, UINT32_MAX, &mRequest.clusterId); + ClusterCommand::AddArguments(); + } CHIP_ERROR SendCommand(ChipDevice * device, chip::EndpointId endpointId) override { - return WriteAttribute::SendCommand(device, endpointId, 0x0000001E, 0x00000000, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001E) command (0x00000001) on endpoint %" PRIu16, endpointId); + + return ClusterCommand::SendCommand(device, endpointId, 0x0000001E, 0x00000001, mRequest); } private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; + chip::app::Clusters::Binding::Commands::Unbind::Type mRequest; }; /*----------------------------------------------------------------------------*\ @@ -1311,52 +1342,6 @@ class ChannelSkipChannelRequest : public ClusterCommand chip::app::Clusters::Channel::Commands::SkipChannelRequest::Type mRequest; }; -class WriteChannelChannelLineup : public WriteAttribute -{ -public: - WriteChannelChannelLineup(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ChannelLineup", credsIssuerConfig), mComplex(&mValue) - { - AddArgument("attr-name", "channel-lineup"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); - } - - ~WriteChannelChannelLineup() {} - - CHIP_ERROR SendCommand(ChipDevice * device, chip::EndpointId endpointId) override - { - return WriteAttribute::SendCommand(device, endpointId, 0x00000504, 0x00000001, mValue); - } - -private: - chip::app::Clusters::Channel::Structs::LineupInfo::Type mValue; - TypedComplexArgument mComplex; -}; - -class WriteChannelCurrentChannel : public WriteAttribute -{ -public: - WriteChannelCurrentChannel(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("CurrentChannel", credsIssuerConfig), mComplex(&mValue) - { - AddArgument("attr-name", "current-channel"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); - } - - ~WriteChannelCurrentChannel() {} - - CHIP_ERROR SendCommand(ChipDevice * device, chip::EndpointId endpointId) override - { - return WriteAttribute::SendCommand(device, endpointId, 0x00000504, 0x00000002, mValue); - } - -private: - chip::app::Clusters::Channel::Structs::ChannelInfo::Type mValue; - TypedComplexArgument mComplex; -}; - /*----------------------------------------------------------------------------*\ | Cluster ColorControl | 0x0300 | |------------------------------------------------------------------------------| @@ -2265,9 +2250,9 @@ class ContentLauncherLaunchContentRequest : public ClusterCommand ContentLauncherLaunchContentRequest(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("launch-content-request", credsIssuerConfig), mComplex_Search(&mRequest.search) { + AddArgument("Search", &mComplex_Search); AddArgument("AutoPlay", 0, 1, &mRequest.autoPlay); AddArgument("Data", &mRequest.data); - AddArgument("Search", &mComplex_Search); ClusterCommand::AddArguments(); } @@ -2308,7 +2293,8 @@ class ContentLauncherLaunchURLRequest : public ClusterCommand private: chip::app::Clusters::ContentLauncher::Commands::LaunchURLRequest::Type mRequest; - TypedComplexArgument mComplex_BrandingInformation; + TypedComplexArgument> + mComplex_BrandingInformation; }; class WriteContentLauncherSupportedStreamingProtocols : public WriteAttribute @@ -4563,29 +4549,6 @@ class MediaPlaybackStopRequest : public ClusterCommand chip::app::Clusters::MediaPlayback::Commands::StopRequest::Type mRequest; }; -class WriteMediaPlaybackPosition : public WriteAttribute -{ -public: - WriteMediaPlaybackPosition(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Position", credsIssuerConfig), mComplex(&mValue) - { - AddArgument("attr-name", "position"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); - } - - ~WriteMediaPlaybackPosition() {} - - CHIP_ERROR SendCommand(ChipDevice * device, chip::EndpointId endpointId) override - { - return WriteAttribute::SendCommand(device, endpointId, 0x00000506, 0x00000003, mValue); - } - -private: - chip::app::Clusters::MediaPlayback::Structs::PlaybackPosition::Type mValue; - TypedComplexArgument mComplex; -}; - /*----------------------------------------------------------------------------*\ | Cluster ModeSelect | 0x0050 | |------------------------------------------------------------------------------| @@ -9809,11 +9772,12 @@ void registerClusterBinding(Commands & commands, CredentialIssuerCommands * cred // Commands // make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "binding-list", Attributes::BindingList::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // make_unique(Id, "server-generated-command-list", Attributes::ServerGeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "client-generated-command-list", Attributes::ClientGeneratedCommandList::Id, @@ -9821,9 +9785,7 @@ void registerClusterBinding(Commands & commands, CredentialIssuerCommands * cred make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "binding-list", Attributes::BindingList::Id, credsIssuerConfig), // make_unique(Id, "server-generated-command-list", Attributes::ServerGeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "client-generated-command-list", Attributes::ClientGeneratedCommandList::Id, @@ -10044,8 +10006,6 @@ void registerClusterChannel(Commands & commands, CredentialIssuerCommands * cred make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "channel-list", Attributes::ChannelList::Id, credsIssuerConfig), // make_unique(Id, "channel-lineup", Attributes::ChannelLineup::Id, credsIssuerConfig), // @@ -11300,7 +11260,6 @@ void registerClusterMediaPlayback(Commands & commands, CredentialIssuerCommands make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "playback-state", Attributes::PlaybackState::Id, credsIssuerConfig), // make_unique(Id, "start-time", Attributes::StartTime::Id, credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index c0de99ba55fa85..6c7c1e378d419c 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -25,11 +25,16 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AccessControlEntry.fabricIndex", value.isMember("fabricIndex"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AccessControlEntry.privilege", value.isMember("privilege"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AccessControlEntry.authMode", value.isMember("authMode"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AccessControlEntry.subjects", value.isMember("subjects"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AccessControlEntry.targets", value.isMember("targets"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("AccessControlEntry.fabricIndex", "fabricIndex", value.isMember("fabricIndex"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("AccessControlEntry.privilege", "privilege", value.isMember("privilege"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("AccessControlEntry.authMode", "authMode", value.isMember("authMode"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("AccessControlEntry.subjects", "subjects", value.isMember("subjects"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("AccessControlEntry.targets", "targets", value.isMember("targets"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricIndex"); @@ -64,13 +69,14 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ActionStruct.actionID", value.isMember("actionID"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ActionStruct.name", value.isMember("name"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ActionStruct.type", value.isMember("type"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ActionStruct.endpointListID", value.isMember("endpointListID"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("ActionStruct.supportedCommands", value.isMember("supportedCommands"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ActionStruct.status", value.isMember("status"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ActionStruct.actionID", "actionID", value.isMember("actionID"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ActionStruct.name", "name", value.isMember("name"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ActionStruct.type", "type", value.isMember("type"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ActionStruct.endpointListID", "endpointListID", + value.isMember("endpointListID"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ActionStruct.supportedCommands", "supportedCommands", + value.isMember("supportedCommands"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ActionStruct.status", "status", value.isMember("status"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "actionID"); @@ -109,8 +115,8 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AdditionalInfo.name", value.isMember("name"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AdditionalInfo.value", value.isMember("value"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AdditionalInfo.name", "name", value.isMember("name"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AdditionalInfo.value", "value", value.isMember("value"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "name"); @@ -133,9 +139,10 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Application.catalogVendorId", "catalogVendorId", + value.isMember("catalogVendorId"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("Application.catalogVendorId", value.isMember("catalogVendorId"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Application.applicationId", value.isMember("applicationId"))); + ComplexArgumentParser::EnsureMemberExist("Application.applicationId", "applicationId", value.isMember("applicationId"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "catalogVendorId"); @@ -158,10 +165,10 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("ApplicationBasicApplication.catalogVendorId", value.isMember("catalogVendorId"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("ApplicationBasicApplication.applicationId", value.isMember("applicationId"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ApplicationBasicApplication.catalogVendorId", "catalogVendorId", + value.isMember("catalogVendorId"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ApplicationBasicApplication.applicationId", "applicationId", + value.isMember("applicationId"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "catalogVendorId"); @@ -184,15 +191,18 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ApplicationEP.application", value.isMember("application"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ApplicationEP.endpoint", value.isMember("endpoint"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("ApplicationEP.application", "application", value.isMember("application"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "application"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.application, value["application"])); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "endpoint"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.endpoint, value["endpoint"])); + if (value.isMember("endpoint")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "endpoint"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.endpoint, value["endpoint"])); + } return CHIP_NO_ERROR; } @@ -209,6 +219,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BasicCommissioningInfo.failSafeExpiryLengthSeconds", + "failSafeExpiryLengthSeconds", value.isMember("failSafeExpiryLengthSeconds"))); char labelWithMember[kMaxLabelLength]; @@ -229,8 +240,10 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BatChargeFaultChangeType.current", value.isMember("current"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BatChargeFaultChangeType.previous", value.isMember("previous"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("BatChargeFaultChangeType.current", "current", value.isMember("current"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("BatChargeFaultChangeType.previous", "previous", value.isMember("previous"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "current"); @@ -253,8 +266,10 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BatFaultChangeType.current", value.isMember("current"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BatFaultChangeType.previous", value.isMember("previous"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("BatFaultChangeType.current", "current", value.isMember("current"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("BatFaultChangeType.previous", "previous", value.isMember("previous"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "current"); @@ -271,72 +286,48 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::PowerSource::Structs:: ComplexArgumentParser::Finalize(request.current); ComplexArgumentParser::Finalize(request.previous); } -CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Binding::Structs::BindingEntry::Type & request, - Json::Value & value) -{ - VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BindingEntry.nodeId", value.isMember("nodeId"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BindingEntry.groupId", value.isMember("groupId"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BindingEntry.endpointId", value.isMember("endpointId"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BindingEntry.clusterId", value.isMember("clusterId"))); - - char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "nodeId"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.nodeId, value["nodeId"])); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "groupId"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.groupId, value["groupId"])); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "endpointId"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.endpointId, value["endpointId"])); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "clusterId"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.clusterId, value["clusterId"])); - - return CHIP_NO_ERROR; -} - -void ComplexArgumentParser::Finalize(chip::app::Clusters::Binding::Structs::BindingEntry::Type & request) -{ - ComplexArgumentParser::Finalize(request.nodeId); - ComplexArgumentParser::Finalize(request.groupId); - ComplexArgumentParser::Finalize(request.endpointId); - ComplexArgumentParser::Finalize(request.clusterId); -} CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::ContentLauncher::Structs::BrandingInformation::Type & request, Json::Value & value) { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("BrandingInformation.providerName", value.isMember("providerName"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BrandingInformation.background", value.isMember("background"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BrandingInformation.logo", value.isMember("logo"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("BrandingInformation.progressBar", value.isMember("progressBar"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BrandingInformation.splash", value.isMember("splash"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BrandingInformation.waterMark", value.isMember("waterMark"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BrandingInformation.providerName", "providerName", + value.isMember("providerName"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "providerName"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.providerName, value["providerName"])); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "background"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.background, value["background"])); + if (value.isMember("background")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "background"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.background, value["background"])); + } - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "logo"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.logo, value["logo"])); + if (value.isMember("logo")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "logo"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.logo, value["logo"])); + } - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "progressBar"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.progressBar, value["progressBar"])); + if (value.isMember("progressBar")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "progressBar"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.progressBar, value["progressBar"])); + } - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "splash"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.splash, value["splash"])); + if (value.isMember("splash")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "splash"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.splash, value["splash"])); + } - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "waterMark"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.waterMark, value["waterMark"])); + if (value.isMember("waterMark")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "waterMark"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.waterMark, value["waterMark"])); + } return CHIP_NO_ERROR; } @@ -355,12 +346,10 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters: { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ChannelInfo.majorNumber", value.isMember("majorNumber"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ChannelInfo.minorNumber", value.isMember("minorNumber"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ChannelInfo.name", value.isMember("name"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ChannelInfo.callSign", value.isMember("callSign"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("ChannelInfo.affiliateCallSign", value.isMember("affiliateCallSign"))); + ComplexArgumentParser::EnsureMemberExist("ChannelInfo.majorNumber", "majorNumber", value.isMember("majorNumber"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("ChannelInfo.minorNumber", "minorNumber", value.isMember("minorNumber"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "majorNumber"); @@ -369,14 +358,23 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters: snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "minorNumber"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.minorNumber, value["minorNumber"])); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "name"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.name, value["name"])); + if (value.isMember("name")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "name"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.name, value["name"])); + } - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "callSign"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.callSign, value["callSign"])); + if (value.isMember("callSign")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "callSign"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.callSign, value["callSign"])); + } - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "affiliateCallSign"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.affiliateCallSign, value["affiliateCallSign"])); + if (value.isMember("affiliateCallSign")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "affiliateCallSign"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.affiliateCallSign, value["affiliateCallSign"])); + } return CHIP_NO_ERROR; } @@ -395,7 +393,8 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ContentSearch.parameterList", value.isMember("parameterList"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("ContentSearch.parameterList", "parameterList", value.isMember("parameterList"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "parameterList"); @@ -413,8 +412,8 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters: { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("DeviceType.type", value.isMember("type"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("DeviceType.revision", value.isMember("revision"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("DeviceType.type", "type", value.isMember("type"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("DeviceType.revision", "revision", value.isMember("revision"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "type"); @@ -437,9 +436,9 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Dimension.width", value.isMember("width"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Dimension.height", value.isMember("height"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Dimension.metric", value.isMember("metric"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Dimension.width", "width", value.isMember("width"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Dimension.height", "height", value.isMember("height"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Dimension.metric", "metric", value.isMember("metric"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "width"); @@ -465,9 +464,10 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters: { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("DlCredential.credentialType", value.isMember("credentialType"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("DlCredential.credentialIndex", value.isMember("credentialIndex"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("DlCredential.credentialType", "credentialType", + value.isMember("credentialType"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("DlCredential.credentialIndex", "credentialIndex", + value.isMember("credentialIndex"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "credentialType"); @@ -490,7 +490,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("DoubleNestedStructList.a", value.isMember("a"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("DoubleNestedStructList.a", "a", value.isMember("a"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "a"); @@ -509,11 +509,12 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("EndpointListStruct.endpointListID", "endpointListID", + value.isMember("endpointListID"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("EndpointListStruct.name", "name", value.isMember("name"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("EndpointListStruct.type", "type", value.isMember("type"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("EndpointListStruct.endpointListID", value.isMember("endpointListID"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("EndpointListStruct.name", value.isMember("name"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("EndpointListStruct.type", value.isMember("type"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("EndpointListStruct.endpoints", value.isMember("endpoints"))); + ComplexArgumentParser::EnsureMemberExist("EndpointListStruct.endpoints", "endpoints", value.isMember("endpoints"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "endpointListID"); @@ -544,8 +545,9 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ExtensionEntry.fabricIndex", value.isMember("fabricIndex"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ExtensionEntry.data", value.isMember("data"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("ExtensionEntry.fabricIndex", "fabricIndex", value.isMember("fabricIndex"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ExtensionEntry.data", "data", value.isMember("data"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricIndex"); @@ -568,13 +570,16 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("FabricDescriptor.fabricIndex", value.isMember("fabricIndex"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("FabricDescriptor.rootPublicKey", value.isMember("rootPublicKey"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("FabricDescriptor.vendorId", value.isMember("vendorId"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("FabricDescriptor.fabricId", value.isMember("fabricId"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("FabricDescriptor.nodeId", value.isMember("nodeId"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("FabricDescriptor.label", value.isMember("label"))); + ComplexArgumentParser::EnsureMemberExist("FabricDescriptor.fabricIndex", "fabricIndex", value.isMember("fabricIndex"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("FabricDescriptor.rootPublicKey", "rootPublicKey", + value.isMember("rootPublicKey"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("FabricDescriptor.vendorId", "vendorId", value.isMember("vendorId"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("FabricDescriptor.fabricId", "fabricId", value.isMember("fabricId"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("FabricDescriptor.nodeId", "nodeId", value.isMember("nodeId"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("FabricDescriptor.label", "label", value.isMember("label"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricIndex"); @@ -613,9 +618,12 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("GroupInfoMapStruct.fabricIndex", value.isMember("fabricIndex"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("GroupInfoMapStruct.groupId", value.isMember("groupId"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("GroupInfoMapStruct.endpoints", value.isMember("endpoints"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("GroupInfoMapStruct.fabricIndex", "fabricIndex", value.isMember("fabricIndex"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("GroupInfoMapStruct.groupId", "groupId", value.isMember("groupId"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("GroupInfoMapStruct.endpoints", "endpoints", value.isMember("endpoints"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricIndex"); @@ -649,10 +657,12 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("GroupKeyMapStruct.fabricIndex", value.isMember("fabricIndex"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("GroupKeyMapStruct.groupId", value.isMember("groupId"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("GroupKeyMapStruct.groupKeySetID", value.isMember("groupKeySetID"))); + ComplexArgumentParser::EnsureMemberExist("GroupKeyMapStruct.fabricIndex", "fabricIndex", value.isMember("fabricIndex"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("GroupKeyMapStruct.groupId", "groupId", value.isMember("groupId"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("GroupKeyMapStruct.groupKeySetID", "groupKeySetID", + value.isMember("groupKeySetID"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricIndex"); @@ -679,19 +689,22 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("GroupKeySetStruct.groupKeySetID", "groupKeySetID", + value.isMember("groupKeySetID"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist( + "GroupKeySetStruct.groupKeySecurityPolicy", "groupKeySecurityPolicy", value.isMember("groupKeySecurityPolicy"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("GroupKeySetStruct.groupKeySetID", value.isMember("groupKeySetID"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("GroupKeySetStruct.groupKeySecurityPolicy", - value.isMember("groupKeySecurityPolicy"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("GroupKeySetStruct.epochKey0", value.isMember("epochKey0"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("GroupKeySetStruct.epochStartTime0", value.isMember("epochStartTime0"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("GroupKeySetStruct.epochKey1", value.isMember("epochKey1"))); + ComplexArgumentParser::EnsureMemberExist("GroupKeySetStruct.epochKey0", "epochKey0", value.isMember("epochKey0"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("GroupKeySetStruct.epochStartTime0", "epochStartTime0", + value.isMember("epochStartTime0"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("GroupKeySetStruct.epochStartTime1", value.isMember("epochStartTime1"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("GroupKeySetStruct.epochKey2", value.isMember("epochKey2"))); + ComplexArgumentParser::EnsureMemberExist("GroupKeySetStruct.epochKey1", "epochKey1", value.isMember("epochKey1"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("GroupKeySetStruct.epochStartTime1", "epochStartTime1", + value.isMember("epochStartTime1"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("GroupKeySetStruct.epochStartTime2", value.isMember("epochStartTime2"))); + ComplexArgumentParser::EnsureMemberExist("GroupKeySetStruct.epochKey2", "epochKey2", value.isMember("epochKey2"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("GroupKeySetStruct.epochStartTime2", "epochStartTime2", + value.isMember("epochStartTime2"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "groupKeySetID"); @@ -739,9 +752,10 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("IasAceZoneStatusResult.zoneId", value.isMember("zoneId"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("IasAceZoneStatusResult.zoneStatus", value.isMember("zoneStatus"))); + ComplexArgumentParser::EnsureMemberExist("IasAceZoneStatusResult.zoneId", "zoneId", value.isMember("zoneId"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("IasAceZoneStatusResult.zoneStatus", "zoneStatus", value.isMember("zoneStatus"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "zoneId"); @@ -763,10 +777,11 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters: { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("InputInfo.index", value.isMember("index"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("InputInfo.inputType", value.isMember("inputType"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("InputInfo.name", value.isMember("name"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("InputInfo.description", value.isMember("description"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("InputInfo.index", "index", value.isMember("index"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("InputInfo.inputType", "inputType", value.isMember("inputType"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("InputInfo.name", "name", value.isMember("name"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("InputInfo.description", "description", value.isMember("description"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "index"); @@ -796,8 +811,8 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters: { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("LabelStruct.label", value.isMember("label"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("LabelStruct.value", value.isMember("value"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("LabelStruct.label", "label", value.isMember("label"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("LabelStruct.value", "value", value.isMember("value"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "label"); @@ -819,20 +834,26 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters: { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("LineupInfo.operatorName", value.isMember("operatorName"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("LineupInfo.lineupName", value.isMember("lineupName"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("LineupInfo.postalCode", value.isMember("postalCode"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("LineupInfo.lineupInfoType", value.isMember("lineupInfoType"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("LineupInfo.operatorName", "operatorName", value.isMember("operatorName"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("LineupInfo.lineupInfoType", "lineupInfoType", value.isMember("lineupInfoType"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "operatorName"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.operatorName, value["operatorName"])); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "lineupName"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.lineupName, value["lineupName"])); + if (value.isMember("lineupName")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "lineupName"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.lineupName, value["lineupName"])); + } - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "postalCode"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.postalCode, value["postalCode"])); + if (value.isMember("postalCode")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "postalCode"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.postalCode, value["postalCode"])); + } snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "lineupInfoType"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.lineupInfoType, value["lineupInfoType"])); @@ -853,9 +874,10 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ModeOptionStruct.label", value.isMember("label"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ModeOptionStruct.mode", value.isMember("mode"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ModeOptionStruct.semanticTag", value.isMember("semanticTag"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ModeOptionStruct.label", "label", value.isMember("label"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ModeOptionStruct.mode", "mode", value.isMember("mode"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("ModeOptionStruct.semanticTag", "semanticTag", value.isMember("semanticTag"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "label"); @@ -882,9 +904,10 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NOCStruct.fabricIndex", value.isMember("fabricIndex"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NOCStruct.noc", value.isMember("noc"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NOCStruct.icac", value.isMember("icac"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("NOCStruct.fabricIndex", "fabricIndex", value.isMember("fabricIndex"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NOCStruct.noc", "noc", value.isMember("noc"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NOCStruct.icac", "icac", value.isMember("icac"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricIndex"); @@ -911,26 +934,30 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.extAddress", value.isMember("extAddress"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.age", value.isMember("age"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.rloc16", value.isMember("rloc16"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("NeighborTable.linkFrameCounter", value.isMember("linkFrameCounter"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("NeighborTable.mleFrameCounter", value.isMember("mleFrameCounter"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.lqi", value.isMember("lqi"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.averageRssi", value.isMember("averageRssi"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.lastRssi", value.isMember("lastRssi"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("NeighborTable.frameErrorRate", value.isMember("frameErrorRate"))); + ComplexArgumentParser::EnsureMemberExist("NeighborTable.extAddress", "extAddress", value.isMember("extAddress"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.age", "age", value.isMember("age"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.rloc16", "rloc16", value.isMember("rloc16"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.linkFrameCounter", "linkFrameCounter", + value.isMember("linkFrameCounter"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.mleFrameCounter", "mleFrameCounter", + value.isMember("mleFrameCounter"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.lqi", "lqi", value.isMember("lqi"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("NeighborTable.messageErrorRate", value.isMember("messageErrorRate"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.rxOnWhenIdle", value.isMember("rxOnWhenIdle"))); + ComplexArgumentParser::EnsureMemberExist("NeighborTable.averageRssi", "averageRssi", value.isMember("averageRssi"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("NeighborTable.fullThreadDevice", value.isMember("fullThreadDevice"))); + ComplexArgumentParser::EnsureMemberExist("NeighborTable.lastRssi", "lastRssi", value.isMember("lastRssi"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.frameErrorRate", "frameErrorRate", + value.isMember("frameErrorRate"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.messageErrorRate", "messageErrorRate", + value.isMember("messageErrorRate"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("NeighborTable.fullNetworkData", value.isMember("fullNetworkData"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.isChild", value.isMember("isChild"))); + ComplexArgumentParser::EnsureMemberExist("NeighborTable.rxOnWhenIdle", "rxOnWhenIdle", value.isMember("rxOnWhenIdle"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.fullThreadDevice", "fullThreadDevice", + value.isMember("fullThreadDevice"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.fullNetworkData", "fullNetworkData", + value.isMember("fullNetworkData"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NeighborTable.isChild", "isChild", value.isMember("isChild"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "extAddress"); @@ -1000,9 +1027,9 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters: { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStruct.a", value.isMember("a"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStruct.b", value.isMember("b"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStruct.c", value.isMember("c"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStruct.a", "a", value.isMember("a"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStruct.b", "b", value.isMember("b"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStruct.c", "c", value.isMember("c"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "a"); @@ -1029,13 +1056,13 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStructList.a", value.isMember("a"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStructList.b", value.isMember("b"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStructList.c", value.isMember("c"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStructList.d", value.isMember("d"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStructList.e", value.isMember("e"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStructList.f", value.isMember("f"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStructList.g", value.isMember("g"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStructList.a", "a", value.isMember("a"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStructList.b", "b", value.isMember("b"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStructList.c", "c", value.isMember("c"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStructList.d", "d", value.isMember("d"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStructList.e", "e", value.isMember("e"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStructList.f", "f", value.isMember("f"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NestedStructList.g", "g", value.isMember("g"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "a"); @@ -1078,8 +1105,10 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NetworkInfo.networkID", value.isMember("networkID"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NetworkInfo.connected", value.isMember("connected"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("NetworkInfo.networkID", "networkID", value.isMember("networkID"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("NetworkInfo.connected", "connected", value.isMember("connected"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "networkID"); @@ -1102,16 +1131,18 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NetworkInterfaceType.name", value.isMember("name"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("NetworkInterfaceType.fabricConnected", value.isMember("fabricConnected"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NetworkInterfaceType.name", "name", value.isMember("name"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NetworkInterfaceType.fabricConnected", "fabricConnected", + value.isMember("fabricConnected"))); ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NetworkInterfaceType.offPremiseServicesReachableIPv4", + "offPremiseServicesReachableIPv4", value.isMember("offPremiseServicesReachableIPv4"))); ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NetworkInterfaceType.offPremiseServicesReachableIPv6", + "offPremiseServicesReachableIPv6", value.isMember("offPremiseServicesReachableIPv6"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("NetworkInterfaceType.hardwareAddress", value.isMember("hardwareAddress"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NetworkInterfaceType.type", value.isMember("type"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NetworkInterfaceType.hardwareAddress", "hardwareAddress", + value.isMember("hardwareAddress"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NetworkInterfaceType.type", "type", value.isMember("type"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "name"); @@ -1152,14 +1183,14 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("NullablesAndOptionalsStruct.nullableInt", value.isMember("nullableInt"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("NullablesAndOptionalsStruct.nullableString", value.isMember("nullableString"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("NullablesAndOptionalsStruct.nullableStruct", value.isMember("nullableStruct"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("NullablesAndOptionalsStruct.nullableList", value.isMember("nullableList"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NullablesAndOptionalsStruct.nullableInt", "nullableInt", + value.isMember("nullableInt"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NullablesAndOptionalsStruct.nullableString", "nullableString", + value.isMember("nullableString"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NullablesAndOptionalsStruct.nullableStruct", "nullableStruct", + value.isMember("nullableStruct"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("NullablesAndOptionalsStruct.nullableList", "nullableList", + value.isMember("nullableList"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "nullableInt"); @@ -1251,30 +1282,31 @@ ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("OperationalDatasetComponents.activeTimestampPresent", - value.isMember("activeTimestampPresent"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist( + "OperationalDatasetComponents.activeTimestampPresent", "activeTimestampPresent", value.isMember("activeTimestampPresent"))); ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("OperationalDatasetComponents.pendingTimestampPresent", + "pendingTimestampPresent", value.isMember("pendingTimestampPresent"))); ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("OperationalDatasetComponents.masterKeyPresent", - value.isMember("masterKeyPresent"))); + "masterKeyPresent", value.isMember("masterKeyPresent"))); ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("OperationalDatasetComponents.networkNamePresent", - value.isMember("networkNamePresent"))); + "networkNamePresent", value.isMember("networkNamePresent"))); ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("OperationalDatasetComponents.extendedPanIdPresent", - value.isMember("extendedPanIdPresent"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("OperationalDatasetComponents.meshLocalPrefixPresent", - value.isMember("meshLocalPrefixPresent"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("OperationalDatasetComponents.delayPresent", value.isMember("delayPresent"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("OperationalDatasetComponents.panIdPresent", value.isMember("panIdPresent"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("OperationalDatasetComponents.channelPresent", value.isMember("channelPresent"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("OperationalDatasetComponents.pskcPresent", value.isMember("pskcPresent"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("OperationalDatasetComponents.securityPolicyPresent", - value.isMember("securityPolicyPresent"))); + "extendedPanIdPresent", value.isMember("extendedPanIdPresent"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist( + "OperationalDatasetComponents.meshLocalPrefixPresent", "meshLocalPrefixPresent", value.isMember("meshLocalPrefixPresent"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("OperationalDatasetComponents.delayPresent", "delayPresent", + value.isMember("delayPresent"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("OperationalDatasetComponents.panIdPresent", "panIdPresent", + value.isMember("panIdPresent"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("OperationalDatasetComponents.channelPresent", "channelPresent", + value.isMember("channelPresent"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("OperationalDatasetComponents.pskcPresent", "pskcPresent", + value.isMember("pskcPresent"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist( + "OperationalDatasetComponents.securityPolicyPresent", "securityPolicyPresent", value.isMember("securityPolicyPresent"))); ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("OperationalDatasetComponents.channelMaskPresent", - value.isMember("channelMaskPresent"))); + "channelMaskPresent", value.isMember("channelMaskPresent"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "activeTimestampPresent"); @@ -1342,9 +1374,10 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters: { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("OutputInfo.index", value.isMember("index"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("OutputInfo.outputType", value.isMember("outputType"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("OutputInfo.name", value.isMember("name"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("OutputInfo.index", "index", value.isMember("index"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("OutputInfo.outputType", "outputType", value.isMember("outputType"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("OutputInfo.name", "name", value.isMember("name"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "index"); @@ -1371,9 +1404,8 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Parameter.type", value.isMember("type"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Parameter.value", value.isMember("value"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Parameter.externalIDList", value.isMember("externalIDList"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Parameter.type", "type", value.isMember("type"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Parameter.value", "value", value.isMember("value"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "type"); @@ -1382,8 +1414,11 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "value"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.value, value["value"])); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "externalIDList"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.externalIDList, value["externalIDList"])); + if (value.isMember("externalIDList")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "externalIDList"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.externalIDList, value["externalIDList"])); + } return CHIP_NO_ERROR; } @@ -1400,8 +1435,10 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("PlaybackPosition.updatedAt", value.isMember("updatedAt"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("PlaybackPosition.position", value.isMember("position"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("PlaybackPosition.updatedAt", "updatedAt", value.isMember("updatedAt"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("PlaybackPosition.position", "position", value.isMember("position"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "updatedAt"); @@ -1424,14 +1461,14 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("PowerProfileRecord.powerProfileId", value.isMember("powerProfileId"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("PowerProfileRecord.energyPhaseId", value.isMember("energyPhaseId"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("PowerProfileRecord.powerProfileRemoteControl", - value.isMember("powerProfileRemoteControl"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("PowerProfileRecord.powerProfileState", value.isMember("powerProfileState"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("PowerProfileRecord.powerProfileId", "powerProfileId", + value.isMember("powerProfileId"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("PowerProfileRecord.energyPhaseId", "energyPhaseId", + value.isMember("energyPhaseId"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist( + "PowerProfileRecord.powerProfileRemoteControl", "powerProfileRemoteControl", value.isMember("powerProfileRemoteControl"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("PowerProfileRecord.powerProfileState", "powerProfileState", + value.isMember("powerProfileState"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "powerProfileId"); @@ -1463,10 +1500,12 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ProviderLocation.fabricIndex", value.isMember("fabricIndex"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("ProviderLocation.providerNodeID", value.isMember("providerNodeID"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ProviderLocation.endpoint", value.isMember("endpoint"))); + ComplexArgumentParser::EnsureMemberExist("ProviderLocation.fabricIndex", "fabricIndex", value.isMember("fabricIndex"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ProviderLocation.providerNodeID", "providerNodeID", + value.isMember("providerNodeID"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("ProviderLocation.endpoint", "endpoint", value.isMember("endpoint"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricIndex"); @@ -1493,16 +1532,19 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.extAddress", value.isMember("extAddress"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.rloc16", value.isMember("rloc16"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.routerId", value.isMember("routerId"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.nextHop", value.isMember("nextHop"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.pathCost", value.isMember("pathCost"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.LQIIn", value.isMember("LQIIn"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.LQIOut", value.isMember("LQIOut"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.age", value.isMember("age"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.allocated", value.isMember("allocated"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.linkEstablished", value.isMember("linkEstablished"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("RouteTable.extAddress", "extAddress", value.isMember("extAddress"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.rloc16", "rloc16", value.isMember("rloc16"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.routerId", "routerId", value.isMember("routerId"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.nextHop", "nextHop", value.isMember("nextHop"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.pathCost", "pathCost", value.isMember("pathCost"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.LQIIn", "LQIIn", value.isMember("LQIIn"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.LQIOut", "LQIOut", value.isMember("LQIOut"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.age", "age", value.isMember("age"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("RouteTable.allocated", "allocated", value.isMember("allocated"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("RouteTable.linkEstablished", "linkEstablished", + value.isMember("linkEstablished"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "extAddress"); @@ -1557,9 +1599,12 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SceneExtensionFieldSet.clusterId", value.isMember("clusterId"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SceneExtensionFieldSet.length", value.isMember("length"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SceneExtensionFieldSet.value", value.isMember("value"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("SceneExtensionFieldSet.clusterId", "clusterId", value.isMember("clusterId"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("SceneExtensionFieldSet.length", "length", value.isMember("length"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("SceneExtensionFieldSet.value", "value", value.isMember("value"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "clusterId"); @@ -1586,8 +1631,10 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ScheduledPhase.energyPhaseId", value.isMember("energyPhaseId"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ScheduledPhase.scheduledTime", value.isMember("scheduledTime"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("ScheduledPhase.energyPhaseId", "energyPhaseId", value.isMember("energyPhaseId"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("ScheduledPhase.scheduledTime", "scheduledTime", value.isMember("scheduledTime"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "energyPhaseId"); @@ -1610,8 +1657,9 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SecurityPolicy.rotationTime", value.isMember("rotationTime"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SecurityPolicy.flags", value.isMember("flags"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("SecurityPolicy.rotationTime", "rotationTime", value.isMember("rotationTime"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SecurityPolicy.flags", "flags", value.isMember("flags"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "rotationTime"); @@ -1633,8 +1681,8 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters: { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SemanticTag.mfgCode", value.isMember("mfgCode"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SemanticTag.value", value.isMember("value"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SemanticTag.mfgCode", "mfgCode", value.isMember("mfgCode"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SemanticTag.value", "value", value.isMember("value"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "mfgCode"); @@ -1656,14 +1704,14 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters: { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SimpleStruct.a", value.isMember("a"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SimpleStruct.b", value.isMember("b"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SimpleStruct.c", value.isMember("c"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SimpleStruct.d", value.isMember("d"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SimpleStruct.e", value.isMember("e"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SimpleStruct.f", value.isMember("f"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SimpleStruct.g", value.isMember("g"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SimpleStruct.h", value.isMember("h"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SimpleStruct.a", "a", value.isMember("a"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SimpleStruct.b", "b", value.isMember("b"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SimpleStruct.c", "c", value.isMember("c"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SimpleStruct.d", "d", value.isMember("d"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SimpleStruct.e", "e", value.isMember("e"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SimpleStruct.f", "f", value.isMember("f"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SimpleStruct.g", "g", value.isMember("g"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SimpleStruct.h", "h", value.isMember("h"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "a"); @@ -1710,10 +1758,10 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SoftwareFaultStruct.id", value.isMember("id"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SoftwareFaultStruct.name", value.isMember("name"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("SoftwareFaultStruct.faultRecording", value.isMember("faultRecording"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SoftwareFaultStruct.id", "id", value.isMember("id"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SoftwareFaultStruct.name", "name", value.isMember("name"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SoftwareFaultStruct.faultRecording", "faultRecording", + value.isMember("faultRecording"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "id"); @@ -1740,19 +1788,24 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("StyleInformation.imageUrl", value.isMember("imageUrl"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("StyleInformation.color", value.isMember("color"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("StyleInformation.size", value.isMember("size"))); - char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "imageUrl"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.imageUrl, value["imageUrl"])); + if (value.isMember("imageUrl")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "imageUrl"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.imageUrl, value["imageUrl"])); + } - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "color"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.color, value["color"])); + if (value.isMember("color")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "color"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.color, value["color"])); + } - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "size"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.size, value["size"])); + if (value.isMember("size")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "size"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.size, value["size"])); + } return CHIP_NO_ERROR; } @@ -1768,9 +1821,9 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters: { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Target.cluster", value.isMember("cluster"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Target.endpoint", value.isMember("endpoint"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Target.deviceType", value.isMember("deviceType"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Target.cluster", "cluster", value.isMember("cluster"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Target.endpoint", "endpoint", value.isMember("endpoint"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("Target.deviceType", "deviceType", value.isMember("deviceType"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "cluster"); @@ -1797,8 +1850,9 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TargetInfo.identifier", value.isMember("identifier"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TargetInfo.name", value.isMember("name"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("TargetInfo.identifier", "identifier", value.isMember("identifier"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TargetInfo.name", "name", value.isMember("name"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "identifier"); @@ -1821,7 +1875,8 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TestFabricScoped.fabricIndex", value.isMember("fabricIndex"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("TestFabricScoped.fabricIndex", "fabricIndex", value.isMember("fabricIndex"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricIndex"); @@ -1841,9 +1896,9 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("TestListStructOctet.fabricIndex", value.isMember("fabricIndex"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("TestListStructOctet.operationalCert", value.isMember("operationalCert"))); + ComplexArgumentParser::EnsureMemberExist("TestListStructOctet.fabricIndex", "fabricIndex", value.isMember("fabricIndex"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TestListStructOctet.operationalCert", "operationalCert", + value.isMember("operationalCert"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricIndex"); @@ -1867,17 +1922,21 @@ ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThreadInterfaceScanResult.panId", value.isMember("panId"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("ThreadInterfaceScanResult.extendedPanId", value.isMember("extendedPanId"))); + ComplexArgumentParser::EnsureMemberExist("ThreadInterfaceScanResult.panId", "panId", value.isMember("panId"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThreadInterfaceScanResult.extendedPanId", "extendedPanId", + value.isMember("extendedPanId"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThreadInterfaceScanResult.networkName", "networkName", + value.isMember("networkName"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("ThreadInterfaceScanResult.channel", "channel", value.isMember("channel"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("ThreadInterfaceScanResult.networkName", value.isMember("networkName"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThreadInterfaceScanResult.channel", value.isMember("channel"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThreadInterfaceScanResult.version", value.isMember("version"))); + ComplexArgumentParser::EnsureMemberExist("ThreadInterfaceScanResult.version", "version", value.isMember("version"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThreadInterfaceScanResult.extendedAddress", "extendedAddress", + value.isMember("extendedAddress"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("ThreadInterfaceScanResult.extendedAddress", value.isMember("extendedAddress"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThreadInterfaceScanResult.rssi", value.isMember("rssi"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThreadInterfaceScanResult.lqi", value.isMember("lqi"))); + ComplexArgumentParser::EnsureMemberExist("ThreadInterfaceScanResult.rssi", "rssi", value.isMember("rssi"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThreadInterfaceScanResult.lqi", "lqi", value.isMember("lqi"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "panId"); @@ -1924,13 +1983,14 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThreadMetrics.id", value.isMember("id"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThreadMetrics.name", value.isMember("name"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThreadMetrics.id", "id", value.isMember("id"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThreadMetrics.name", "name", value.isMember("name"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThreadMetrics.stackFreeCurrent", "stackFreeCurrent", + value.isMember("stackFreeCurrent"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThreadMetrics.stackFreeMinimum", "stackFreeMinimum", + value.isMember("stackFreeMinimum"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("ThreadMetrics.stackFreeCurrent", value.isMember("stackFreeCurrent"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("ThreadMetrics.stackFreeMinimum", value.isMember("stackFreeMinimum"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThreadMetrics.stackSize", value.isMember("stackSize"))); + ComplexArgumentParser::EnsureMemberExist("ThreadMetrics.stackSize", "stackSize", value.isMember("stackSize"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "id"); @@ -1965,15 +2025,17 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TransferredPhase.energyPhaseId", "energyPhaseId", + value.isMember("energyPhaseId"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("TransferredPhase.energyPhaseId", value.isMember("energyPhaseId"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TransferredPhase.macroPhaseId", value.isMember("macroPhaseId"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("TransferredPhase.expectedDuration", value.isMember("expectedDuration"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TransferredPhase.peakPower", value.isMember("peakPower"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TransferredPhase.energy", value.isMember("energy"))); + ComplexArgumentParser::EnsureMemberExist("TransferredPhase.macroPhaseId", "macroPhaseId", value.isMember("macroPhaseId"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TransferredPhase.expectedDuration", "expectedDuration", + value.isMember("expectedDuration"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("TransferredPhase.maxActivationDelay", value.isMember("maxActivationDelay"))); + ComplexArgumentParser::EnsureMemberExist("TransferredPhase.peakPower", "peakPower", value.isMember("peakPower"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TransferredPhase.energy", "energy", value.isMember("energy"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TransferredPhase.maxActivationDelay", "maxActivationDelay", + value.isMember("maxActivationDelay"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "energyPhaseId"); @@ -2012,12 +2074,16 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WiFiInterfaceScanResult.security", value.isMember("security"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WiFiInterfaceScanResult.ssid", value.isMember("ssid"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WiFiInterfaceScanResult.bssid", value.isMember("bssid"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WiFiInterfaceScanResult.channel", value.isMember("channel"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WiFiInterfaceScanResult.wiFiBand", value.isMember("wiFiBand"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WiFiInterfaceScanResult.rssi", value.isMember("rssi"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("WiFiInterfaceScanResult.security", "security", value.isMember("security"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WiFiInterfaceScanResult.ssid", "ssid", value.isMember("ssid"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("WiFiInterfaceScanResult.bssid", "bssid", value.isMember("bssid"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("WiFiInterfaceScanResult.channel", "channel", value.isMember("channel"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("WiFiInterfaceScanResult.wiFiBand", "wiFiBand", value.isMember("wiFiBand"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WiFiInterfaceScanResult.rssi", "rssi", value.isMember("rssi"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "security"); @@ -2056,8 +2122,10 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WiredFaultChangeType.current", value.isMember("current"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WiredFaultChangeType.previous", value.isMember("previous"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("WiredFaultChangeType.current", "current", value.isMember("current"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("WiredFaultChangeType.previous", "previous", value.isMember("previous"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "current"); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index 228d0c0db9d3ff..cc593f2433f75b 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -55,10 +55,6 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::PowerSource::St Json::Value & value); static void Finalize(chip::app::Clusters::PowerSource::Structs::BatFaultChangeType::Type & request); -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Binding::Structs::BindingEntry::Type & request, - Json::Value & value); - -static void Finalize(chip::app::Clusters::Binding::Structs::BindingEntry::Type & request); static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ContentLauncher::Structs::BrandingInformation::Type & request, Json::Value & value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 8ac6b5fd5d17a4..0027bbc44fc50c 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -288,46 +288,6 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::Binding::Structs::BindingEntry::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - { - CHIP_ERROR err = LogValue("NodeId", indent + 1, value.nodeId); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NodeId'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("GroupId", indent + 1, value.groupId); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'GroupId'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("EndpointId", indent + 1, value.endpointId); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'EndpointId'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("ClusterId", indent + 1, value.clusterId); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ClusterId'"); - return err; - } - } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::ContentLauncher::Structs::BrandingInformation::DecodableType & value) @@ -4122,7 +4082,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("application launcher list", 1, value); } case ApplicationLauncher::Attributes::ApplicationLauncherApp::Id: { - chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEP::DecodableType value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("application launcher app", 1, value); } @@ -4396,11 +4356,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP case Binding::Id: { switch (path.mAttributeId) { - case Binding::Attributes::BindingList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("binding list", 1, value); - } case Binding::Attributes::ServerGeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); @@ -4602,12 +4557,12 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("channel list", 1, value); } case Channel::Attributes::ChannelLineup::Id: { - chip::app::Clusters::Channel::Structs::LineupInfo::DecodableType value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("channel lineup", 1, value); } case Channel::Attributes::CurrentChannel::Id: { - chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("current channel", 1, value); } @@ -5897,12 +5852,12 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("playback state", 1, value); } case MediaPlayback::Attributes::StartTime::Id: { - uint64_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("start time", 1, value); } case MediaPlayback::Attributes::Duration::Id: { - uint64_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("duration", 1, value); } @@ -5917,12 +5872,12 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("playback speed", 1, value); } case MediaPlayback::Attributes::SeekRangeEnd::Id: { - uint64_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("seek range end", 1, value); } case MediaPlayback::Attributes::SeekRangeStart::Id: { - uint64_t value; + chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("seek range start", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index cc6698ac9b318a..3431a1f14e0d37 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -36,8 +36,6 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::PowerSource::Structs::BatChargeFaultChangeType::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::PowerSource::Structs::BatFaultChangeType::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Binding::Structs::BindingEntry::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ContentLauncher::Structs::BrandingInformation::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 010dae8d831a8a..19b01517b6d475 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -46679,7 +46679,8 @@ class TV_TargetNavigatorCluster : public TestCommand RequestType request; request.target = 1; - request.data = chip::Span("1garbage: not in length on purpose", 1); + request.data.Emplace(); + request.data.Value() = chip::Span("1garbage: not in length on purpose", 1); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(data.status, data.data); @@ -46699,11 +46700,12 @@ class TV_TargetNavigatorCluster : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_3(chip::app::Clusters::TargetNavigator::StatusEnum status, chip::CharSpan data) + void OnSuccessResponse_3(chip::app::Clusters::TargetNavigator::StatusEnum status, const chip::Optional & data) { VerifyOrReturn(CheckValue("status", status, 0)); - VerifyOrReturn(CheckValueAsString("data", data, chip::CharSpan("data response", 13))); + VerifyOrReturn(CheckValuePresent("data", data)); + VerifyOrReturn(CheckValueAsString("data.Value()", data.Value(), chip::CharSpan("data response", 13))); NextTest(); } @@ -47092,7 +47094,8 @@ class TV_ApplicationLauncherCluster : public TestCommand request.application.catalogVendorId = 123U; request.application.applicationId = chip::Span("applicationIdgarbage: not in length on purpose", 13); - request.data = chip::ByteSpan(chip::Uint8::from_const_char("datagarbage: not in length on purpose"), 4); + request.data.Emplace(); + request.data.Value() = chip::ByteSpan(chip::Uint8::from_const_char("datagarbage: not in length on purpose"), 4); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_2(data.status, data.data); @@ -48055,7 +48058,7 @@ class TV_MediaPlaybackCluster : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context, uint64_t startTime) + static void OnSuccessCallback_2(void * context, const chip::app::DataModel::Nullable & startTime) { (static_cast(context))->OnSuccessResponse_2(startTime); } @@ -48065,7 +48068,7 @@ class TV_MediaPlaybackCluster : public TestCommand (static_cast(context))->OnFailureResponse_3(error); } - static void OnSuccessCallback_3(void * context, uint64_t duration) + static void OnSuccessCallback_3(void * context, const chip::app::DataModel::Nullable & duration) { (static_cast(context))->OnSuccessResponse_3(duration); } @@ -48085,7 +48088,7 @@ class TV_MediaPlaybackCluster : public TestCommand (static_cast(context))->OnFailureResponse_5(error); } - static void OnSuccessCallback_5(void * context, uint64_t seekRangeEnd) + static void OnSuccessCallback_5(void * context, const chip::app::DataModel::Nullable & seekRangeEnd) { (static_cast(context))->OnSuccessResponse_5(seekRangeEnd); } @@ -48095,7 +48098,7 @@ class TV_MediaPlaybackCluster : public TestCommand (static_cast(context))->OnFailureResponse_6(error); } - static void OnSuccessCallback_6(void * context, uint64_t seekRangeStart) + static void OnSuccessCallback_6(void * context, const chip::app::DataModel::Nullable & seekRangeStart) { (static_cast(context))->OnSuccessResponse_6(seekRangeStart); } @@ -48151,9 +48154,10 @@ class TV_MediaPlaybackCluster : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_2(uint64_t startTime) + void OnSuccessResponse_2(const chip::app::DataModel::Nullable & startTime) { - VerifyOrReturn(CheckValue("startTime", startTime, 0ULL)); + VerifyOrReturn(CheckValueNonNull("startTime", startTime)); + VerifyOrReturn(CheckValue("startTime.Value()", startTime.Value(), 0ULL)); NextTest(); } @@ -48175,9 +48179,10 @@ class TV_MediaPlaybackCluster : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_3(uint64_t duration) + void OnSuccessResponse_3(const chip::app::DataModel::Nullable & duration) { - VerifyOrReturn(CheckValue("duration", duration, 0ULL)); + VerifyOrReturn(CheckValueNonNull("duration", duration)); + VerifyOrReturn(CheckValue("duration.Value()", duration.Value(), 0ULL)); NextTest(); } @@ -48223,9 +48228,10 @@ class TV_MediaPlaybackCluster : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_5(uint64_t seekRangeEnd) + void OnSuccessResponse_5(const chip::app::DataModel::Nullable & seekRangeEnd) { - VerifyOrReturn(CheckValue("seekRangeEnd", seekRangeEnd, 0ULL)); + VerifyOrReturn(CheckValueNonNull("seekRangeEnd", seekRangeEnd)); + VerifyOrReturn(CheckValue("seekRangeEnd.Value()", seekRangeEnd.Value(), 0ULL)); NextTest(); } @@ -48247,9 +48253,10 @@ class TV_MediaPlaybackCluster : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_6(uint64_t seekRangeStart) + void OnSuccessResponse_6(const chip::app::DataModel::Nullable & seekRangeStart) { - VerifyOrReturn(CheckValue("seekRangeStart", seekRangeStart, 0ULL)); + VerifyOrReturn(CheckValueNonNull("seekRangeStart", seekRangeStart)); + VerifyOrReturn(CheckValue("seekRangeStart.Value()", seekRangeStart.Value(), 0ULL)); NextTest(); } @@ -48738,19 +48745,27 @@ class TV_ChannelCluster : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("channelList", iter_0, 0)); VerifyOrReturn(CheckValue("channelList[0].majorNumber", iter_0.GetValue().majorNumber, 1U)); VerifyOrReturn(CheckValue("channelList[0].minorNumber", iter_0.GetValue().minorNumber, 2U)); - VerifyOrReturn(CheckValueAsString("channelList[0].name", iter_0.GetValue().name, chip::CharSpan("exampleName", 11))); - VerifyOrReturn( - CheckValueAsString("channelList[0].callSign", iter_0.GetValue().callSign, chip::CharSpan("exampleCSign", 12))); - VerifyOrReturn(CheckValueAsString("channelList[0].affiliateCallSign", iter_0.GetValue().affiliateCallSign, - chip::CharSpan("exampleASign", 12))); + VerifyOrReturn(CheckValuePresent("channelList[0].name", iter_0.GetValue().name)); + VerifyOrReturn(CheckValueAsString("channelList[0].name.Value()", iter_0.GetValue().name.Value(), + chip::CharSpan("exampleName", 11))); + VerifyOrReturn(CheckValuePresent("channelList[0].callSign", iter_0.GetValue().callSign)); + VerifyOrReturn(CheckValueAsString("channelList[0].callSign.Value()", iter_0.GetValue().callSign.Value(), + chip::CharSpan("exampleCSign", 12))); + VerifyOrReturn(CheckValuePresent("channelList[0].affiliateCallSign", iter_0.GetValue().affiliateCallSign)); + VerifyOrReturn(CheckValueAsString("channelList[0].affiliateCallSign.Value()", + iter_0.GetValue().affiliateCallSign.Value(), chip::CharSpan("exampleASign", 12))); VerifyOrReturn(CheckNextListItemDecodes("channelList", iter_0, 1)); VerifyOrReturn(CheckValue("channelList[1].majorNumber", iter_0.GetValue().majorNumber, 2U)); VerifyOrReturn(CheckValue("channelList[1].minorNumber", iter_0.GetValue().minorNumber, 3U)); - VerifyOrReturn(CheckValueAsString("channelList[1].name", iter_0.GetValue().name, chip::CharSpan("exampleName", 11))); - VerifyOrReturn( - CheckValueAsString("channelList[1].callSign", iter_0.GetValue().callSign, chip::CharSpan("exampleCSign", 12))); - VerifyOrReturn(CheckValueAsString("channelList[1].affiliateCallSign", iter_0.GetValue().affiliateCallSign, - chip::CharSpan("exampleASign", 12))); + VerifyOrReturn(CheckValuePresent("channelList[1].name", iter_0.GetValue().name)); + VerifyOrReturn(CheckValueAsString("channelList[1].name.Value()", iter_0.GetValue().name.Value(), + chip::CharSpan("exampleName", 11))); + VerifyOrReturn(CheckValuePresent("channelList[1].callSign", iter_0.GetValue().callSign)); + VerifyOrReturn(CheckValueAsString("channelList[1].callSign.Value()", iter_0.GetValue().callSign.Value(), + chip::CharSpan("exampleCSign", 12))); + VerifyOrReturn(CheckValuePresent("channelList[1].affiliateCallSign", iter_0.GetValue().affiliateCallSign)); + VerifyOrReturn(CheckValueAsString("channelList[1].affiliateCallSign.Value()", + iter_0.GetValue().affiliateCallSign.Value(), chip::CharSpan("exampleASign", 12))); VerifyOrReturn(CheckNoMoreListItems("channelList", iter_0, 2)); } @@ -48788,9 +48803,13 @@ class TV_ChannelCluster : public TestCommand { VerifyOrReturn(CheckValue("channelMatch.majorNumber", channelMatch.majorNumber, 1U)); VerifyOrReturn(CheckValue("channelMatch.minorNumber", channelMatch.minorNumber, 0U)); - VerifyOrReturn(CheckValueAsString("channelMatch.name", channelMatch.name, chip::CharSpan("name", 4))); - VerifyOrReturn(CheckValueAsString("channelMatch.callSign", channelMatch.callSign, chip::CharSpan("callSign", 8))); - VerifyOrReturn(CheckValueAsString("channelMatch.affiliateCallSign", channelMatch.affiliateCallSign, + VerifyOrReturn(CheckValuePresent("channelMatch.name", channelMatch.name)); + VerifyOrReturn(CheckValueAsString("channelMatch.name.Value()", channelMatch.name.Value(), chip::CharSpan("name", 4))); + VerifyOrReturn(CheckValuePresent("channelMatch.callSign", channelMatch.callSign)); + VerifyOrReturn( + CheckValueAsString("channelMatch.callSign.Value()", channelMatch.callSign.Value(), chip::CharSpan("callSign", 8))); + VerifyOrReturn(CheckValuePresent("channelMatch.affiliateCallSign", channelMatch.affiliateCallSign)); + VerifyOrReturn(CheckValueAsString("channelMatch.affiliateCallSign.Value()", channelMatch.affiliateCallSign.Value(), chip::CharSpan("affiliateCallSign", 17))); VerifyOrReturn(CheckValue("errorType", errorType, 0)); @@ -49136,10 +49155,11 @@ class TV_ContentLauncherCluster : public TestCommand using RequestType = chip::app::Clusters::ContentLauncher::Commands::LaunchContentRequest::Type; RequestType request; - request.autoPlay = true; - request.data = chip::Span("exampleDatagarbage: not in length on purpose", 11); - request.search = chip::app::DataModel::List(); + request.search = chip::app::DataModel::List(); + request.autoPlay = true; + request.data.Emplace(); + request.data.Value() = chip::Span("exampleDatagarbage: not in length on purpose", 11); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_3(data.status, data.data); @@ -49159,11 +49179,12 @@ class TV_ContentLauncherCluster : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_3(chip::app::Clusters::ContentLauncher::StatusEnum status, chip::CharSpan data) + void OnSuccessResponse_3(chip::app::Clusters::ContentLauncher::StatusEnum status, const chip::Optional & data) { VerifyOrReturn(CheckValue("status", status, 0)); - VerifyOrReturn(CheckValueAsString("data", data, chip::CharSpan("exampleData", 11))); + VerifyOrReturn(CheckValuePresent("data", data)); + VerifyOrReturn(CheckValueAsString("data.Value()", data.Value(), chip::CharSpan("exampleData", 11))); NextTest(); } @@ -49174,46 +49195,87 @@ class TV_ContentLauncherCluster : public TestCommand using RequestType = chip::app::Clusters::ContentLauncher::Commands::LaunchURLRequest::Type; RequestType request; - request.contentURL = chip::Span("exampleUrlgarbage: not in length on purpose", 10); - request.displayString = chip::Span("exampleDisplayStringgarbage: not in length on purpose", 20); + request.contentURL = chip::Span("exampleUrlgarbage: not in length on purpose", 10); + request.displayString.Emplace(); + request.displayString.Value() = chip::Span("exampleDisplayStringgarbage: not in length on purpose", 20); + request.brandingInformation.Emplace(); - request.brandingInformation.providerName = chip::Span("exampleNamegarbage: not in length on purpose", 11); + request.brandingInformation.Value().providerName = + chip::Span("exampleNamegarbage: not in length on purpose", 11); + request.brandingInformation.Value().background.Emplace(); - request.brandingInformation.background.imageUrl = chip::Span("exampleUrlgarbage: not in length on purpose", 10); - request.brandingInformation.background.color = chip::Span("exampleColorgarbage: not in length on purpose", 12); + request.brandingInformation.Value().background.Value().imageUrl.Emplace(); + request.brandingInformation.Value().background.Value().imageUrl.Value() = + chip::Span("exampleUrlgarbage: not in length on purpose", 10); + request.brandingInformation.Value().background.Value().color.Emplace(); + request.brandingInformation.Value().background.Value().color.Value() = + chip::Span("exampleColorgarbage: not in length on purpose", 12); + request.brandingInformation.Value().background.Value().size.Emplace(); - request.brandingInformation.background.size.width = 0; - request.brandingInformation.background.size.height = 0; - request.brandingInformation.background.size.metric = static_cast(0); + request.brandingInformation.Value().background.Value().size.Value().width = 0; + request.brandingInformation.Value().background.Value().size.Value().height = 0; + request.brandingInformation.Value().background.Value().size.Value().metric = + static_cast(0); - request.brandingInformation.logo.imageUrl = chip::Span("exampleUrlgarbage: not in length on purpose", 10); - request.brandingInformation.logo.color = chip::Span("exampleColorgarbage: not in length on purpose", 12); + request.brandingInformation.Value().logo.Emplace(); - request.brandingInformation.logo.size.width = 0; - request.brandingInformation.logo.size.height = 0; - request.brandingInformation.logo.size.metric = static_cast(0); + request.brandingInformation.Value().logo.Value().imageUrl.Emplace(); + request.brandingInformation.Value().logo.Value().imageUrl.Value() = + chip::Span("exampleUrlgarbage: not in length on purpose", 10); + request.brandingInformation.Value().logo.Value().color.Emplace(); + request.brandingInformation.Value().logo.Value().color.Value() = + chip::Span("exampleColorgarbage: not in length on purpose", 12); + request.brandingInformation.Value().logo.Value().size.Emplace(); - request.brandingInformation.progressBar.imageUrl = + request.brandingInformation.Value().logo.Value().size.Value().width = 0; + request.brandingInformation.Value().logo.Value().size.Value().height = 0; + request.brandingInformation.Value().logo.Value().size.Value().metric = + static_cast(0); + + request.brandingInformation.Value().progressBar.Emplace(); + + request.brandingInformation.Value().progressBar.Value().imageUrl.Emplace(); + request.brandingInformation.Value().progressBar.Value().imageUrl.Value() = chip::Span("exampleUrlgarbage: not in length on purpose", 10); - request.brandingInformation.progressBar.color = chip::Span("exampleColorgarbage: not in length on purpose", 12); + request.brandingInformation.Value().progressBar.Value().color.Emplace(); + request.brandingInformation.Value().progressBar.Value().color.Value() = + chip::Span("exampleColorgarbage: not in length on purpose", 12); + request.brandingInformation.Value().progressBar.Value().size.Emplace(); + + request.brandingInformation.Value().progressBar.Value().size.Value().width = 0; + request.brandingInformation.Value().progressBar.Value().size.Value().height = 0; + request.brandingInformation.Value().progressBar.Value().size.Value().metric = + static_cast(0); - request.brandingInformation.progressBar.size.width = 0; - request.brandingInformation.progressBar.size.height = 0; - request.brandingInformation.progressBar.size.metric = static_cast(0); + request.brandingInformation.Value().splash.Emplace(); - request.brandingInformation.splash.imageUrl = chip::Span("exampleUrlgarbage: not in length on purpose", 10); - request.brandingInformation.splash.color = chip::Span("exampleColorgarbage: not in length on purpose", 12); + request.brandingInformation.Value().splash.Value().imageUrl.Emplace(); + request.brandingInformation.Value().splash.Value().imageUrl.Value() = + chip::Span("exampleUrlgarbage: not in length on purpose", 10); + request.brandingInformation.Value().splash.Value().color.Emplace(); + request.brandingInformation.Value().splash.Value().color.Value() = + chip::Span("exampleColorgarbage: not in length on purpose", 12); + request.brandingInformation.Value().splash.Value().size.Emplace(); + + request.brandingInformation.Value().splash.Value().size.Value().width = 0; + request.brandingInformation.Value().splash.Value().size.Value().height = 0; + request.brandingInformation.Value().splash.Value().size.Value().metric = + static_cast(0); - request.brandingInformation.splash.size.width = 0; - request.brandingInformation.splash.size.height = 0; - request.brandingInformation.splash.size.metric = static_cast(0); + request.brandingInformation.Value().waterMark.Emplace(); - request.brandingInformation.waterMark.imageUrl = chip::Span("exampleUrlgarbage: not in length on purpose", 10); - request.brandingInformation.waterMark.color = chip::Span("exampleColorgarbage: not in length on purpose", 12); + request.brandingInformation.Value().waterMark.Value().imageUrl.Emplace(); + request.brandingInformation.Value().waterMark.Value().imageUrl.Value() = + chip::Span("exampleUrlgarbage: not in length on purpose", 10); + request.brandingInformation.Value().waterMark.Value().color.Emplace(); + request.brandingInformation.Value().waterMark.Value().color.Value() = + chip::Span("exampleColorgarbage: not in length on purpose", 12); + request.brandingInformation.Value().waterMark.Value().size.Emplace(); - request.brandingInformation.waterMark.size.width = 0; - request.brandingInformation.waterMark.size.height = 0; - request.brandingInformation.waterMark.size.metric = static_cast(0); + request.brandingInformation.Value().waterMark.Value().size.Value().width = 0; + request.brandingInformation.Value().waterMark.Value().size.Value().height = 0; + request.brandingInformation.Value().waterMark.Value().size.Value().metric = + static_cast(0); auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_4(data.status, data.data); @@ -49233,11 +49295,12 @@ class TV_ContentLauncherCluster : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_4(chip::app::Clusters::ContentLauncher::StatusEnum status, chip::CharSpan data) + void OnSuccessResponse_4(chip::app::Clusters::ContentLauncher::StatusEnum status, const chip::Optional & data) { VerifyOrReturn(CheckValue("status", status, 0)); - VerifyOrReturn(CheckValueAsString("data", data, chip::CharSpan("exampleData", 11))); + VerifyOrReturn(CheckValuePresent("data", data)); + VerifyOrReturn(CheckValueAsString("data.Value()", data.Value(), chip::CharSpan("exampleData", 11))); NextTest(); } diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h index 88134cd284a0b7..4aa7eb72926196 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -191,11 +191,6 @@ void BinaryInputBasicClusterAttributeListListAttributeFilter(chip::TLV::TLVReade chip::Callback::Cancelable * onFailureCallback); typedef void (*BinaryInputBasicAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void BindingClusterBindingListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); -typedef void (*BindingBindingListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); void BindingClusterServerGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); diff --git a/zzz_generated/light-switch-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/light-switch-app/zap-generated/IMClusterCommandHandler.cpp index daf9ad6e9d5aad..ba95d7a6441c2b 100644 --- a/zzz_generated/light-switch-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/light-switch-app/zap-generated/IMClusterCommandHandler.cpp @@ -99,6 +99,52 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace AdministratorCommissioning +namespace Binding { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::Bind::Id: { + Commands::Bind::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBindingClusterBindCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::Unbind::Id: { + Commands::Unbind::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBindingClusterUnbindCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace Binding + namespace DiagnosticLogs { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -641,6 +687,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::AdministratorCommissioning::Id: Clusters::AdministratorCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::Binding::Id: + Clusters::Binding::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::DiagnosticLogs::Id: Clusters::DiagnosticLogs::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/zzz_generated/light-switch-app/zap-generated/endpoint_config.h b/zzz_generated/light-switch-app/zap-generated/endpoint_config.h index 59089d01723842..f88f80ec7f95a2 100644 --- a/zzz_generated/light-switch-app/zap-generated/endpoint_config.h +++ b/zzz_generated/light-switch-app/zap-generated/endpoint_config.h @@ -796,6 +796,11 @@ // clang-format off #define GENERATED_COMMANDS { \ + /* Endpoint: 0, Cluster: Binding (server) */\ + /* client_generated */ \ + 0x00000000 /* Bind */, \ + 0x00000001 /* Unbind */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* client_generated */ \ 0x00000000 /* AnnounceOtaProvider */, \ @@ -876,6 +881,11 @@ /* server_generated */ \ 0x00000000 /* IdentifyQueryResponse */, \ chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 1, Cluster: Binding (server) */\ + /* client_generated */ \ + 0x00000000 /* Bind */, \ + 0x00000001 /* Unbind */, \ + chip::kInvalidCommandId /* end of list */, \ } // clang-format on @@ -904,7 +914,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = nullptr ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ @@ -948,7 +958,7 @@ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 3 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ @@ -970,8 +980,8 @@ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 2 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 6 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 5 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 9 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ @@ -981,8 +991,8 @@ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 9 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 16 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 12 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 19 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ @@ -992,7 +1002,7 @@ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 19 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 22 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ @@ -1014,7 +1024,7 @@ .clusterSize = 30, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 24 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ @@ -1025,7 +1035,7 @@ .clusterSize = 247, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 26 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ @@ -1036,7 +1046,7 @@ .clusterSize = 58, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 28 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ @@ -1047,7 +1057,7 @@ .clusterSize = 57, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 30 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ @@ -1069,7 +1079,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 32 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ @@ -1080,8 +1090,8 @@ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 36 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 46 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ @@ -1124,8 +1134,8 @@ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 48 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 51 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 55 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (client) */ \ @@ -1179,7 +1189,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = nullptr ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 57 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ diff --git a/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp index 2430d91869ab5d..701b969e786373 100644 --- a/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp @@ -99,6 +99,52 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace AdministratorCommissioning +namespace Binding { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::Bind::Id: { + Commands::Bind::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBindingClusterBindCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::Unbind::Id: { + Commands::Unbind::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBindingClusterUnbindCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace Binding + namespace DiagnosticLogs { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -749,6 +795,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::AdministratorCommissioning::Id: Clusters::AdministratorCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::Binding::Id: + Clusters::Binding::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::DiagnosticLogs::Id: Clusters::DiagnosticLogs::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index c8d32f0f6cac27..6838bb0260e56c 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -29,261 +29,243 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 0, Cluster: Binding (server), big-endian */ \ + /* Endpoint: 0, Cluster: Localization Configuration (server), big-endian */ \ \ - /* 0 - binding list, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 0, Cluster: Localization Configuration (server), big-endian */ \ - \ - /* 254 - ActiveLocale, */ \ - 5, 'e', 'n', '-', 'U', 'S', \ + /* 0 - ActiveLocale, */ \ + 5, 'e', 'n', '-', 'U', 'S', \ \ /* Endpoint: 0, Cluster: Unit Localization (server), big-endian */ \ \ - /* 260 - FeatureMap, */ \ + /* 6 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Commissioning (server), big-endian */ \ \ - /* 264 - Breadcrumb, */ \ + /* 10 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 272 - FeatureMap, */ \ + /* 18 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 276 - Networks, */ \ + /* 22 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 288 - LastConnectErrorValue, */ \ + /* 34 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 292 - FeatureMap, */ \ + /* 38 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x02, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 296 - UpTime, */ \ + /* 42 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 304 - TotalOperationalHours, */ \ + /* 50 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 308 - CurrentHeapFree, */ \ + /* 54 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 316 - CurrentHeapUsed, */ \ + /* 62 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 324 - CurrentHeapHighWatermark, */ \ + /* 70 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 332 - FeatureMap, */ \ + /* 78 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 336 - NetworkName, */ \ + /* 82 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 338 - ExtendedPanId, */ \ + /* 84 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 346 - OverrunCount, */ \ + /* 92 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 354 - PartitionId, */ \ + /* 100 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 358 - TxTotalCount, */ \ + /* 104 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 362 - TxUnicastCount, */ \ + /* 108 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 366 - TxBroadcastCount, */ \ + /* 112 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 370 - TxAckRequestedCount, */ \ + /* 116 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 374 - TxAckedCount, */ \ + /* 120 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 378 - TxNoAckRequestedCount, */ \ + /* 124 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 382 - TxDataCount, */ \ + /* 128 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 386 - TxDataPollCount, */ \ + /* 132 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 390 - TxBeaconCount, */ \ + /* 136 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 394 - TxBeaconRequestCount, */ \ + /* 140 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 398 - TxOtherCount, */ \ + /* 144 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 402 - TxRetryCount, */ \ + /* 148 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 406 - TxDirectMaxRetryExpiryCount, */ \ + /* 152 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 410 - TxIndirectMaxRetryExpiryCount, */ \ + /* 156 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 414 - TxErrCcaCount, */ \ + /* 160 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 418 - TxErrAbortCount, */ \ + /* 164 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 422 - TxErrBusyChannelCount, */ \ + /* 168 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 426 - RxTotalCount, */ \ + /* 172 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 430 - RxUnicastCount, */ \ + /* 176 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 434 - RxBroadcastCount, */ \ + /* 180 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 438 - RxDataCount, */ \ + /* 184 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 442 - RxDataPollCount, */ \ + /* 188 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 446 - RxBeaconCount, */ \ + /* 192 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 450 - RxBeaconRequestCount, */ \ + /* 196 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 454 - RxOtherCount, */ \ + /* 200 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 458 - RxAddressFilteredCount, */ \ + /* 204 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 462 - RxDestAddrFilteredCount, */ \ + /* 208 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 466 - RxDuplicatedCount, */ \ + /* 212 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 470 - RxErrNoFrameCount, */ \ + /* 216 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 474 - RxErrUnknownNeighborCount, */ \ + /* 220 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 478 - RxErrInvalidSrcAddrCount, */ \ + /* 224 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 482 - RxErrSecCount, */ \ + /* 228 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 486 - RxErrFcsCount, */ \ + /* 232 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 490 - RxErrOtherCount, */ \ + /* 236 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 494 - ActiveTimestamp, */ \ + /* 240 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 502 - PendingTimestamp, */ \ + /* 248 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 510 - delay, */ \ + /* 256 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 514 - ChannelMask, */ \ + /* 260 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 521 - FeatureMap, */ \ + /* 267 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 525 - BeaconLostCount, */ \ + /* 271 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 529 - BeaconRxCount, */ \ + /* 275 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 533 - PacketMulticastRxCount, */ \ + /* 279 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 537 - PacketMulticastTxCount, */ \ + /* 283 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 541 - PacketUnicastRxCount, */ \ + /* 287 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 545 - PacketUnicastTxCount, */ \ + /* 291 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 549 - CurrentMaxRate, */ \ + /* 295 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 557 - OverrunCount, */ \ + /* 303 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 565 - FeatureMap, */ \ + /* 311 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 569 - PacketRxCount, */ \ + /* 315 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 577 - PacketTxCount, */ \ + /* 323 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 585 - TxErrCount, */ \ + /* 331 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 593 - CollisionCount, */ \ + /* 339 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 601 - OverrunCount, */ \ + /* 347 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 609 - TimeSinceReset, */ \ + /* 355 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 617 - FeatureMap, */ \ + /* 363 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Group Key Management (server), big-endian */ \ \ - /* 621 - GroupKeyMap, */ \ + /* 367 - GroupKeyMap, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -299,7 +281,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 875 - GroupTable, */ \ + /* 621 - GroupTable, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -317,7 +299,7 @@ \ /* Endpoint: 1, Cluster: Thermostat (server), big-endian */ \ \ - /* 1129 - FeatureMap, */ \ + /* 875 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0B, \ } @@ -325,261 +307,243 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 0, Cluster: Binding (server), little-endian */ \ - \ - /* 0 - binding list, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 0, Cluster: Localization Configuration (server), little-endian */ \ + /* Endpoint: 0, Cluster: Localization Configuration (server), little-endian */ \ \ - /* 254 - ActiveLocale, */ \ - 5, 'e', 'n', '-', 'U', 'S', \ + /* 0 - ActiveLocale, */ \ + 5, 'e', 'n', '-', 'U', 'S', \ \ /* Endpoint: 0, Cluster: Unit Localization (server), little-endian */ \ \ - /* 260 - FeatureMap, */ \ + /* 6 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ \ - /* 264 - Breadcrumb, */ \ + /* 10 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 272 - FeatureMap, */ \ + /* 18 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 276 - Networks, */ \ + /* 22 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 288 - LastConnectErrorValue, */ \ + /* 34 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 292 - FeatureMap, */ \ + /* 38 - FeatureMap, */ \ 0x02, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 296 - UpTime, */ \ + /* 42 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 304 - TotalOperationalHours, */ \ + /* 50 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 308 - CurrentHeapFree, */ \ + /* 54 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 316 - CurrentHeapUsed, */ \ + /* 62 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 324 - CurrentHeapHighWatermark, */ \ + /* 70 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 332 - FeatureMap, */ \ + /* 78 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 336 - NetworkName, */ \ + /* 82 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 338 - ExtendedPanId, */ \ + /* 84 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 346 - OverrunCount, */ \ + /* 92 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 354 - PartitionId, */ \ + /* 100 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 358 - TxTotalCount, */ \ + /* 104 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 362 - TxUnicastCount, */ \ + /* 108 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 366 - TxBroadcastCount, */ \ + /* 112 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 370 - TxAckRequestedCount, */ \ + /* 116 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 374 - TxAckedCount, */ \ + /* 120 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 378 - TxNoAckRequestedCount, */ \ + /* 124 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 382 - TxDataCount, */ \ + /* 128 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 386 - TxDataPollCount, */ \ + /* 132 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 390 - TxBeaconCount, */ \ + /* 136 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 394 - TxBeaconRequestCount, */ \ + /* 140 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 398 - TxOtherCount, */ \ + /* 144 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 402 - TxRetryCount, */ \ + /* 148 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 406 - TxDirectMaxRetryExpiryCount, */ \ + /* 152 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 410 - TxIndirectMaxRetryExpiryCount, */ \ + /* 156 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 414 - TxErrCcaCount, */ \ + /* 160 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 418 - TxErrAbortCount, */ \ + /* 164 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 422 - TxErrBusyChannelCount, */ \ + /* 168 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 426 - RxTotalCount, */ \ + /* 172 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 430 - RxUnicastCount, */ \ + /* 176 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 434 - RxBroadcastCount, */ \ + /* 180 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 438 - RxDataCount, */ \ + /* 184 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 442 - RxDataPollCount, */ \ + /* 188 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 446 - RxBeaconCount, */ \ + /* 192 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 450 - RxBeaconRequestCount, */ \ + /* 196 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 454 - RxOtherCount, */ \ + /* 200 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 458 - RxAddressFilteredCount, */ \ + /* 204 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 462 - RxDestAddrFilteredCount, */ \ + /* 208 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 466 - RxDuplicatedCount, */ \ + /* 212 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 470 - RxErrNoFrameCount, */ \ + /* 216 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 474 - RxErrUnknownNeighborCount, */ \ + /* 220 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 478 - RxErrInvalidSrcAddrCount, */ \ + /* 224 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 482 - RxErrSecCount, */ \ + /* 228 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 486 - RxErrFcsCount, */ \ + /* 232 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 490 - RxErrOtherCount, */ \ + /* 236 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 494 - ActiveTimestamp, */ \ + /* 240 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 502 - PendingTimestamp, */ \ + /* 248 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 510 - delay, */ \ + /* 256 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 514 - ChannelMask, */ \ + /* 260 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 521 - FeatureMap, */ \ + /* 267 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 525 - BeaconLostCount, */ \ + /* 271 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 529 - BeaconRxCount, */ \ + /* 275 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 533 - PacketMulticastRxCount, */ \ + /* 279 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 537 - PacketMulticastTxCount, */ \ + /* 283 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 541 - PacketUnicastRxCount, */ \ + /* 287 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 545 - PacketUnicastTxCount, */ \ + /* 291 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 549 - CurrentMaxRate, */ \ + /* 295 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 557 - OverrunCount, */ \ + /* 303 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 565 - FeatureMap, */ \ + /* 311 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 569 - PacketRxCount, */ \ + /* 315 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 577 - PacketTxCount, */ \ + /* 323 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 585 - TxErrCount, */ \ + /* 331 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 593 - CollisionCount, */ \ + /* 339 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 601 - OverrunCount, */ \ + /* 347 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 609 - TimeSinceReset, */ \ + /* 355 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 617 - FeatureMap, */ \ + /* 363 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Group Key Management (server), little-endian */ \ \ - /* 621 - GroupKeyMap, */ \ + /* 367 - GroupKeyMap, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -595,7 +559,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 875 - GroupTable, */ \ + /* 621 - GroupTable, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -613,13 +577,13 @@ \ /* Endpoint: 1, Cluster: Thermostat (server), little-endian */ \ \ - /* 1129 - FeatureMap, */ \ + /* 875 - FeatureMap, */ \ 0x0B, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (76) +#define GENERATED_DEFAULTS_COUNT (75) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -667,7 +631,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 234 +#define GENERATED_ATTRIBUTE_COUNT 233 #define GENERATED_ATTRIBUTES \ { \ \ @@ -684,8 +648,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Binding (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(0) }, /* binding list */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Access Control (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -742,7 +705,7 @@ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(254) }, /* ActiveLocale */ \ + ZAP_LONG_DEFAULTS_INDEX(0) }, /* ActiveLocale */ \ { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -758,37 +721,37 @@ \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(6) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(264) }, /* Breadcrumb */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(10) }, /* Breadcrumb */ \ { 0x00000001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfo */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(272) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfo */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(18) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(276) }, /* Networks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(22) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(288) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(292) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(34) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(296) }, /* UpTime */ \ - { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(304) }, /* TotalOperationalHours */ \ - { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(42) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ @@ -798,23 +761,23 @@ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(308) }, /* CurrentHeapFree */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(316) }, /* CurrentHeapUsed */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(324) }, /* CurrentHeapHighWatermark */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(332) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(54) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(62) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(70) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(78) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x00000002, ZAP_TYPE(CHAR_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* NetworkName */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(82) }, /* NetworkName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(338) }, /* ExtendedPanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(84) }, /* ExtendedPanId */ \ { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(346) }, /* OverrunCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(92) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(354) }, /* PartitionId */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(100) }, /* PartitionId */ \ { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -827,50 +790,50 @@ { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(358) }, /* TxTotalCount */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(362) }, /* TxUnicastCount */ \ - { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(366) }, /* TxBroadcastCount */ \ - { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(370) }, /* TxAckRequestedCount */ \ - { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(374) }, /* TxAckedCount */ \ - { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(378) }, /* TxNoAckRequestedCount */ \ - { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(382) }, /* TxDataCount */ \ - { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(386) }, /* TxDataPollCount */ \ - { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(390) }, /* TxBeaconCount */ \ - { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(394) }, /* TxBeaconRequestCount */ \ - { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* TxOtherCount */ \ - { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(402) }, /* TxRetryCount */ \ - { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(406) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(410) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(414) }, /* TxErrCcaCount */ \ - { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(418) }, /* TxErrAbortCount */ \ - { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(422) }, /* TxErrBusyChannelCount */ \ - { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(426) }, /* RxTotalCount */ \ - { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(430) }, /* RxUnicastCount */ \ - { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(434) }, /* RxBroadcastCount */ \ - { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(438) }, /* RxDataCount */ \ - { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(442) }, /* RxDataPollCount */ \ - { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(446) }, /* RxBeaconCount */ \ - { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(450) }, /* RxBeaconRequestCount */ \ - { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(454) }, /* RxOtherCount */ \ - { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(458) }, /* RxAddressFilteredCount */ \ - { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(462) }, /* RxDestAddrFilteredCount */ \ - { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(466) }, /* RxDuplicatedCount */ \ - { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(470) }, /* RxErrNoFrameCount */ \ - { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(474) }, /* RxErrUnknownNeighborCount */ \ - { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(478) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(482) }, /* RxErrSecCount */ \ - { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(486) }, /* RxErrFcsCount */ \ - { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(490) }, /* RxErrOtherCount */ \ - { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(494) }, /* ActiveTimestamp */ \ - { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(502) }, /* PendingTimestamp */ \ - { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(510) }, /* delay */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(104) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(108) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(112) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(116) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(120) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(124) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(128) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(132) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(136) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(140) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(144) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(148) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(152) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(156) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(160) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(164) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(168) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(172) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(176) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(180) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(184) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(188) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(192) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(196) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(200) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(204) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(208) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(212) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(216) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(220) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(224) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(228) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(232) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(236) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(240) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(248) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(256) }, /* delay */ \ { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* ChannelMask */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* ChannelMask */ \ { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(521) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(267) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ @@ -879,28 +842,28 @@ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(525) }, /* BeaconLostCount */ \ - { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(529) }, /* BeaconRxCount */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(533) }, /* PacketMulticastRxCount */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(537) }, /* PacketMulticastTxCount */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(541) }, /* PacketUnicastRxCount */ \ - { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(545) }, /* PacketUnicastTxCount */ \ - { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(549) }, /* CurrentMaxRate */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(557) }, /* OverrunCount */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(565) }, /* FeatureMap */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(271) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(275) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(279) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(291) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(295) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(311) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(577) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(585) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(593) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(601) }, /* OverrunCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(609) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(617) }, /* FeatureMap */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -922,8 +885,8 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(621) }, /* GroupKeyMap */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(875) }, /* GroupTable */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(367) }, /* GroupKeyMap */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(621) }, /* GroupTable */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ @@ -1018,12 +981,12 @@ { 0x0000001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* control sequence of operation */ \ { 0x0000001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* system mode */ \ - { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ - { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ - { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1129) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* system mode */ \ + { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ + { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ + { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(875) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -1068,6 +1031,11 @@ /* server_generated */ \ 0x00000000 /* IdentifyQueryResponse */, \ chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Binding (server) */\ + /* client_generated */ \ + 0x00000000 /* Bind */, \ + 0x00000001 /* Unbind */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */\ /* client_generated */ \ 0x00000000 /* QueryImage */, \ @@ -1224,17 +1192,17 @@ /* Endpoint: 0, Cluster: Binding (server) */ \ .clusterId = 0x0000001E, \ .attributes = ZAP_ATTRIBUTE_INDEX(7), \ - .attributeCount = 2, \ - .clusterSize = 256, \ + .attributeCount = 1, \ + .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = nullptr ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 5 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Access Control (server) */ \ .clusterId = 0x0000001F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(9), \ + .attributes = ZAP_ATTRIBUTE_INDEX(8), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1245,7 +1213,7 @@ { \ /* Endpoint: 0, Cluster: Basic (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(13), \ + .attributes = ZAP_ATTRIBUTE_INDEX(12), \ .attributeCount = 20, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1256,18 +1224,18 @@ { \ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ .clusterId = 0x00000029, \ - .attributes = ZAP_ATTRIBUTE_INDEX(33), \ + .attributes = ZAP_ATTRIBUTE_INDEX(32), \ .attributeCount = 1, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 5 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 9 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 8 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 12 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ .clusterId = 0x0000002B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(34), \ + .attributes = ZAP_ATTRIBUTE_INDEX(33), \ .attributeCount = 3, \ .clusterSize = 38, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -1278,7 +1246,7 @@ { \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ .clusterId = 0x0000002C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(37), \ + .attributes = ZAP_ATTRIBUTE_INDEX(36), \ .attributeCount = 4, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -1289,7 +1257,7 @@ { \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ .clusterId = 0x0000002D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(41), \ + .attributes = ZAP_ATTRIBUTE_INDEX(40), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1300,40 +1268,40 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(44), \ + .attributes = ZAP_ATTRIBUTE_INDEX(43), \ .attributeCount = 6, \ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 12 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 17 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 15 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 20 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(50), \ + .attributes = ZAP_ATTRIBUTE_INDEX(49), \ .attributeCount = 10, \ .clusterSize = 60, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 20 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 30 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ .clusterId = 0x00000032, \ - .attributes = ZAP_ATTRIBUTE_INDEX(60), \ + .attributes = ZAP_ATTRIBUTE_INDEX(59), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 30 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ .clusterId = 0x00000033, \ - .attributes = ZAP_ATTRIBUTE_INDEX(60), \ + .attributes = ZAP_ATTRIBUTE_INDEX(59), \ .attributeCount = 9, \ .clusterSize = 17, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1344,18 +1312,18 @@ { \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ .clusterId = 0x00000034, \ - .attributes = ZAP_ATTRIBUTE_INDEX(69), \ + .attributes = ZAP_ATTRIBUTE_INDEX(68), \ .attributeCount = 6, \ .clusterSize = 30, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 32 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ .clusterId = 0x00000035, \ - .attributes = ZAP_ATTRIBUTE_INDEX(75), \ + .attributes = ZAP_ATTRIBUTE_INDEX(74), \ .attributeCount = 65, \ .clusterSize = 247, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1366,7 +1334,7 @@ { \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ .clusterId = 0x00000036, \ - .attributes = ZAP_ATTRIBUTE_INDEX(140), \ + .attributes = ZAP_ATTRIBUTE_INDEX(139), \ .attributeCount = 15, \ .clusterSize = 58, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1377,40 +1345,40 @@ { \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ .clusterId = 0x00000037, \ - .attributes = ZAP_ATTRIBUTE_INDEX(155), \ + .attributes = ZAP_ATTRIBUTE_INDEX(154), \ .attributeCount = 11, \ .clusterSize = 57, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 34 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 37 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ .clusterId = 0x0000003C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(166), \ + .attributes = ZAP_ATTRIBUTE_INDEX(165), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 36 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(170), \ + .attributes = ZAP_ATTRIBUTE_INDEX(169), \ .attributeCount = 7, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 40 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 50 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 53 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ .clusterId = 0x0000003F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(177), \ + .attributes = ZAP_ATTRIBUTE_INDEX(176), \ .attributeCount = 3, \ .clusterSize = 510, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1421,7 +1389,7 @@ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(180), \ + .attributes = ZAP_ATTRIBUTE_INDEX(179), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1432,7 +1400,7 @@ { \ /* Endpoint: 0, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(182), \ + .attributes = ZAP_ATTRIBUTE_INDEX(181), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1443,7 +1411,7 @@ { \ /* Endpoint: 1, Cluster: Identify (client) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(184), \ + .attributes = ZAP_ATTRIBUTE_INDEX(183), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1454,40 +1422,40 @@ { \ /* Endpoint: 1, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(184), \ + .attributes = ZAP_ATTRIBUTE_INDEX(183), \ .attributeCount = 3, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 55 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 58 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 58 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 61 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(187), \ + .attributes = ZAP_ATTRIBUTE_INDEX(186), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 67 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 63 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 70 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ .clusterId = 0x00000005, \ - .attributes = ZAP_ATTRIBUTE_INDEX(189), \ + .attributes = ZAP_ATTRIBUTE_INDEX(188), \ .attributeCount = 6, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 72 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 80 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 75 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 83 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Basic (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(195), \ + .attributes = ZAP_ATTRIBUTE_INDEX(194), \ .attributeCount = 20, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1498,12 +1466,12 @@ { \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ .clusterId = 0x00000201, \ - .attributes = ZAP_ATTRIBUTE_INDEX(215), \ + .attributes = ZAP_ATTRIBUTE_INDEX(214), \ .attributeCount = 19, \ .clusterSize = 34, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 87 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 90 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ } @@ -1517,7 +1485,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 22, 1357 }, { ZAP_CLUSTER_INDEX(22), 6, 89 }, \ + { ZAP_CLUSTER_INDEX(0), 22, 1103 }, { ZAP_CLUSTER_INDEX(22), 6, 89 }, \ } // Largest attribute size is needed for various buffers @@ -1529,7 +1497,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (78) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1446) +#define ATTRIBUTE_MAX_SIZE (1192) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h index 94de3f107570b8..7034c1c80aac5a 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h @@ -31,11 +31,6 @@ #include // List specific responses -void BindingClusterBindingListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); -typedef void (*BindingBindingListListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); void NetworkCommissioningClusterNetworksListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); diff --git a/zzz_generated/tv-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/tv-app/zap-generated/IMClusterCommandHandler.cpp index f1203224861977..a0e42af3b61969 100644 --- a/zzz_generated/tv-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/tv-app/zap-generated/IMClusterCommandHandler.cpp @@ -255,6 +255,52 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace AudioOutput +namespace Binding { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::Bind::Id: { + Commands::Bind::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBindingClusterBindCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::Unbind::Id: { + Commands::Unbind::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBindingClusterUnbindCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace Binding + namespace Channel { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -1180,6 +1226,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::AudioOutput::Id: Clusters::AudioOutput::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::Binding::Id: + Clusters::Binding::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::Channel::Id: Clusters::Channel::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index 2ee38278d062f1..3ca8b67e348212 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -29,261 +29,243 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 0, Cluster: Binding (server), big-endian */ \ + /* Endpoint: 0, Cluster: Localization Configuration (server), big-endian */ \ \ - /* 0 - binding list, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 0, Cluster: Localization Configuration (server), big-endian */ \ - \ - /* 254 - ActiveLocale, */ \ - 5, 'e', 'n', '-', 'U', 'S', \ + /* 0 - ActiveLocale, */ \ + 5, 'e', 'n', '-', 'U', 'S', \ \ /* Endpoint: 0, Cluster: Unit Localization (server), big-endian */ \ \ - /* 260 - FeatureMap, */ \ + /* 6 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Commissioning (server), big-endian */ \ \ - /* 264 - Breadcrumb, */ \ + /* 10 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 272 - FeatureMap, */ \ + /* 18 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 276 - Networks, */ \ + /* 22 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 288 - LastConnectErrorValue, */ \ + /* 34 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 292 - FeatureMap, */ \ + /* 38 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x02, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 296 - UpTime, */ \ + /* 42 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 304 - TotalOperationalHours, */ \ + /* 50 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 308 - CurrentHeapFree, */ \ + /* 54 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 316 - CurrentHeapUsed, */ \ + /* 62 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 324 - CurrentHeapHighWatermark, */ \ + /* 70 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 332 - FeatureMap, */ \ + /* 78 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 336 - NetworkName, */ \ + /* 82 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 338 - ExtendedPanId, */ \ + /* 84 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 346 - OverrunCount, */ \ + /* 92 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 354 - PartitionId, */ \ + /* 100 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 358 - TxTotalCount, */ \ + /* 104 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 362 - TxUnicastCount, */ \ + /* 108 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 366 - TxBroadcastCount, */ \ + /* 112 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 370 - TxAckRequestedCount, */ \ + /* 116 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 374 - TxAckedCount, */ \ + /* 120 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 378 - TxNoAckRequestedCount, */ \ + /* 124 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 382 - TxDataCount, */ \ + /* 128 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 386 - TxDataPollCount, */ \ + /* 132 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 390 - TxBeaconCount, */ \ + /* 136 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 394 - TxBeaconRequestCount, */ \ + /* 140 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 398 - TxOtherCount, */ \ + /* 144 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 402 - TxRetryCount, */ \ + /* 148 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 406 - TxDirectMaxRetryExpiryCount, */ \ + /* 152 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 410 - TxIndirectMaxRetryExpiryCount, */ \ + /* 156 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 414 - TxErrCcaCount, */ \ + /* 160 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 418 - TxErrAbortCount, */ \ + /* 164 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 422 - TxErrBusyChannelCount, */ \ + /* 168 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 426 - RxTotalCount, */ \ + /* 172 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 430 - RxUnicastCount, */ \ + /* 176 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 434 - RxBroadcastCount, */ \ + /* 180 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 438 - RxDataCount, */ \ + /* 184 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 442 - RxDataPollCount, */ \ + /* 188 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 446 - RxBeaconCount, */ \ + /* 192 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 450 - RxBeaconRequestCount, */ \ + /* 196 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 454 - RxOtherCount, */ \ + /* 200 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 458 - RxAddressFilteredCount, */ \ + /* 204 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 462 - RxDestAddrFilteredCount, */ \ + /* 208 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 466 - RxDuplicatedCount, */ \ + /* 212 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 470 - RxErrNoFrameCount, */ \ + /* 216 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 474 - RxErrUnknownNeighborCount, */ \ + /* 220 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 478 - RxErrInvalidSrcAddrCount, */ \ + /* 224 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 482 - RxErrSecCount, */ \ + /* 228 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 486 - RxErrFcsCount, */ \ + /* 232 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 490 - RxErrOtherCount, */ \ + /* 236 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 494 - ActiveTimestamp, */ \ + /* 240 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 502 - PendingTimestamp, */ \ + /* 248 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 510 - delay, */ \ + /* 256 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 514 - ChannelMask, */ \ + /* 260 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 521 - FeatureMap, */ \ + /* 267 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 525 - BeaconLostCount, */ \ + /* 271 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 529 - BeaconRxCount, */ \ + /* 275 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 533 - PacketMulticastRxCount, */ \ + /* 279 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 537 - PacketMulticastTxCount, */ \ + /* 283 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 541 - PacketUnicastRxCount, */ \ + /* 287 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 545 - PacketUnicastTxCount, */ \ + /* 291 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 549 - CurrentMaxRate, */ \ + /* 295 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 557 - OverrunCount, */ \ + /* 303 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 565 - FeatureMap, */ \ + /* 311 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 569 - PacketRxCount, */ \ + /* 315 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 577 - PacketTxCount, */ \ + /* 323 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 585 - TxErrCount, */ \ + /* 331 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 593 - CollisionCount, */ \ + /* 339 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 601 - OverrunCount, */ \ + /* 347 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 609 - TimeSinceReset, */ \ + /* 355 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 617 - FeatureMap, */ \ + /* 363 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Group Key Management (server), big-endian */ \ \ - /* 621 - GroupKeyMap, */ \ + /* 367 - GroupKeyMap, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -299,7 +281,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 875 - GroupTable, */ \ + /* 621 - GroupTable, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -317,7 +299,7 @@ \ /* Endpoint: 1, Cluster: Channel (server), big-endian */ \ \ - /* 1129 - channel list, */ \ + /* 875 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -335,7 +317,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), big-endian */ \ \ - /* 1383 - target navigator list, */ \ + /* 1129 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -353,7 +335,7 @@ \ /* Endpoint: 1, Cluster: Media Input (server), big-endian */ \ \ - /* 1637 - media input list, */ \ + /* 1383 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -371,7 +353,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), big-endian */ \ \ - /* 1891 - accept header list, */ \ + /* 1637 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -387,12 +369,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2145 - supported streaming protocols, */ \ + /* 1891 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Application Launcher (server), big-endian */ \ \ - /* 2149 - application launcher list, */ \ + /* 1895 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -410,12 +392,12 @@ \ /* Endpoint: 2, Cluster: Level Control (server), big-endian */ \ \ - /* 2403 - FeatureMap, */ \ + /* 2149 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 2, Cluster: Audio Output (server), big-endian */ \ \ - /* 2407 - audio output list, */ \ + /* 2153 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -433,24 +415,24 @@ \ /* Endpoint: 3, Cluster: Media Playback (server), big-endian */ \ \ - /* 2661 - start time, */ \ + /* 2407 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 2669 - duration, */ \ + /* 2415 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2677 - playback speed, */ \ + /* 2423 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2681 - seek range end, */ \ + /* 2427 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2689 - seek range start, */ \ + /* 2435 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Content Launcher (server), big-endian */ \ \ - /* 2697 - accept header list, */ \ + /* 2443 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -466,18 +448,18 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2951 - supported streaming protocols, */ \ + /* 2697 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Application Basic (server), big-endian */ \ \ - /* 2955 - allowed vendor list, */ \ + /* 2701 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Content Launcher (server), big-endian */ \ \ - /* 2987 - accept header list, */ \ + /* 2733 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -493,12 +475,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3241 - supported streaming protocols, */ \ + /* 2987 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Application Basic (server), big-endian */ \ \ - /* 3245 - allowed vendor list, */ \ + /* 2991 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } @@ -507,261 +489,243 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 0, Cluster: Binding (server), little-endian */ \ - \ - /* 0 - binding list, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 0, Cluster: Localization Configuration (server), little-endian */ \ + /* Endpoint: 0, Cluster: Localization Configuration (server), little-endian */ \ \ - /* 254 - ActiveLocale, */ \ - 5, 'e', 'n', '-', 'U', 'S', \ + /* 0 - ActiveLocale, */ \ + 5, 'e', 'n', '-', 'U', 'S', \ \ /* Endpoint: 0, Cluster: Unit Localization (server), little-endian */ \ \ - /* 260 - FeatureMap, */ \ + /* 6 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ \ - /* 264 - Breadcrumb, */ \ + /* 10 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 272 - FeatureMap, */ \ + /* 18 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 276 - Networks, */ \ + /* 22 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 288 - LastConnectErrorValue, */ \ + /* 34 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 292 - FeatureMap, */ \ + /* 38 - FeatureMap, */ \ 0x02, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 296 - UpTime, */ \ + /* 42 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 304 - TotalOperationalHours, */ \ + /* 50 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 308 - CurrentHeapFree, */ \ + /* 54 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 316 - CurrentHeapUsed, */ \ + /* 62 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 324 - CurrentHeapHighWatermark, */ \ + /* 70 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 332 - FeatureMap, */ \ + /* 78 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 336 - NetworkName, */ \ + /* 82 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 338 - ExtendedPanId, */ \ + /* 84 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 346 - OverrunCount, */ \ + /* 92 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 354 - PartitionId, */ \ + /* 100 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 358 - TxTotalCount, */ \ + /* 104 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 362 - TxUnicastCount, */ \ + /* 108 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 366 - TxBroadcastCount, */ \ + /* 112 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 370 - TxAckRequestedCount, */ \ + /* 116 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 374 - TxAckedCount, */ \ + /* 120 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 378 - TxNoAckRequestedCount, */ \ + /* 124 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 382 - TxDataCount, */ \ + /* 128 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 386 - TxDataPollCount, */ \ + /* 132 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 390 - TxBeaconCount, */ \ + /* 136 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 394 - TxBeaconRequestCount, */ \ + /* 140 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 398 - TxOtherCount, */ \ + /* 144 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 402 - TxRetryCount, */ \ + /* 148 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 406 - TxDirectMaxRetryExpiryCount, */ \ + /* 152 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 410 - TxIndirectMaxRetryExpiryCount, */ \ + /* 156 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 414 - TxErrCcaCount, */ \ + /* 160 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 418 - TxErrAbortCount, */ \ + /* 164 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 422 - TxErrBusyChannelCount, */ \ + /* 168 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 426 - RxTotalCount, */ \ + /* 172 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 430 - RxUnicastCount, */ \ + /* 176 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 434 - RxBroadcastCount, */ \ + /* 180 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 438 - RxDataCount, */ \ + /* 184 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 442 - RxDataPollCount, */ \ + /* 188 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 446 - RxBeaconCount, */ \ + /* 192 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 450 - RxBeaconRequestCount, */ \ + /* 196 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 454 - RxOtherCount, */ \ + /* 200 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 458 - RxAddressFilteredCount, */ \ + /* 204 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 462 - RxDestAddrFilteredCount, */ \ + /* 208 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 466 - RxDuplicatedCount, */ \ + /* 212 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 470 - RxErrNoFrameCount, */ \ + /* 216 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 474 - RxErrUnknownNeighborCount, */ \ + /* 220 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 478 - RxErrInvalidSrcAddrCount, */ \ + /* 224 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 482 - RxErrSecCount, */ \ + /* 228 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 486 - RxErrFcsCount, */ \ + /* 232 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 490 - RxErrOtherCount, */ \ + /* 236 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 494 - ActiveTimestamp, */ \ + /* 240 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 502 - PendingTimestamp, */ \ + /* 248 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 510 - delay, */ \ + /* 256 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 514 - ChannelMask, */ \ + /* 260 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 521 - FeatureMap, */ \ + /* 267 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 525 - BeaconLostCount, */ \ + /* 271 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 529 - BeaconRxCount, */ \ + /* 275 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 533 - PacketMulticastRxCount, */ \ + /* 279 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 537 - PacketMulticastTxCount, */ \ + /* 283 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 541 - PacketUnicastRxCount, */ \ + /* 287 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 545 - PacketUnicastTxCount, */ \ + /* 291 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 549 - CurrentMaxRate, */ \ + /* 295 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 557 - OverrunCount, */ \ + /* 303 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 565 - FeatureMap, */ \ + /* 311 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 569 - PacketRxCount, */ \ + /* 315 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 577 - PacketTxCount, */ \ + /* 323 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 585 - TxErrCount, */ \ + /* 331 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 593 - CollisionCount, */ \ + /* 339 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 601 - OverrunCount, */ \ + /* 347 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 609 - TimeSinceReset, */ \ + /* 355 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 617 - FeatureMap, */ \ + /* 363 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Group Key Management (server), little-endian */ \ \ - /* 621 - GroupKeyMap, */ \ + /* 367 - GroupKeyMap, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -777,7 +741,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 875 - GroupTable, */ \ + /* 621 - GroupTable, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -795,7 +759,7 @@ \ /* Endpoint: 1, Cluster: Channel (server), little-endian */ \ \ - /* 1129 - channel list, */ \ + /* 875 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -813,7 +777,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), little-endian */ \ \ - /* 1383 - target navigator list, */ \ + /* 1129 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -831,7 +795,7 @@ \ /* Endpoint: 1, Cluster: Media Input (server), little-endian */ \ \ - /* 1637 - media input list, */ \ + /* 1383 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -849,7 +813,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), little-endian */ \ \ - /* 1891 - accept header list, */ \ + /* 1637 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -865,12 +829,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2145 - supported streaming protocols, */ \ + /* 1891 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Application Launcher (server), little-endian */ \ \ - /* 2149 - application launcher list, */ \ + /* 1895 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -888,12 +852,12 @@ \ /* Endpoint: 2, Cluster: Level Control (server), little-endian */ \ \ - /* 2403 - FeatureMap, */ \ + /* 2149 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: Audio Output (server), little-endian */ \ \ - /* 2407 - audio output list, */ \ + /* 2153 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -911,24 +875,24 @@ \ /* Endpoint: 3, Cluster: Media Playback (server), little-endian */ \ \ - /* 2661 - start time, */ \ + /* 2407 - start time, */ \ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2669 - duration, */ \ + /* 2415 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2677 - playback speed, */ \ + /* 2423 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2681 - seek range end, */ \ + /* 2427 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2689 - seek range start, */ \ + /* 2435 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Content Launcher (server), little-endian */ \ \ - /* 2697 - accept header list, */ \ + /* 2443 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -944,18 +908,18 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2951 - supported streaming protocols, */ \ + /* 2697 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Application Basic (server), little-endian */ \ \ - /* 2955 - allowed vendor list, */ \ + /* 2701 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Content Launcher (server), little-endian */ \ \ - /* 2987 - accept header list, */ \ + /* 2733 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -971,19 +935,19 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3241 - supported streaming protocols, */ \ + /* 2987 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Application Basic (server), little-endian */ \ \ - /* 3245 - allowed vendor list, */ \ + /* 2991 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (94) +#define GENERATED_DEFAULTS_COUNT (93) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1016,7 +980,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 295 +#define GENERATED_ATTRIBUTE_COUNT 294 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1028,8 +992,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Binding (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(0) }, /* binding list */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Access Control (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1086,7 +1049,7 @@ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(254) }, /* ActiveLocale */ \ + ZAP_LONG_DEFAULTS_INDEX(0) }, /* ActiveLocale */ \ { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -1102,37 +1065,37 @@ \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(6) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(264) }, /* Breadcrumb */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(10) }, /* Breadcrumb */ \ { 0x00000001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfo */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(272) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfo */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(18) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(276) }, /* Networks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(22) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(288) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(292) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(34) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(296) }, /* UpTime */ \ - { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(304) }, /* TotalOperationalHours */ \ - { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(42) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ @@ -1142,23 +1105,23 @@ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(308) }, /* CurrentHeapFree */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(316) }, /* CurrentHeapUsed */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(324) }, /* CurrentHeapHighWatermark */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(332) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(54) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(62) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(70) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(78) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x00000002, ZAP_TYPE(CHAR_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* NetworkName */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(82) }, /* NetworkName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(338) }, /* ExtendedPanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(84) }, /* ExtendedPanId */ \ { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(346) }, /* OverrunCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(92) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(354) }, /* PartitionId */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(100) }, /* PartitionId */ \ { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -1171,50 +1134,50 @@ { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(358) }, /* TxTotalCount */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(362) }, /* TxUnicastCount */ \ - { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(366) }, /* TxBroadcastCount */ \ - { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(370) }, /* TxAckRequestedCount */ \ - { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(374) }, /* TxAckedCount */ \ - { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(378) }, /* TxNoAckRequestedCount */ \ - { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(382) }, /* TxDataCount */ \ - { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(386) }, /* TxDataPollCount */ \ - { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(390) }, /* TxBeaconCount */ \ - { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(394) }, /* TxBeaconRequestCount */ \ - { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* TxOtherCount */ \ - { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(402) }, /* TxRetryCount */ \ - { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(406) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(410) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(414) }, /* TxErrCcaCount */ \ - { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(418) }, /* TxErrAbortCount */ \ - { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(422) }, /* TxErrBusyChannelCount */ \ - { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(426) }, /* RxTotalCount */ \ - { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(430) }, /* RxUnicastCount */ \ - { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(434) }, /* RxBroadcastCount */ \ - { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(438) }, /* RxDataCount */ \ - { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(442) }, /* RxDataPollCount */ \ - { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(446) }, /* RxBeaconCount */ \ - { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(450) }, /* RxBeaconRequestCount */ \ - { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(454) }, /* RxOtherCount */ \ - { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(458) }, /* RxAddressFilteredCount */ \ - { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(462) }, /* RxDestAddrFilteredCount */ \ - { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(466) }, /* RxDuplicatedCount */ \ - { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(470) }, /* RxErrNoFrameCount */ \ - { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(474) }, /* RxErrUnknownNeighborCount */ \ - { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(478) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(482) }, /* RxErrSecCount */ \ - { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(486) }, /* RxErrFcsCount */ \ - { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(490) }, /* RxErrOtherCount */ \ - { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(494) }, /* ActiveTimestamp */ \ - { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(502) }, /* PendingTimestamp */ \ - { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(510) }, /* delay */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(104) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(108) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(112) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(116) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(120) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(124) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(128) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(132) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(136) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(140) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(144) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(148) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(152) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(156) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(160) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(164) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(168) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(172) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(176) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(180) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(184) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(188) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(192) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(196) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(200) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(204) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(208) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(212) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(216) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(220) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(224) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(228) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(232) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(236) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(240) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(248) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(256) }, /* delay */ \ { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* ChannelMask */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* ChannelMask */ \ { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(521) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(267) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ @@ -1223,28 +1186,28 @@ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(525) }, /* BeaconLostCount */ \ - { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(529) }, /* BeaconRxCount */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(533) }, /* PacketMulticastRxCount */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(537) }, /* PacketMulticastTxCount */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(541) }, /* PacketUnicastRxCount */ \ - { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(545) }, /* PacketUnicastTxCount */ \ - { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(549) }, /* CurrentMaxRate */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(557) }, /* OverrunCount */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(565) }, /* FeatureMap */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(271) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(275) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(279) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(291) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(295) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(311) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(577) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(585) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(593) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(601) }, /* OverrunCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(609) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(617) }, /* FeatureMap */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -1266,8 +1229,8 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(621) }, /* GroupKeyMap */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(875) }, /* GroupTable */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(367) }, /* GroupKeyMap */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(621) }, /* GroupTable */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ @@ -1301,20 +1264,20 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Channel (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1129) }, /* channel list */ \ - { 0x00000001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(875) }, /* channel list */ \ + { 0x00000001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* channel lineup */ \ - { 0x00000002, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000002, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* current channel */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1383) }, /* target navigator list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1129) }, /* target navigator list */ \ { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* current navigator target */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Input (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1637) }, /* media input list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1383) }, /* media input list */ \ { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current media input */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -1325,14 +1288,15 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1891) }, /* accept header list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1637) }, /* accept header list */ \ { 0x00000001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(2145) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(1891) }, /* supported streaming protocols */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2149) }, /* application launcher list */ \ - { 0x00000001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1895) }, /* application launcher list */ \ + { 0x00000001, ZAP_TYPE(STRUCT), 0, \ + ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* application launcher app */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -1363,7 +1327,7 @@ { 0x00004000, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2403) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2149) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ @@ -1374,7 +1338,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Audio Output (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2407) }, /* audio output list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2153) }, /* audio output list */ \ { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -1386,20 +1350,20 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Media Playback (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x00000001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2661) }, /* start time */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2669) }, /* duration */ \ - { 0x00000003, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* position */ \ - { 0x00000004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2677) }, /* playback speed */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2681) }, /* seek range end */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2689) }, /* seek range start */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ + { 0x00000001, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_LONG_DEFAULTS_INDEX(2407) }, /* start time */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_LONG_DEFAULTS_INDEX(2415) }, /* duration */ \ + { 0x00000003, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* position */ \ + { 0x00000004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2423) }, /* playback speed */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_LONG_DEFAULTS_INDEX(2427) }, /* seek range end */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(2435) }, /* seek range start */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Content Launcher (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2697) }, /* accept header list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2443) }, /* accept header list */ \ { 0x00000001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(2951) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(2697) }, /* supported streaming protocols */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Application Basic (server) */ \ @@ -1410,7 +1374,7 @@ { 0x00000004, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* application app */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ { 0x00000006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x00000007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2955) }, /* allowed vendor list */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2701) }, /* allowed vendor list */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Account Login (server) */ \ @@ -1424,9 +1388,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ \ /* Endpoint: 4, Cluster: Content Launcher (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2987) }, /* accept header list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2733) }, /* accept header list */ \ { 0x00000001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3241) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(2987) }, /* supported streaming protocols */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 4, Cluster: Application Basic (server) */ \ @@ -1437,7 +1401,7 @@ { 0x00000004, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* application app */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ { 0x00000006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x00000007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(3245) }, /* allowed vendor list */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2991) }, /* allowed vendor list */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 5, Cluster: Descriptor (server) */ \ @@ -1485,6 +1449,11 @@ // clang-format off #define GENERATED_COMMANDS { \ + /* Endpoint: 0, Cluster: Binding (server) */\ + /* client_generated */ \ + 0x00000000 /* Bind */, \ + 0x00000001 /* Unbind */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */\ /* client_generated */ \ 0x00000000 /* QueryImage */, \ @@ -1709,17 +1678,17 @@ /* Endpoint: 0, Cluster: Binding (server) */ \ .clusterId = 0x0000001E, \ .attributes = ZAP_ATTRIBUTE_INDEX(5), \ - .attributeCount = 2, \ - .clusterSize = 256, \ + .attributeCount = 1, \ + .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = nullptr ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Access Control (server) */ \ .clusterId = 0x0000001F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(7), \ + .attributes = ZAP_ATTRIBUTE_INDEX(6), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1730,7 +1699,7 @@ { \ /* Endpoint: 0, Cluster: Basic (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(11), \ + .attributes = ZAP_ATTRIBUTE_INDEX(10), \ .attributeCount = 20, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1741,18 +1710,18 @@ { \ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ .clusterId = 0x00000029, \ - .attributes = ZAP_ATTRIBUTE_INDEX(31), \ + .attributes = ZAP_ATTRIBUTE_INDEX(30), \ .attributeCount = 1, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 4 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 3 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 7 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ .clusterId = 0x0000002B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(32), \ + .attributes = ZAP_ATTRIBUTE_INDEX(31), \ .attributeCount = 3, \ .clusterSize = 38, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -1763,7 +1732,7 @@ { \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ .clusterId = 0x0000002C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(35), \ + .attributes = ZAP_ATTRIBUTE_INDEX(34), \ .attributeCount = 4, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -1774,7 +1743,7 @@ { \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ .clusterId = 0x0000002D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(39), \ + .attributes = ZAP_ATTRIBUTE_INDEX(38), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1785,7 +1754,7 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (client) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(42), \ + .attributes = ZAP_ATTRIBUTE_INDEX(41), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1796,18 +1765,18 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(42), \ + .attributes = ZAP_ATTRIBUTE_INDEX(41), \ .attributeCount = 6, \ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 7 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 12 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 10 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 15 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Network Commissioning (client) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(48), \ + .attributes = ZAP_ATTRIBUTE_INDEX(47), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1818,29 +1787,29 @@ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(48), \ + .attributes = ZAP_ATTRIBUTE_INDEX(47), \ .attributeCount = 10, \ .clusterSize = 60, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 15 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 18 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 26 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ .clusterId = 0x00000032, \ - .attributes = ZAP_ATTRIBUTE_INDEX(58), \ + .attributes = ZAP_ATTRIBUTE_INDEX(57), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 26 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ .clusterId = 0x00000033, \ - .attributes = ZAP_ATTRIBUTE_INDEX(58), \ + .attributes = ZAP_ATTRIBUTE_INDEX(57), \ .attributeCount = 9, \ .clusterSize = 17, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1851,18 +1820,18 @@ { \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ .clusterId = 0x00000034, \ - .attributes = ZAP_ATTRIBUTE_INDEX(67), \ + .attributes = ZAP_ATTRIBUTE_INDEX(66), \ .attributeCount = 6, \ .clusterSize = 30, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 28 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 31 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ .clusterId = 0x00000035, \ - .attributes = ZAP_ATTRIBUTE_INDEX(73), \ + .attributes = ZAP_ATTRIBUTE_INDEX(72), \ .attributeCount = 65, \ .clusterSize = 247, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1873,7 +1842,7 @@ { \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ .clusterId = 0x00000036, \ - .attributes = ZAP_ATTRIBUTE_INDEX(138), \ + .attributes = ZAP_ATTRIBUTE_INDEX(137), \ .attributeCount = 15, \ .clusterSize = 58, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1884,29 +1853,29 @@ { \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ .clusterId = 0x00000037, \ - .attributes = ZAP_ATTRIBUTE_INDEX(153), \ + .attributes = ZAP_ATTRIBUTE_INDEX(152), \ .attributeCount = 11, \ .clusterSize = 57, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 30 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ .clusterId = 0x0000003C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(164), \ + .attributes = ZAP_ATTRIBUTE_INDEX(163), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 32 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Operational Credentials (client) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(168), \ + .attributes = ZAP_ATTRIBUTE_INDEX(167), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1917,18 +1886,18 @@ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(168), \ + .attributes = ZAP_ATTRIBUTE_INDEX(167), \ .attributeCount = 7, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 36 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 46 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ .clusterId = 0x0000003F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(175), \ + .attributes = ZAP_ATTRIBUTE_INDEX(174), \ .attributeCount = 3, \ .clusterSize = 510, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1939,7 +1908,7 @@ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(178), \ + .attributes = ZAP_ATTRIBUTE_INDEX(177), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1950,7 +1919,7 @@ { \ /* Endpoint: 0, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(180), \ + .attributes = ZAP_ATTRIBUTE_INDEX(179), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1961,7 +1930,7 @@ { \ /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(182), \ + .attributes = ZAP_ATTRIBUTE_INDEX(181), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1972,18 +1941,18 @@ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(186), \ + .attributes = ZAP_ATTRIBUTE_INDEX(185), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 51 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(188), \ + .attributes = ZAP_ATTRIBUTE_INDEX(187), \ .attributeCount = 5, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1994,7 +1963,7 @@ { \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ .clusterId = 0x00000503, \ - .attributes = ZAP_ATTRIBUTE_INDEX(193), \ + .attributes = ZAP_ATTRIBUTE_INDEX(192), \ .attributeCount = 2, \ .clusterSize = 35, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2005,106 +1974,106 @@ { \ /* Endpoint: 1, Cluster: Channel (server) */ \ .clusterId = 0x00000504, \ - .attributes = ZAP_ATTRIBUTE_INDEX(195), \ + .attributes = ZAP_ATTRIBUTE_INDEX(194), \ .attributeCount = 4, \ .clusterSize = 256, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 55 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 59 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 58 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 62 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ .clusterId = 0x00000505, \ - .attributes = ZAP_ATTRIBUTE_INDEX(199), \ + .attributes = ZAP_ATTRIBUTE_INDEX(198), \ .attributeCount = 3, \ .clusterSize = 257, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 61 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 63 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 64 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 66 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Media Input (server) */ \ .clusterId = 0x00000507, \ - .attributes = ZAP_ATTRIBUTE_INDEX(202), \ + .attributes = ZAP_ATTRIBUTE_INDEX(201), \ .attributeCount = 3, \ .clusterSize = 257, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 65 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 68 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Low Power (server) */ \ .clusterId = 0x00000508, \ - .attributes = ZAP_ATTRIBUTE_INDEX(205), \ + .attributes = ZAP_ATTRIBUTE_INDEX(204), \ .attributeCount = 1, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 70 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 73 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Keypad Input (server) */ \ .clusterId = 0x00000509, \ - .attributes = ZAP_ATTRIBUTE_INDEX(206), \ + .attributes = ZAP_ATTRIBUTE_INDEX(205), \ .attributeCount = 1, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 72 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 75 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ .clusterId = 0x0000050A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(207), \ + .attributes = ZAP_ATTRIBUTE_INDEX(206), \ .attributeCount = 3, \ .clusterSize = 260, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 74 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 77 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 77 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 80 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ .clusterId = 0x0000050C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(210), \ + .attributes = ZAP_ATTRIBUTE_INDEX(209), \ .attributeCount = 3, \ .clusterSize = 256, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 79 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 83 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 82 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 86 ) ,\ },\ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(213), \ + .attributes = ZAP_ATTRIBUTE_INDEX(212), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 85 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 88 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 2, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(215), \ + .attributes = ZAP_ATTRIBUTE_INDEX(214), \ .attributeCount = 16, \ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 89 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 92 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(231), \ + .attributes = ZAP_ATTRIBUTE_INDEX(230), \ .attributeCount = 5, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2115,18 +2084,18 @@ { \ /* Endpoint: 2, Cluster: Audio Output (server) */ \ .clusterId = 0x0000050B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(236), \ + .attributes = ZAP_ATTRIBUTE_INDEX(235), \ .attributeCount = 3, \ .clusterSize = 257, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 98 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 101 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 3, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(239), \ + .attributes = ZAP_ATTRIBUTE_INDEX(238), \ .attributeCount = 5, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2137,29 +2106,29 @@ { \ /* Endpoint: 3, Cluster: Media Playback (server) */ \ .clusterId = 0x00000506, \ - .attributes = ZAP_ATTRIBUTE_INDEX(244), \ + .attributes = ZAP_ATTRIBUTE_INDEX(243), \ .attributeCount = 8, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 101 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 113 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 104 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 116 ) ,\ },\ { \ /* Endpoint: 3, Cluster: Content Launcher (server) */ \ .clusterId = 0x0000050A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(252), \ + .attributes = ZAP_ATTRIBUTE_INDEX(251), \ .attributeCount = 3, \ .clusterSize = 260, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 115 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 118 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 118 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 121 ) ,\ },\ { \ /* Endpoint: 3, Cluster: Application Basic (server) */ \ .clusterId = 0x0000050D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(255), \ + .attributes = ZAP_ATTRIBUTE_INDEX(254), \ .attributeCount = 9, \ .clusterSize = 138, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2170,18 +2139,18 @@ { \ /* Endpoint: 3, Cluster: Account Login (server) */ \ .clusterId = 0x0000050E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(264), \ + .attributes = ZAP_ATTRIBUTE_INDEX(263), \ .attributeCount = 1, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 120 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 124 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 123 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 127 ) ,\ },\ { \ /* Endpoint: 4, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(265), \ + .attributes = ZAP_ATTRIBUTE_INDEX(264), \ .attributeCount = 5, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2192,18 +2161,18 @@ { \ /* Endpoint: 4, Cluster: Content Launcher (server) */ \ .clusterId = 0x0000050A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(270), \ + .attributes = ZAP_ATTRIBUTE_INDEX(269), \ .attributeCount = 3, \ .clusterSize = 260, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 126 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 129 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 129 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 132 ) ,\ },\ { \ /* Endpoint: 4, Cluster: Application Basic (server) */ \ .clusterId = 0x0000050D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(273), \ + .attributes = ZAP_ATTRIBUTE_INDEX(272), \ .attributeCount = 9, \ .clusterSize = 138, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2214,7 +2183,7 @@ { \ /* Endpoint: 5, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(282), \ + .attributes = ZAP_ATTRIBUTE_INDEX(281), \ .attributeCount = 5, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2225,7 +2194,7 @@ { \ /* Endpoint: 5, Cluster: Application Basic (server) */ \ .clusterId = 0x0000050D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(287), \ + .attributes = ZAP_ATTRIBUTE_INDEX(286), \ .attributeCount = 8, \ .clusterSize = 106, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2244,7 +2213,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 26, 1361 }, { ZAP_CLUSTER_INDEX(26), 10, 1328 }, { ZAP_CLUSTER_INDEX(36), 4, 287 }, \ + { ZAP_CLUSTER_INDEX(0), 26, 1107 }, { ZAP_CLUSTER_INDEX(26), 10, 1328 }, { ZAP_CLUSTER_INDEX(36), 4, 287 }, \ { ZAP_CLUSTER_INDEX(40), 5, 439 }, { ZAP_CLUSTER_INDEX(45), 3, 398 }, { ZAP_CLUSTER_INDEX(48), 2, 106 }, \ } @@ -2257,7 +2226,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (39) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (3919) +#define ATTRIBUTE_MAX_SIZE (3665) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (6) diff --git a/zzz_generated/tv-casting-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/tv-casting-app/zap-generated/IMClusterCommandHandler.cpp index 15a1bc859154a5..9e567bc39083ba 100644 --- a/zzz_generated/tv-casting-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/tv-casting-app/zap-generated/IMClusterCommandHandler.cpp @@ -145,6 +145,52 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace BarrierControl +namespace Binding { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::Bind::Id: { + Commands::Bind::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBindingClusterBindCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::Unbind::Id: { + Commands::Unbind::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBindingClusterUnbindCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace Binding + namespace ColorControl { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -1217,6 +1263,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::BarrierControl::Id: Clusters::BarrierControl::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::Binding::Id: + Clusters::Binding::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::ColorControl::Id: Clusters::ColorControl::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index 7ac45ff84d6000..89b3b75b5fb7ea 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -29,261 +29,243 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 0, Cluster: Binding (server), big-endian */ \ + /* Endpoint: 0, Cluster: Localization Configuration (server), big-endian */ \ \ - /* 0 - binding list, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 0, Cluster: Localization Configuration (server), big-endian */ \ - \ - /* 254 - ActiveLocale, */ \ - 5, 'e', 'n', '-', 'U', 'S', \ + /* 0 - ActiveLocale, */ \ + 5, 'e', 'n', '-', 'U', 'S', \ \ /* Endpoint: 0, Cluster: Unit Localization (server), big-endian */ \ \ - /* 260 - FeatureMap, */ \ + /* 6 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Commissioning (server), big-endian */ \ \ - /* 264 - Breadcrumb, */ \ + /* 10 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 272 - FeatureMap, */ \ + /* 18 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 276 - Networks, */ \ + /* 22 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 288 - LastConnectErrorValue, */ \ + /* 34 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 292 - FeatureMap, */ \ + /* 38 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x02, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 296 - UpTime, */ \ + /* 42 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 304 - TotalOperationalHours, */ \ + /* 50 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 308 - CurrentHeapFree, */ \ + /* 54 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 316 - CurrentHeapUsed, */ \ + /* 62 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 324 - CurrentHeapHighWatermark, */ \ + /* 70 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 332 - FeatureMap, */ \ + /* 78 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 336 - NetworkName, */ \ + /* 82 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 338 - ExtendedPanId, */ \ + /* 84 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 346 - OverrunCount, */ \ + /* 92 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 354 - PartitionId, */ \ + /* 100 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 358 - TxTotalCount, */ \ + /* 104 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 362 - TxUnicastCount, */ \ + /* 108 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 366 - TxBroadcastCount, */ \ + /* 112 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 370 - TxAckRequestedCount, */ \ + /* 116 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 374 - TxAckedCount, */ \ + /* 120 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 378 - TxNoAckRequestedCount, */ \ + /* 124 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 382 - TxDataCount, */ \ + /* 128 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 386 - TxDataPollCount, */ \ + /* 132 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 390 - TxBeaconCount, */ \ + /* 136 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 394 - TxBeaconRequestCount, */ \ + /* 140 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 398 - TxOtherCount, */ \ + /* 144 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 402 - TxRetryCount, */ \ + /* 148 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 406 - TxDirectMaxRetryExpiryCount, */ \ + /* 152 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 410 - TxIndirectMaxRetryExpiryCount, */ \ + /* 156 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 414 - TxErrCcaCount, */ \ + /* 160 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 418 - TxErrAbortCount, */ \ + /* 164 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 422 - TxErrBusyChannelCount, */ \ + /* 168 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 426 - RxTotalCount, */ \ + /* 172 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 430 - RxUnicastCount, */ \ + /* 176 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 434 - RxBroadcastCount, */ \ + /* 180 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 438 - RxDataCount, */ \ + /* 184 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 442 - RxDataPollCount, */ \ + /* 188 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 446 - RxBeaconCount, */ \ + /* 192 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 450 - RxBeaconRequestCount, */ \ + /* 196 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 454 - RxOtherCount, */ \ + /* 200 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 458 - RxAddressFilteredCount, */ \ + /* 204 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 462 - RxDestAddrFilteredCount, */ \ + /* 208 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 466 - RxDuplicatedCount, */ \ + /* 212 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 470 - RxErrNoFrameCount, */ \ + /* 216 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 474 - RxErrUnknownNeighborCount, */ \ + /* 220 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 478 - RxErrInvalidSrcAddrCount, */ \ + /* 224 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 482 - RxErrSecCount, */ \ + /* 228 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 486 - RxErrFcsCount, */ \ + /* 232 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 490 - RxErrOtherCount, */ \ + /* 236 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 494 - ActiveTimestamp, */ \ + /* 240 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 502 - PendingTimestamp, */ \ + /* 248 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 510 - delay, */ \ + /* 256 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 514 - ChannelMask, */ \ + /* 260 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 521 - FeatureMap, */ \ + /* 267 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 525 - BeaconLostCount, */ \ + /* 271 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 529 - BeaconRxCount, */ \ + /* 275 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 533 - PacketMulticastRxCount, */ \ + /* 279 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 537 - PacketMulticastTxCount, */ \ + /* 283 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 541 - PacketUnicastRxCount, */ \ + /* 287 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 545 - PacketUnicastTxCount, */ \ + /* 291 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 549 - CurrentMaxRate, */ \ + /* 295 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 557 - OverrunCount, */ \ + /* 303 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 565 - FeatureMap, */ \ + /* 311 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 569 - PacketRxCount, */ \ + /* 315 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 577 - PacketTxCount, */ \ + /* 323 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 585 - TxErrCount, */ \ + /* 331 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 593 - CollisionCount, */ \ + /* 339 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 601 - OverrunCount, */ \ + /* 347 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 609 - TimeSinceReset, */ \ + /* 355 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 617 - FeatureMap, */ \ + /* 363 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Group Key Management (server), big-endian */ \ \ - /* 621 - GroupKeyMap, */ \ + /* 367 - GroupKeyMap, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -299,7 +281,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 875 - GroupTable, */ \ + /* 621 - GroupTable, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -317,30 +299,12 @@ \ /* Endpoint: 1, Cluster: On/Off (server), big-endian */ \ \ - /* 1129 - FeatureMap, */ \ + /* 875 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: Binding (server), big-endian */ \ - \ - /* 1133 - binding list, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ /* Endpoint: 1, Cluster: Fixed Label (server), big-endian */ \ \ - /* 1387 - label list, */ \ + /* 879 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -358,52 +322,52 @@ \ /* Endpoint: 1, Cluster: Door Lock (server), big-endian */ \ \ - /* 1641 - DoorOpenEvents, */ \ + /* 1133 - DoorOpenEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1645 - DoorClosedEvents, */ \ + /* 1137 - DoorClosedEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1649 - Language, */ \ + /* 1141 - Language, */ \ 2, 'e', 'n', \ \ - /* 1652 - AutoRelockTime, */ \ + /* 1144 - AutoRelockTime, */ \ 0x00, 0x00, 0x00, 0x10, \ \ /* Endpoint: 1, Cluster: Thermostat (server), big-endian */ \ \ - /* 1656 - FeatureMap, */ \ + /* 1148 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0B, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), big-endian */ \ \ - /* 1660 - IAS CIE address, */ \ + /* 1152 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), big-endian */ \ \ - /* 1668 - bitmap32, */ \ + /* 1160 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1672 - bitmap64, */ \ + /* 1164 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1680 - int32u, */ \ + /* 1172 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1684 - int64u, */ \ + /* 1176 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1692 - int32s, */ \ + /* 1184 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1696 - int64s, */ \ + /* 1188 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1704 - list_int8u, */ \ + /* 1196 - list_int8u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1714 - list_octet_string, */ \ + /* 1206 - list_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -419,7 +383,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1968 - list_struct_octet_string, */ \ + /* 1460 - list_struct_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -440,261 +404,243 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 0, Cluster: Binding (server), little-endian */ \ - \ - /* 0 - binding list, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 0, Cluster: Localization Configuration (server), little-endian */ \ + /* Endpoint: 0, Cluster: Localization Configuration (server), little-endian */ \ \ - /* 254 - ActiveLocale, */ \ - 5, 'e', 'n', '-', 'U', 'S', \ + /* 0 - ActiveLocale, */ \ + 5, 'e', 'n', '-', 'U', 'S', \ \ /* Endpoint: 0, Cluster: Unit Localization (server), little-endian */ \ \ - /* 260 - FeatureMap, */ \ + /* 6 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ \ - /* 264 - Breadcrumb, */ \ + /* 10 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 272 - FeatureMap, */ \ + /* 18 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 276 - Networks, */ \ + /* 22 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 288 - LastConnectErrorValue, */ \ + /* 34 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 292 - FeatureMap, */ \ + /* 38 - FeatureMap, */ \ 0x02, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 296 - UpTime, */ \ + /* 42 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 304 - TotalOperationalHours, */ \ + /* 50 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 308 - CurrentHeapFree, */ \ + /* 54 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 316 - CurrentHeapUsed, */ \ + /* 62 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 324 - CurrentHeapHighWatermark, */ \ + /* 70 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 332 - FeatureMap, */ \ + /* 78 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 336 - NetworkName, */ \ + /* 82 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 338 - ExtendedPanId, */ \ + /* 84 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 346 - OverrunCount, */ \ + /* 92 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 354 - PartitionId, */ \ + /* 100 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 358 - TxTotalCount, */ \ + /* 104 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 362 - TxUnicastCount, */ \ + /* 108 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 366 - TxBroadcastCount, */ \ + /* 112 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 370 - TxAckRequestedCount, */ \ + /* 116 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 374 - TxAckedCount, */ \ + /* 120 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 378 - TxNoAckRequestedCount, */ \ + /* 124 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 382 - TxDataCount, */ \ + /* 128 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 386 - TxDataPollCount, */ \ + /* 132 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 390 - TxBeaconCount, */ \ + /* 136 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 394 - TxBeaconRequestCount, */ \ + /* 140 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 398 - TxOtherCount, */ \ + /* 144 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 402 - TxRetryCount, */ \ + /* 148 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 406 - TxDirectMaxRetryExpiryCount, */ \ + /* 152 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 410 - TxIndirectMaxRetryExpiryCount, */ \ + /* 156 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 414 - TxErrCcaCount, */ \ + /* 160 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 418 - TxErrAbortCount, */ \ + /* 164 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 422 - TxErrBusyChannelCount, */ \ + /* 168 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 426 - RxTotalCount, */ \ + /* 172 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 430 - RxUnicastCount, */ \ + /* 176 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 434 - RxBroadcastCount, */ \ + /* 180 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 438 - RxDataCount, */ \ + /* 184 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 442 - RxDataPollCount, */ \ + /* 188 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 446 - RxBeaconCount, */ \ + /* 192 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 450 - RxBeaconRequestCount, */ \ + /* 196 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 454 - RxOtherCount, */ \ + /* 200 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 458 - RxAddressFilteredCount, */ \ + /* 204 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 462 - RxDestAddrFilteredCount, */ \ + /* 208 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 466 - RxDuplicatedCount, */ \ + /* 212 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 470 - RxErrNoFrameCount, */ \ + /* 216 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 474 - RxErrUnknownNeighborCount, */ \ + /* 220 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 478 - RxErrInvalidSrcAddrCount, */ \ + /* 224 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 482 - RxErrSecCount, */ \ + /* 228 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 486 - RxErrFcsCount, */ \ + /* 232 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 490 - RxErrOtherCount, */ \ + /* 236 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 494 - ActiveTimestamp, */ \ + /* 240 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 502 - PendingTimestamp, */ \ + /* 248 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 510 - delay, */ \ + /* 256 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 514 - ChannelMask, */ \ + /* 260 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 521 - FeatureMap, */ \ + /* 267 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 525 - BeaconLostCount, */ \ + /* 271 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 529 - BeaconRxCount, */ \ + /* 275 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 533 - PacketMulticastRxCount, */ \ + /* 279 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 537 - PacketMulticastTxCount, */ \ + /* 283 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 541 - PacketUnicastRxCount, */ \ + /* 287 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 545 - PacketUnicastTxCount, */ \ + /* 291 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 549 - CurrentMaxRate, */ \ + /* 295 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 557 - OverrunCount, */ \ + /* 303 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 565 - FeatureMap, */ \ + /* 311 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 569 - PacketRxCount, */ \ + /* 315 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 577 - PacketTxCount, */ \ + /* 323 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 585 - TxErrCount, */ \ + /* 331 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 593 - CollisionCount, */ \ + /* 339 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 601 - OverrunCount, */ \ + /* 347 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 609 - TimeSinceReset, */ \ + /* 355 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 617 - FeatureMap, */ \ + /* 363 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Group Key Management (server), little-endian */ \ \ - /* 621 - GroupKeyMap, */ \ + /* 367 - GroupKeyMap, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -710,7 +656,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 875 - GroupTable, */ \ + /* 621 - GroupTable, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -728,30 +674,12 @@ \ /* Endpoint: 1, Cluster: On/Off (server), little-endian */ \ \ - /* 1129 - FeatureMap, */ \ + /* 875 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: Binding (server), little-endian */ \ - \ - /* 1133 - binding list, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ /* Endpoint: 1, Cluster: Fixed Label (server), little-endian */ \ \ - /* 1387 - label list, */ \ + /* 879 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -769,52 +697,52 @@ \ /* Endpoint: 1, Cluster: Door Lock (server), little-endian */ \ \ - /* 1641 - DoorOpenEvents, */ \ + /* 1133 - DoorOpenEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1645 - DoorClosedEvents, */ \ + /* 1137 - DoorClosedEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1649 - Language, */ \ + /* 1141 - Language, */ \ 2, 'e', 'n', \ \ - /* 1652 - AutoRelockTime, */ \ + /* 1144 - AutoRelockTime, */ \ 0x10, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), little-endian */ \ \ - /* 1656 - FeatureMap, */ \ + /* 1148 - FeatureMap, */ \ 0x0B, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), little-endian */ \ \ - /* 1660 - IAS CIE address, */ \ + /* 1152 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), little-endian */ \ \ - /* 1668 - bitmap32, */ \ + /* 1160 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1672 - bitmap64, */ \ + /* 1164 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1680 - int32u, */ \ + /* 1172 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1684 - int64u, */ \ + /* 1176 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1692 - int32s, */ \ + /* 1184 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1696 - int64s, */ \ + /* 1188 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1704 - list_int8u, */ \ + /* 1196 - list_int8u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1714 - list_octet_string, */ \ + /* 1206 - list_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -830,7 +758,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1968 - list_struct_octet_string, */ \ + /* 1460 - list_struct_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -849,7 +777,7 @@ #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (93) +#define GENERATED_DEFAULTS_COUNT (91) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -915,7 +843,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 418 +#define GENERATED_ATTRIBUTE_COUNT 416 #define GENERATED_ATTRIBUTES \ { \ \ @@ -927,8 +855,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Binding (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(0) }, /* binding list */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Access Control (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -985,7 +912,7 @@ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(254) }, /* ActiveLocale */ \ + ZAP_LONG_DEFAULTS_INDEX(0) }, /* ActiveLocale */ \ { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -1001,37 +928,37 @@ \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(0) }, /* TemperatureUnit */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(6) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(264) }, /* Breadcrumb */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(10) }, /* Breadcrumb */ \ { 0x00000001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfo */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(272) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfo */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(18) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(276) }, /* Networks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(22) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(288) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(292) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(34) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(296) }, /* UpTime */ \ - { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(304) }, /* TotalOperationalHours */ \ - { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(42) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ @@ -1041,23 +968,23 @@ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(308) }, /* CurrentHeapFree */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(316) }, /* CurrentHeapUsed */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(324) }, /* CurrentHeapHighWatermark */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(332) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(54) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(62) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(70) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(78) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x00000002, ZAP_TYPE(CHAR_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* NetworkName */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(82) }, /* NetworkName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(338) }, /* ExtendedPanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(84) }, /* ExtendedPanId */ \ { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(346) }, /* OverrunCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(92) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(354) }, /* PartitionId */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(100) }, /* PartitionId */ \ { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -1070,50 +997,50 @@ { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(358) }, /* TxTotalCount */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(362) }, /* TxUnicastCount */ \ - { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(366) }, /* TxBroadcastCount */ \ - { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(370) }, /* TxAckRequestedCount */ \ - { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(374) }, /* TxAckedCount */ \ - { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(378) }, /* TxNoAckRequestedCount */ \ - { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(382) }, /* TxDataCount */ \ - { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(386) }, /* TxDataPollCount */ \ - { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(390) }, /* TxBeaconCount */ \ - { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(394) }, /* TxBeaconRequestCount */ \ - { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* TxOtherCount */ \ - { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(402) }, /* TxRetryCount */ \ - { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(406) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(410) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(414) }, /* TxErrCcaCount */ \ - { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(418) }, /* TxErrAbortCount */ \ - { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(422) }, /* TxErrBusyChannelCount */ \ - { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(426) }, /* RxTotalCount */ \ - { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(430) }, /* RxUnicastCount */ \ - { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(434) }, /* RxBroadcastCount */ \ - { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(438) }, /* RxDataCount */ \ - { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(442) }, /* RxDataPollCount */ \ - { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(446) }, /* RxBeaconCount */ \ - { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(450) }, /* RxBeaconRequestCount */ \ - { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(454) }, /* RxOtherCount */ \ - { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(458) }, /* RxAddressFilteredCount */ \ - { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(462) }, /* RxDestAddrFilteredCount */ \ - { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(466) }, /* RxDuplicatedCount */ \ - { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(470) }, /* RxErrNoFrameCount */ \ - { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(474) }, /* RxErrUnknownNeighborCount */ \ - { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(478) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(482) }, /* RxErrSecCount */ \ - { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(486) }, /* RxErrFcsCount */ \ - { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(490) }, /* RxErrOtherCount */ \ - { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(494) }, /* ActiveTimestamp */ \ - { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(502) }, /* PendingTimestamp */ \ - { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(510) }, /* delay */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(104) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(108) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(112) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(116) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(120) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(124) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(128) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(132) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(136) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(140) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(144) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(148) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(152) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(156) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(160) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(164) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(168) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(172) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(176) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(180) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(184) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(188) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(192) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(196) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(200) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(204) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(208) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(212) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(216) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(220) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(224) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(228) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(232) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(236) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(240) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(248) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(256) }, /* delay */ \ { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* ChannelMask */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* ChannelMask */ \ { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(521) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(267) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ @@ -1122,28 +1049,28 @@ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(525) }, /* BeaconLostCount */ \ - { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(529) }, /* BeaconRxCount */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(533) }, /* PacketMulticastRxCount */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(537) }, /* PacketMulticastTxCount */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(541) }, /* PacketUnicastRxCount */ \ - { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(545) }, /* PacketUnicastTxCount */ \ - { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(549) }, /* CurrentMaxRate */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(557) }, /* OverrunCount */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(565) }, /* FeatureMap */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(271) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(275) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(279) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(291) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(295) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(311) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(577) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(585) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(593) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(601) }, /* OverrunCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(609) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(617) }, /* FeatureMap */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -1165,8 +1092,8 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(621) }, /* GroupKeyMap */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(875) }, /* GroupTable */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(367) }, /* GroupKeyMap */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(621) }, /* GroupTable */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ @@ -1207,7 +1134,7 @@ { 0x00004001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OnTime */ \ { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ { 0x00004003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1129) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(875) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ @@ -1250,7 +1177,6 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binding (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1133) }, /* binding list */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ @@ -1289,17 +1215,17 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1387) }, /* label list */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(879) }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(2) }, /* LockState */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LockType */ \ { 0x00000002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ActuatorEnabled */ \ { 0x00000003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* DoorState */ \ - { 0x00000004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1641) }, /* DoorOpenEvents */ \ + { 0x00000004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1133) }, /* DoorOpenEvents */ \ { 0x00000005, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1645) }, /* DoorClosedEvents */ \ + ZAP_LONG_DEFAULTS_INDEX(1137) }, /* DoorClosedEvents */ \ { 0x00000006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* OpenPeriod */ \ { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfTotalUsersSupported */ \ { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfPINUsersSupported */ \ @@ -1309,8 +1235,8 @@ { 0x00000017, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MaxPINCodeLength */ \ { 0x00000018, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MinPINCodeLength */ \ { 0x0000001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ - { 0x00000021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1649) }, /* Language */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1652) }, /* AutoRelockTime */ \ + { 0x00000021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1141) }, /* Language */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1144) }, /* AutoRelockTime */ \ { 0x00000024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* SoundVolume */ \ { 0x00000025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1380,7 +1306,7 @@ { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1656) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1148) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Color Control (server) */ \ @@ -1475,7 +1401,7 @@ { 0x00000001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ { 0x00000002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ { 0x00000010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1660) }, /* IAS CIE address */ \ + ZAP_LONG_DEFAULTS_INDEX(1152) }, /* IAS CIE address */ \ { 0x00000011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ @@ -1487,24 +1413,24 @@ { 0x00000000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ { 0x00000001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ { 0x00000002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ - { 0x00000003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1668) }, /* bitmap32 */ \ - { 0x00000004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1672) }, /* bitmap64 */ \ + { 0x00000003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1160) }, /* bitmap32 */ \ + { 0x00000004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1164) }, /* bitmap64 */ \ { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ { 0x00000006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1680) }, /* int32u */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1684) }, /* int64u */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1172) }, /* int32u */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1176) }, /* int64u */ \ { 0x0000000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ { 0x0000000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ - { 0x00000010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1692) }, /* int32s */ \ - { 0x00000014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1696) }, /* int64s */ \ + { 0x00000010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1184) }, /* int32s */ \ + { 0x00000014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1188) }, /* int64s */ \ { 0x00000015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ { 0x00000016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ { 0x00000019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* octet_string */ \ - { 0x0000001A, ZAP_TYPE(ARRAY), 10, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1704) }, /* list_int8u */ \ + { 0x0000001A, ZAP_TYPE(ARRAY), 10, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1196) }, /* list_int8u */ \ { 0x0000001B, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1714) }, /* list_octet_string */ \ + ZAP_LONG_DEFAULTS_INDEX(1206) }, /* list_octet_string */ \ { 0x0000001C, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1968) }, /* list_struct_octet_string */ \ + ZAP_LONG_DEFAULTS_INDEX(1460) }, /* list_struct_octet_string */ \ { 0x0000001D, ZAP_TYPE(LONG_OCTET_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* long_octet_string */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ @@ -1582,6 +1508,11 @@ // clang-format off #define GENERATED_COMMANDS { \ + /* Endpoint: 0, Cluster: Binding (server) */\ + /* client_generated */ \ + 0x00000000 /* Bind */, \ + 0x00000001 /* Unbind */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */\ /* client_generated */ \ 0x00000000 /* QueryImage */, \ @@ -1710,6 +1641,11 @@ 0x00000006 /* StepWithOnOff */, \ 0x00000007 /* StopWithOnOff */, \ chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 1, Cluster: Binding (server) */\ + /* client_generated */ \ + 0x00000000 /* Bind */, \ + 0x00000001 /* Unbind */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Door Lock (server) */\ /* client_generated */ \ 0x00000000 /* LockDoor */, \ @@ -1801,17 +1737,17 @@ /* Endpoint: 0, Cluster: Binding (server) */ \ .clusterId = 0x0000001E, \ .attributes = ZAP_ATTRIBUTE_INDEX(5), \ - .attributeCount = 2, \ - .clusterSize = 256, \ + .attributeCount = 1, \ + .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = nullptr ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Access Control (server) */ \ .clusterId = 0x0000001F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(7), \ + .attributes = ZAP_ATTRIBUTE_INDEX(6), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1822,7 +1758,7 @@ { \ /* Endpoint: 0, Cluster: Basic (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(11), \ + .attributes = ZAP_ATTRIBUTE_INDEX(10), \ .attributeCount = 20, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1833,18 +1769,18 @@ { \ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ .clusterId = 0x00000029, \ - .attributes = ZAP_ATTRIBUTE_INDEX(31), \ + .attributes = ZAP_ATTRIBUTE_INDEX(30), \ .attributeCount = 1, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 4 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 3 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 7 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ .clusterId = 0x0000002B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(32), \ + .attributes = ZAP_ATTRIBUTE_INDEX(31), \ .attributeCount = 3, \ .clusterSize = 38, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -1855,7 +1791,7 @@ { \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ .clusterId = 0x0000002C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(35), \ + .attributes = ZAP_ATTRIBUTE_INDEX(34), \ .attributeCount = 4, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -1866,7 +1802,7 @@ { \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ .clusterId = 0x0000002D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(39), \ + .attributes = ZAP_ATTRIBUTE_INDEX(38), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1877,40 +1813,40 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(42), \ + .attributes = ZAP_ATTRIBUTE_INDEX(41), \ .attributeCount = 6, \ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 7 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 12 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 10 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 15 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(48), \ + .attributes = ZAP_ATTRIBUTE_INDEX(47), \ .attributeCount = 10, \ .clusterSize = 60, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 15 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 22 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 18 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ .clusterId = 0x00000032, \ - .attributes = ZAP_ATTRIBUTE_INDEX(58), \ + .attributes = ZAP_ATTRIBUTE_INDEX(57), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 28 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ .clusterId = 0x00000033, \ - .attributes = ZAP_ATTRIBUTE_INDEX(58), \ + .attributes = ZAP_ATTRIBUTE_INDEX(57), \ .attributeCount = 9, \ .clusterSize = 17, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1921,18 +1857,18 @@ { \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ .clusterId = 0x00000034, \ - .attributes = ZAP_ATTRIBUTE_INDEX(67), \ + .attributes = ZAP_ATTRIBUTE_INDEX(66), \ .attributeCount = 6, \ .clusterSize = 30, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 30 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ .clusterId = 0x00000035, \ - .attributes = ZAP_ATTRIBUTE_INDEX(73), \ + .attributes = ZAP_ATTRIBUTE_INDEX(72), \ .attributeCount = 65, \ .clusterSize = 247, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1943,7 +1879,7 @@ { \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ .clusterId = 0x00000036, \ - .attributes = ZAP_ATTRIBUTE_INDEX(138), \ + .attributes = ZAP_ATTRIBUTE_INDEX(137), \ .attributeCount = 15, \ .clusterSize = 58, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1954,40 +1890,40 @@ { \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ .clusterId = 0x00000037, \ - .attributes = ZAP_ATTRIBUTE_INDEX(153), \ + .attributes = ZAP_ATTRIBUTE_INDEX(152), \ .attributeCount = 11, \ .clusterSize = 57, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 32 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ .clusterId = 0x0000003C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(164), \ + .attributes = ZAP_ATTRIBUTE_INDEX(163), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 31 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 34 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(168), \ + .attributes = ZAP_ATTRIBUTE_INDEX(167), \ .attributeCount = 7, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 38 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 48 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ .clusterId = 0x0000003F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(175), \ + .attributes = ZAP_ATTRIBUTE_INDEX(174), \ .attributeCount = 3, \ .clusterSize = 510, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1998,7 +1934,7 @@ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(178), \ + .attributes = ZAP_ATTRIBUTE_INDEX(177), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2009,7 +1945,7 @@ { \ /* Endpoint: 0, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(180), \ + .attributes = ZAP_ATTRIBUTE_INDEX(179), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2020,7 +1956,7 @@ { \ /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(182), \ + .attributes = ZAP_ATTRIBUTE_INDEX(181), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2031,62 +1967,62 @@ { \ /* Endpoint: 1, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(186), \ + .attributes = ZAP_ATTRIBUTE_INDEX(185), \ .attributeCount = 2, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 50 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 53 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 53 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 56 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(188), \ + .attributes = ZAP_ATTRIBUTE_INDEX(187), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 55 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 62 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 58 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 65 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ .clusterId = 0x00000005, \ - .attributes = ZAP_ATTRIBUTE_INDEX(190), \ + .attributes = ZAP_ATTRIBUTE_INDEX(189), \ .attributeCount = 6, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 67 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 75 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 70 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 78 ) ,\ },\ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(196), \ + .attributes = ZAP_ATTRIBUTE_INDEX(195), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 82 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 85 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(203), \ + .attributes = ZAP_ATTRIBUTE_INDEX(202), \ .attributeCount = 15, \ .clusterSize = 23, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 86 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 89 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ .clusterId = 0x0000000F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(218), \ + .attributes = ZAP_ATTRIBUTE_INDEX(217), \ .attributeCount = 4, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2097,7 +2033,7 @@ { \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(222), \ + .attributes = ZAP_ATTRIBUTE_INDEX(221), \ .attributeCount = 5, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2108,18 +2044,18 @@ { \ /* Endpoint: 1, Cluster: Binding (server) */ \ .clusterId = 0x0000001E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(227), \ - .attributeCount = 2, \ - .clusterSize = 256, \ + .attributes = ZAP_ATTRIBUTE_INDEX(226), \ + .attributeCount = 1, \ + .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = nullptr ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 98 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ .clusterId = 0x00000039, \ - .attributes = ZAP_ATTRIBUTE_INDEX(229), \ + .attributes = ZAP_ATTRIBUTE_INDEX(227), \ .attributeCount = 15, \ .clusterSize = 36, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2130,7 +2066,7 @@ { \ /* Endpoint: 1, Cluster: Switch (server) */ \ .clusterId = 0x0000003B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(244), \ + .attributes = ZAP_ATTRIBUTE_INDEX(242), \ .attributeCount = 3, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2141,7 +2077,7 @@ { \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(247), \ + .attributes = ZAP_ATTRIBUTE_INDEX(245), \ .attributeCount = 2, \ .clusterSize = 256, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2152,62 +2088,62 @@ { \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ .clusterId = 0x00000101, \ - .attributes = ZAP_ATTRIBUTE_INDEX(249), \ + .attributes = ZAP_ATTRIBUTE_INDEX(247), \ .attributeCount = 28, \ .clusterSize = 46, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayDoorLockServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 95 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 101 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ .clusterId = 0x00000102, \ - .attributes = ZAP_ATTRIBUTE_INDEX(277), \ + .attributes = ZAP_ATTRIBUTE_INDEX(275), \ .attributeCount = 19, \ .clusterSize = 31, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 104 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 110 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ .clusterId = 0x00000103, \ - .attributes = ZAP_ATTRIBUTE_INDEX(296), \ + .attributes = ZAP_ATTRIBUTE_INDEX(294), \ .attributeCount = 5, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 108 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 114 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ .clusterId = 0x00000201, \ - .attributes = ZAP_ATTRIBUTE_INDEX(301), \ + .attributes = ZAP_ATTRIBUTE_INDEX(299), \ .attributeCount = 10, \ .clusterSize = 17, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 111 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 117 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ .clusterId = 0x00000300, \ - .attributes = ZAP_ATTRIBUTE_INDEX(311), \ + .attributes = ZAP_ATTRIBUTE_INDEX(309), \ .attributeCount = 51, \ .clusterSize = 337, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayColorControlServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 115 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 121 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(362), \ + .attributes = ZAP_ATTRIBUTE_INDEX(360), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2218,7 +2154,7 @@ { \ /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ .clusterId = 0x00000403, \ - .attributes = ZAP_ATTRIBUTE_INDEX(366), \ + .attributes = ZAP_ATTRIBUTE_INDEX(364), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2229,7 +2165,7 @@ { \ /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ .clusterId = 0x00000404, \ - .attributes = ZAP_ATTRIBUTE_INDEX(370), \ + .attributes = ZAP_ATTRIBUTE_INDEX(368), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2240,7 +2176,7 @@ { \ /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(374), \ + .attributes = ZAP_ATTRIBUTE_INDEX(372), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2251,18 +2187,18 @@ { \ /* Endpoint: 1, Cluster: IAS Zone (server) */ \ .clusterId = 0x00000500, \ - .attributes = ZAP_ATTRIBUTE_INDEX(378), \ + .attributes = ZAP_ATTRIBUTE_INDEX(376), \ .attributeCount = 6, \ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ .functions = chipFuncArrayIasZoneServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 130 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 132 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 136 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 138 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ .clusterId = 0x00000503, \ - .attributes = ZAP_ATTRIBUTE_INDEX(384), \ + .attributes = ZAP_ATTRIBUTE_INDEX(382), \ .attributeCount = 2, \ .clusterSize = 35, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2273,7 +2209,7 @@ { \ /* Endpoint: 1, Cluster: Channel (client) */ \ .clusterId = 0x00000504, \ - .attributes = ZAP_ATTRIBUTE_INDEX(386), \ + .attributes = ZAP_ATTRIBUTE_INDEX(384), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -2284,7 +2220,7 @@ { \ /* Endpoint: 1, Cluster: Target Navigator (client) */ \ .clusterId = 0x00000505, \ - .attributes = ZAP_ATTRIBUTE_INDEX(386), \ + .attributes = ZAP_ATTRIBUTE_INDEX(384), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -2295,7 +2231,7 @@ { \ /* Endpoint: 1, Cluster: Media Playback (client) */ \ .clusterId = 0x00000506, \ - .attributes = ZAP_ATTRIBUTE_INDEX(386), \ + .attributes = ZAP_ATTRIBUTE_INDEX(384), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -2306,7 +2242,7 @@ { \ /* Endpoint: 1, Cluster: Media Input (client) */ \ .clusterId = 0x00000507, \ - .attributes = ZAP_ATTRIBUTE_INDEX(386), \ + .attributes = ZAP_ATTRIBUTE_INDEX(384), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -2317,7 +2253,7 @@ { \ /* Endpoint: 1, Cluster: Keypad Input (client) */ \ .clusterId = 0x00000509, \ - .attributes = ZAP_ATTRIBUTE_INDEX(386), \ + .attributes = ZAP_ATTRIBUTE_INDEX(384), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -2328,7 +2264,7 @@ { \ /* Endpoint: 1, Cluster: Content Launcher (client) */ \ .clusterId = 0x0000050A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(386), \ + .attributes = ZAP_ATTRIBUTE_INDEX(384), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -2339,7 +2275,7 @@ { \ /* Endpoint: 1, Cluster: Audio Output (client) */ \ .clusterId = 0x0000050B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(386), \ + .attributes = ZAP_ATTRIBUTE_INDEX(384), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -2350,7 +2286,7 @@ { \ /* Endpoint: 1, Cluster: Application Launcher (client) */ \ .clusterId = 0x0000050C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(386), \ + .attributes = ZAP_ATTRIBUTE_INDEX(384), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -2361,7 +2297,7 @@ { \ /* Endpoint: 1, Cluster: Application Basic (client) */ \ .clusterId = 0x0000050D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(386), \ + .attributes = ZAP_ATTRIBUTE_INDEX(384), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -2372,7 +2308,7 @@ { \ /* Endpoint: 1, Cluster: Account Login (client) */ \ .clusterId = 0x0000050E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(386), \ + .attributes = ZAP_ATTRIBUTE_INDEX(384), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -2383,29 +2319,29 @@ { \ /* Endpoint: 1, Cluster: Test Cluster (server) */ \ .clusterId = 0x0000050F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(386), \ + .attributes = ZAP_ATTRIBUTE_INDEX(384), \ .attributeCount = 21, \ .clusterSize = 1582, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 135 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 138 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 141 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 144 ) ,\ },\ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(407), \ + .attributes = ZAP_ATTRIBUTE_INDEX(405), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 140 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 146 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(409), \ + .attributes = ZAP_ATTRIBUTE_INDEX(407), \ .attributeCount = 5, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2416,7 +2352,7 @@ { \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(414), \ + .attributes = ZAP_ATTRIBUTE_INDEX(412), \ .attributeCount = 4, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2435,7 +2371,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 22, 1361 }, { ZAP_CLUSTER_INDEX(22), 33, 2711 }, { ZAP_CLUSTER_INDEX(55), 3, 8 }, \ + { ZAP_CLUSTER_INDEX(0), 22, 1107 }, { ZAP_CLUSTER_INDEX(22), 33, 2457 }, { ZAP_CLUSTER_INDEX(55), 3, 8 }, \ } // Largest attribute size is needed for various buffers @@ -2447,7 +2383,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (75) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (4080) +#define ATTRIBUTE_MAX_SIZE (3572) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3)